Subscribe to this thread
Home - General / All posts - Cannot create link to webserver using APIs
drtees80 post(s)
#10-Jul-19 17:19

One of the jurisdictions I work with has an extensive collection of GIS data. They are now providing APIs to link to data. This seems tailor-made for connection with M9. The jurisdiction provides APIs for GJSON and ARCGISREST servers. I have tried to connect to both using "Create-New Data Source" and selecting various Web Server types (arcgisrest, geocodeserver, geojsonserver, and wms). The data source created does nothing. One thing I did note is that M9 puts two back-slashes in front of every forward slash when the data sources are created. I tried eliminating the back-slashes in one trial. This did not solve the problem. So far, reading the online manual has not provided me with insight as to why the connections are not working. I would greatly appreciate clarification on the process of connecting to remote data using the APIs.

https://gisdata.kingcounty.gov/arcgis/rest/services/OpenDataPortal/property__row_area/MapServer/436/query?outFields=*&where=1%3D1

https://opendata.arcgis.com/datasets/729fd2be8790430089920c81c9d8d173_436.geojson

https://opendata.arcgis.com/datasets/3fdb7c41de8548c5ab5f96cb1ef303e2_446.geojson

joebocop
389 post(s)
#10-Jul-19 17:41

Their API is returning errors on those geojson endpoints, if nothing else:

{"status":"Failed","error":{"message":"Paging aborted: Request for a page of features failed","code":500,"request":"https://gisdata.kingcounty.gov/arcgis/rest/services/OpenDataPortal/property__row_area/MapServer/436/query?outSR=4326&where=OBJECTID>=1+AND+OBJECTID<=1000&f=json&outFields=*&geometry=&returnGeometry=true&returnZ=true&geometryPrecision=","response":"Error performing query operation","timestamp":"2019-07-10T16:38:32.252Z"}}

Dimitri


5,620 post(s)
#10-Jul-19 19:21

If the link is said to be for an ArcGIS REST connection, that's the web server you use.

Choose File - Create New Data source.

Choose Web Server: arcgisrest for the Type.

Enter the connection string in the Source box. Click the ... button so in that next dialog you can press the Test button to see if the connection string works. If it cannot make a connection in that dialog, it's not going to work otherwise.

You don't say what the first link is supposed to be. Trying it in a browser gets a form (you can always try a connection link in a browser). I see King County has some sort of geo-fence in action, so their servers don't allow connections from foreign countries (I'm in Europe). I can connect using a browser that runs through a VPN that lands in the US, but not from France, so I can't help you with that.

The last two links when you try them in a browser report errors. If a browser can't connect, Manifold won't either.

To learn how to work with various connections, see theExample: Style Applied to an Image Server Image topic Try connecting to that server using step by step instructions in that topic.

The CSV Servers topic shows some more examples.

Get the ArcGIS_REST_Servers.map collection of web servers from the Product Downloads page, so you can see many examples of those.

The usual issues with servers is that they're not turned on, they want a login, they don't honor the standard (json is notoriously flaky and not geojson in many cases) and so on. And some just fall into the gray area of weird configurations, just another variation on loose quasi-standards.

drtees80 post(s)
#11-Jul-19 17:41

Thank you, Dmitri. I actually got one of the two geojson links to work. The two links that do not work, unfortunately, are the ones I really need to use. From what I am gathering on the responses to my question, the problem lies with King County and not with anything I am trying to accomplish. Makes some sense in that I could not get the data I wanted in any other format (shape files, kml, csv, etc.).

I like your take on the "loose quasi-standards" that are out there. Reminded me of the old (really old) adage about "IBM-compatible" computers. IBM compatible computers aren't and become less so as time goes by.

oeaulong

236 post(s)
#12-Jul-19 22:22

I tried these. Was able to connect to the ArcGIS rest server by using "https://gisdata.kingcounty.gov/arcgis/rest/services/OpenDataPortal/property__row_area/MapServer/"

as the server connect string. The results were the row_area image coming in and updating with zoom, the results looked blank though. If there was a specific area of interest and the server was only presenting below the visible zoom level then perhaps it is working. The zoomed area provided by the server is largeish so none of visible data was apparent.

The *_446.geojson link worked well and provided as advertised.

The *_436.geojson didn't seem available at all. I found the .json metadata for it and tried other ways of viewing (GoogleEarth KMZ, ArcGIS viewer) with no apparent data. I concur that this seems to be an issue with King Counties layer serviced. So it would also explain the no apparent data from the ArcREST link that seemed to connect ok.

dchall8
667 post(s)
#10-Jul-19 20:35

Looks like they don't update very often. Once you access the data I would store it locally rather than linking offsite. If they updated, say, every week, then maybe the link makes more sense.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.