Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Architect how FeatureSever layers will be referenced in the STAC Catalog #11

Open
slesaad opened this issue Jun 12, 2024 · 3 comments
Open
Assignees

Comments

@slesaad
Copy link
Member

slesaad commented Jun 12, 2024

Description

EIC data wishlist consists of datasets from ArcGIS ImageServer, MapServer and FeatureServer. Visualizing ImageServer and MapServer with WMS enabled is mostly figured out. Next is FeatureServer.

It seems like a FeatureServer layer can be converted to a GeoJSON object if the fieldsupportedQueryFormats lists geoJSON.
This basically involves making a request to the layer's /query endpoint with f=pgeojson.

An example:
https://services2.arcgis.com/FiaPA4ga0iQKduv3/ArcGIS/rest/services/IBTrACS_ALL_list_v04r00_lines_1/FeatureServer/0/query?where=1%3D1&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&resultType=none&distance=0.0&units=esriSRUnit_Meter&relationParam=&returnGeodetic=false&outFields=*&returnGeometry=true&returnEnvelope=false&featureEncoding=esriDefault&multipatchOption=xyFootprint&maxAllowableOffset=&geometryPrecision=&outSR=&defaultSR=&datumTransformation=&applyVCSProjection=false&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&returnQueryGeometry=false&returnDistinctValues=false&cacheHint=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&having=&resultOffset=&resultRecordCount=&returnZ=false&returnM=false&returnExceededLimitFeatures=true&quantizationParameters=&sqlFormat=none&f=pgeojson&token=

Most of the query params passed here are default values, the only ones that I passed are:

where: 1=1
outFields: *
f: pgeojson

This provides the data in geojson, which should be simple enough to add to the map using mapbox's methods:

map.addSource('earthquakes', {
    type: 'geojson',
    // Use a URL for the value for the `data` property.
    data: 'https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson'
});

map.addLayer({
    'id': 'earthquakes-layer',
    'type': 'circle',
    'source': 'earthquakes',
    'paint': {
        'circle-radius': 4,
        'circle-stroke-width': 2,
        'circle-color': 'red',
        'circle-stroke-color': 'white'
    }
});

Soooo,
we could use similar strategy we used for the (vector) eis fire perimeter dataset (https://staging-stac.delta-backend.com/collections/eis_fire_perimeter) to publish it to the VEDA data catalog. Basically, create a collection with metadata from the arcgis server and have a link object that points to the geojson.

@smohiudd smohiudd changed the title Support FeatureServer Architect how FeatureSever layers will be referenced in the STAC Catalog Oct 1, 2024
@smohiudd
Copy link
Contributor

Here is the documentation on how to query the FeatureSever layer:
https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/

@smohiudd
Copy link
Contributor

FeatureServer datasets may have multiple layers. We need to reference the layers in the collection so may need something different than how we deal with eis_fire_perimeter. My proposal is to do something like the web-map-links extension:

{
    rel': 'featureserver',
   'href': 'https://services2.arcgis.com/FiaPA4ga0iQKduv3/arcgis/rest/services/IBTrACS_ALL_list_v04r00_lines_1/FeatureServer',
   'type': 'image/json',
   'title': 'ArcGIS FeatureServer',
   'featureserver:layers': {
        0: 'Hurricane_Tracks_A'
    }
}

@smohiudd
Copy link
Contributor

smohiudd commented Nov 5, 2024

PR created in web-map-links extension: stac-extensions/web-map-links#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants