-
Notifications
You must be signed in to change notification settings - Fork 6
Working with the ArcGIS Pro add in
The ArcGIS Pro add-in uses Koop as its server and relies on Geo Data Service service descriptors to access data in MarkLogic.
-
geoSearchServiceis used to run search queries against MarkLogic within the context of feature layers. -
geoQueryServiceis used (via Koop) when searches are turned into full-fledged feature layers. Saved searches end up as feature layers. -
modelServiceis used to check for available service descriptors and which ones are configured for search.
The geoQueryService REST extension is primarily designed for querying data in MarkLogic and retrieving them as GeoJSON features. This approach uses "SQL-like" syntax to define queries and requires data to have a flat (table-like) structure.
This services heavily relies on MarkLogic's Optic API and TDE templates to achieve this.
On the other hand, geoSearchService leverages MarkLogic's Search API for querying data. Internally, it dynamically constructs search options based on the service request and provides a response similar to MarkLogic's v1/search. This allows for full-text queries, faceting, point clustering, and other features inherent to the Search API.
To enable search for a service descriptor, you must configure a MarkLogic search options document as part of your MarkLogic deployment. It is up to you to determine the search constraints and other search options based on your use case. The search options should have at least one (1) geospatial constraint. For a working example, see the sample project's search options.
Optionally, you may also want to configure a MarkLogic content transform to transform documents into HTML. If set, the add-in will use the content transform when viewing search results as documents.
- Add a
searchsection to your service descriptor to specify the search options and (optionally) the content transform. - Modify one of your feature layers and add a
searchsection containing ageoConstraintproperty with the name of your geospatial constraint. This will act as your "reference" feature layer. - Add additional layers to provide "slots" for the add-in to save searches. The layers can have the same configuration your "reference" feature layer, but it is important that they don't have a
searchsection. - Add a
readOnlyproperty to the feature layer and set it totrue. This will prevent the feature layer from being overwritten when the add-in attempts to save searches.
You can find a working example used by the example project here. Below is an excerpt:
{
"info" : {
"name" : "GDeltExample"
},
"search": {
"options": "example-gkg-options",
"docTransform": "example-gkg-transform"
},
"layers" : [
{
"id": 0,
"name" : "GKG",
"description": "All GDelt articles",
"geometryType": "Point",
"idField": "OBJECTID",
"displayField": "name",
"extent" : {
"xmin" : -180,
"ymin" : -90,
"xmax" : 180,
"ymax" : 90,
"spatialReference" : {
"wkid" : 4326,
"latestWkid" : 4326
}
},
"schema": "GDeltGKG",
"view" : "Article",
"geometry" : {
"type" : "Point",
"format" : "geojson",
"coordinateSystem" : "wgs84",
"xpath" : "//geometry"
},
"search": {
"geoConstraint": "Location"
},
"readOnly": true
}
// ...other feature layers
]
}