-
Notifications
You must be signed in to change notification settings - Fork 5
Importing Data from an ArcGIS Feature Server
Some parks choose to publish ArcGIS services (Feature Server) of data for consumption into NPS Places. When then send you a bizarre link, here's how to get the data:
A regional GIS coordinator sends you this link:
http://inppwcagis01:6080/arcgis/rest/services/PWR/PWR_NPS_PointsOfInterest/FeatureServer
To view this POI data in QGIS, add a vector layer (Source Type: Protocol; Type: GeoJSON) using this url:
http://inppwcagis01:6080/arcgis/rest/services/PWR/PWR_NPS_PointsOfInterest/FeatureServer/0/query?where=1+%3D+1&outfields=*&f=json
Save it locally as a shapefile and you're off to the races.
To drill down to the actual data, you'll need to go one more level deep by clicking on the actual layer under the Layers heading on this page. In this case, the layer is PWR.DBO.VISITOR_PointsOfInterest_NPS_pt
. Clicking on it will bring you to this page:
http://inppwcagis01:6080/arcgis/rest/services/PWR/PWR_NPS_PointsOfInterest/FeatureServer/0
Note the /0
in the url – that means you're looking at the 0th layer.
Now scroll to the bottom of the screen and click on the Query
link under Supported Operations. This brings you to this page:
http://inppwcagis01:6080/arcgis/rest/services/PWR/PWR_NPS_PointsOfInterest/FeatureServer/0/query
To get what we need out of this page we need to enter the following:
-
Where:
1=1
*** -
Out Fields:
*
-
Format:
JSON
*** Entering 1=1
may seem unnecessary, but it isn't – you must enter some statement that evaluates to true here, and for some horrible reason, you can't just write true
or 1
. If you want to use this field to query by unit code, enter something like this: UNITCODE='YOSE'
Entering the above will generate an unnecessarily large link to make the request. If you pair it down to the essentials, this is all you need:
http://inppwcagis01:6080/arcgis/rest/services/PWR/PWR_NPS_PointsOfInterest/FeatureServer/0/query?where=1+%3D+1&outfields=*&f=json
Here are a couple things to keep an eye on for troubleshooting:
- MaxRecordCount: These service requests can be limited to a certain number of records. Keep an eye on this so we can ask a park to increase or remove this limit if it's making life too difficult.
-
Add Port Number: To successfully import esri JSON into QGIS, we seem to need a port number (
:6080
) in the URL of our link. This means that URL's like thishttp://insideimrgis.nps.gov/arcgis/rest/services/
should be modified to look like this:http://insideimrgis.nps.gov:6080/arcgis/rest/services/
.
Once you have the link above, importing in QGIS is pretty simple. Click the button to add a vector layer, and in the dialog box, switch the Source type to Protocol. Then make sure that Type is set to GeoJSON and enter the URL into the appropriate box. The services may be a little slow, so give it a minute to load your data.
Once the data is loaded as a QGIS layer, you can easily save a shapefile locally and get to work filtering through the fields to organize what you need for seeding.