-
Notifications
You must be signed in to change notification settings - Fork 3
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
Syndicate Some/All of the Greenville County iMap #46
Comments
@Mozillex The recycling locations are now automated to pull from the Greenville County recycling layer, which is one of the iMAP layers. https://data.openupstate.org/map/preview/recycling-locations/ Heads up to @MariaTaborda @igrozeva13 @ebeyerle |
Rhett with GC GIS said they have the Swamp Rabbit Trail mile markers in the GIS and that he'd move them to the iMAP layer. At that point we'd prefer to use the county's copy vs the community curated copy since the data is unlikely to change besides new points and the county runs the SRT. |
Goals
|
Here's a good example of how a "Parks" map layer that's inside iMAP could be easily embedded into a site, using real-time data from iMAP, instead of having to send folks offsite or ask them to download a 3rd party app. This is the power of the approach this project takes. It uses what's out there, but allows sharing and ownership as well. |
At least one of the Greenville County GIS GeoJSON feeds has feature results with missing latitude and longitude, so we're having to filter it out. For now, it's being filtered on the LeafletJS side, as mentioned at #50 (comment) |
We've previously syndicated many of the map layers, as posted on https://data.openupstate.org/map-layers |
Overview of IMAP
There are numerous community resource map layers in the Greenville County IMAP project, which is hosted under the Greenville County GCGIS / ArcGIS site.
The service is a partnership between GHS, United Way, Greenville County GIS and Furman's Community Engaged-Learning Collaborative.
These map layers are public and functional, but the data is intended for viewing by agencies / service providers and their clients. However, the data is otherwise trapped inside the ArcGIS Viewer tool unless you work with the ArcGIS API endpoints.
The GCGIS.org ArcGIS services include other map resources, but the IMAP layers / service is the most readily useful.
How We Can Help
The purpose of this issue is syndicate and promote some, or all, of these map layers so the data can be used and linked to in real-time by other map developers without putting a strain on the county's server.
The target audience of this syndicated data would be web developers or savvy users who want to create a map and link to IMAP layer data in psuedo-real-time.
A simple first iteration of this idea would involve querying GCGIS map layers, 1 or more times a day, using a scheduled cron job. The resulting data could be stored as a static GeoJSON file, or even other supported formats like json | kmz | amf. That static copy would be the "public" endpoint and since it's static a basic web server would be able to handle a good deal of load. However, the longer-term intention is to use a CDN or service like CloudFlare to host such syndicated data files so they are scalable and reliable.
Examples of Querying Map Layers for Features
The API documentation has a section on how to "query" the map layer endpoints.
As a simple example, map layer 1 "Child Care" can be queried for any map feature name containing the word "greenville" and the results returned in GeoJSON format.
We'll use layer 67 "Recycling Centers" for the next example.
The format parameter (&f=geojson) is very useful for our Code For Greenville map project because GeoJSON is a native format for Leaflet.
The resulting GeoJSON can pretty much be snapped into a Leaflet or Google Map as a layer and points will display.
This needs more research, but getting a list of all the "features" of a map layer is surprisingly confusing.
After a number of tries we tricked the query to return all features by checking "where" ObjectID > 0
https://www.gcgis.org/arcgis/rest/services/imap/imap/MapServer/67/query?where=OBJECTID>0&f=geojson&outFields=*&geometryType=esriGeometryPoint
We need to ask Rhett at GCGIS if there's a better way to select all features.
Another query that might be mildly useful is to request a map layer feature by one or more objectids.
The Query Builder UI
At the bottom of these HTML pages there is a link to a query builder which helps figure out the available query string parameters and values. It should be noted that many combinations of parameter and values generated using the query builder will return vague errors. So, you must persist, leverage the layer documentation and take informed guesses.
The query builder exposes all the query string parameters, leaving them empty if no values are entered in the HTML form.
The text was updated successfully, but these errors were encountered: