FME Version
Introduction
The ArcGIS Online (AGOL) GeoEnrichment service finds demographic information and other location facts for places around the world. Check out some of the other ArcGIS Online custom transformers here: Getting Started with ArcGIS Online Custom Transformers.
What is ArcGIS Online?
ArcGIS Online is Esri’s cloud-based mapping software that lets you build interactive web maps. They provide analysis tools, such as the GeoEnrichment Service, to gain location intelligence. ArcGIS Online enables you to work effectively across your organization by collaboratively building and using maps that you can share within your organization or publicly.
Parameters of the ArcGISOnlineGeoenricher Custom Transformer
The ArcGISOnlineGeoenricher custom transformer accepts points and polygons as its input. Uses ArcGIS Online web connection; either as a token, basic, or web authentication.
Requirements
- ArcGIS Online Account with available credits
Step-by-Step Instructions
1. Create a Workspace
Open FME Workbench and select Blank workspace to begin building your workflow on an empty canvas.
2. Start Your Workflow
Either read in your data using a reader or a FeatureReader, or create your own data in the workspace directly. We will be creating our data within FME using the GeometryReplacer in conjunction with the Creator. Skip this step if you are using your own data that is prepared with point geometry.
Add a Creator to the canvas, then connect a GeometryReplacer. In the GeometryReplacer parameters, set the Geometry Encoding to GeoJSON, then for Geometry Source, paste in the following:
{"type":"Point","coordinates":[-123.117428,49.279904]}
Next, add a CoordinateSystemSetter to the canvas and connect it to the GeometryReplacer. In the parameters, set the CoordinateSystem to LL84.
3. Add the ArcGISOnlineGeoenricher
Add an ArcGISOnlineGeoenricher custom transformer to the canvas and connect it to the CoordinateSystemSetter. Make sure that the parameters section retains the default values to return all outputs: you may select as many “Enrichment Data Collections” as you would like. We’ll fill in the Authentication section in the next step. For more details on the parameters of the GeoEnrichment Service, see the Esri documentation.
4. Using the ArcGIS Online API
There are three types of authentications available for this custom transformer: token, basic, and web connection. We suggest using the web connection for this example. In the Authentication section, set the “Authentication Type” to Web Connection and then select “Add Web Connection” from the drop-down of the AGOL Web Connection.
Then give the connection a name and select “Authenticate” at the bottom. This will bring you to the authentication web connection page and prompt you for your username and password. This is needed because this service requires credits to complete the process. Once authenticated, click OK to close the ArcGISOnlineGeoenricher.
5. Run the Workspace and View the Output
Run the workspace with Feature Caching Enabled, then view the output in Visual Preview. You will have two outputs from the ArcGISOnlineGeoenricher custom transformer:
- Output: provides facilityID (for multiple points), Area Type, Buffer Size, Coordinate System, JSON (raw from the output), and any other attributes you started with.
- <Rejected>: Input features are output via this port if the API calls fail. Any error message is stored in the fme_rejection_message attribute.
Note: all information from the “Enrichment Data Collection” can be found as a list in the “Feature Information” tab and can be exposed as attributes by either adding an AttributeManager or AttributeExposer to the canvas and connecting it to the output.
Final Workspace
Comments
0 comments
Please sign in to leave a comment.