koopjs / koop-output-geoservices

Deprecated
Other
6 stars 4 forks source link

Unable to set `hasZ` or `hasM` #30

Closed LeviRemi closed 2 years ago

LeviRemi commented 2 years ago

I am sending 4-dimensional coordinates to Koop as an esriGeometryPoint, but only the x and y coordinates are returning from a feature layer query. I suspect this is due to the hasZ and hasM properties being false, but I cannot find a way to manually set them true.

I tried passing hasZ: true and hasM: true in the geojson's metadata for koop's getData callback function, but have had no success. Could anyone tell me how this is done, or if this is even possible? Thanks in advanced!

Example data/response:

GeoJSON:

{
  type: 'FeatureCollection',
  features: [...],
  metadata: {
      idField: 'esriOid',
      name: 'Koop Test',
      maxRecordCount: 5000,
      fields: [
        [Object], [Object],
      ],
      geometryType: 'esriGeometryPoint',
      hasZ: true,
      hasM: true
    }
}

Koop FeatureLayer query result:

{
    "objectIdFieldName": "esriOid",
    "uniqueIdField": {
        "name": "esriOid",
        "isSystemMaintained": true
    },
    "globalIdFieldName": "",
    "hasZ": false,
    "hasM": false,
    "spatialReference": {
        "wkid": 4326,
        "latestWkid": 4326
    },
    "fields": [...],
    "features": [...],
    "exceededTransferLimit": false,
    "geometryType": "esriGeometryPoint"
}

Output query result feature:

{
    "attributes": {...},
    "geometry": {
        "x": -78.9153,
        "y": 36.18083
    }
},
rgwozdz commented 2 years ago

I'd have to debug this; the actually code is in FeatureServer, can you move this issue there and add full example of the geojson coming out of your provider (metadata and features).

LeviRemi commented 2 years ago

Thank you, I have added the issue to that repo with more detail. I will close this one