๐ŸŒŠ

#18 feat: Add vector tile streaming & WMS layer caching

Open Ready for review
Author: sarah-rivera Base: main Compare: feat/vector-tiles Milestone: v2.4.0 Labels: enhancement, geospatial, performance
โœ“
All checks passed
\n
ci/build โ— ci/test โ— ci/lint
Files Changed 5 files โ€ข +142 -38
  • ๐Ÿ“„ src/tilestream.js
    +84 -12
  • ๐Ÿ“„ src/wms-cache.js
    +32 -0
  • โš™๏ธ config/geo-server.yaml
    +18 -5
  • ๐Ÿ“ docs/vector-tiles.md
    +8 -0
  • ๐Ÿงช tests/tilestream.test.js
    +44 -21
src/tilestream.js
42
43- async fetchRasterTiles(bounds) {
44- return this.cache.get(bounds);
43+ async streamVectorTiles(bounds, format = 'geojson') {
44+ const query = this.buildSpatialQuery(bounds);
45+ return this.db.spatial.aggregate([
46
47+ { $geoNear: { near: bounds.center, maxDistance: bounds.radius } },
48+ { $project: { geometry: 1, properties: 1 } }
49
50- getWmsCapabilities() {
50+ getWmsCapabilities() {
51+ return { ...this.capabilities, vectorSupport: true, cacheEnabled: true };