koopjs / FeatureServer

An open source Geoservices Implementation (deprecated)
https://geoservices.github.io
Other
104 stars 32 forks source link

Set hasZ from GeoJSON metadata when available #238

Closed rgwozdz closed 2 years ago

rgwozdz commented 2 years ago

The hasZ setting on the layer-info route is currently hardcoded to false, but should be true when data includes Z-coordinates. This PR allows GeoJSON metadata to override the default. If the GeoJSON looks like:

{
  metadata: {
    hasZ: true
  }
}

then the hasZ in the layer-info response will also be true. So a Koop-provider can set the geojson.metadata.hasZ value if it knows the data has Z coordinates, and FeatureServer will respond appropriately.