FME Version
As of FME 2024.0, support for Esri ArcGIS Online (AGOL), ArcGIS Enterprise Portal, and ArcGIS Server Feature Services has transitioned to a unified approach using the new Esri ArcGIS Feature Service (Connector). This connector replaces the legacy reader/writer formats for each of the three services and also includes key transformers such as the ArcGISOnlineConnector, ArcGISAttachmentConnector, and ArcGISBranchVersionManager.
Starting in FME 2026.0, the legacy formats will be hidden in the Quick Add menu. Instead, equivalent functionality is now provided by the downloadable Esri ArcGIS Connector package, available on FME Hub. The package can be installed directly through the Quick Add menu in FME Workbench, and once installed, the connector will appear in the Gallery as a unified interface for interacting with all three types of Esri ArcGIS Feature Services.
For details on this transition, including guidance on updating existing workspaces, please refer to the article: Working with Esri ArcGIS Feature Services in FME.
Introduction
The ArcGIS Online (AGOL) Service Area Calculator is used to find the area that can be reached from the input location within a given travel time or travel distance. 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. It also provides analysis tools, such as the Service Area Calculator, 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 ArcGISOnlineServiceAreaCalculator Custom Transformer
The ArcGISOnlineServiceAreaCalculatorcustom transformer accepts points and multi-points as its input. It uses an ArcGIS Online web connection and must specify an ArcGIS Online Server.
Requirements
- ArcGIS Online Account with available credits
Step-by-Step Instructions
We will cover two types of inputs (single and multi-point) and their output values. Although they are similar, their outputs can look drastically different.
Part 1: Single Point Features
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 ArcGISOnlineServiceAreaCalculator
Add an ArcGISOnlineServiceAreaCalculator custom transformer to the canvas and connect it to the CoordinateSystemSetter. Make sure that the ArcGIS Online Parameters section retains the default values to return all outputs, and we’ll fill in the Authentication section in the next step. For more details on the parameters of the Service Area Calculator see the Esri documentation.
4. Using the ArcGIS Online API
This custom transformer supports three types of authentication: 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 menu 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 ArcGISOnlineServiceAreaCalculator.
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 three outputs from the ArcGISOnlineServiceAreaCalculator transformer:
- Facilities: retaining original geometry and counting features tagged with their corresponding FacilityID.
- Service_Areas: provides FacilitiesID, Name, FromBreak, and ToBreak.
- <Rejected>: Input features are output via this port if the API calls fail. Any error message is stored in the fme_rejection_message attribute.
Final Workspace
Part 2: Multi-Point Features
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 multi-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]}
Duplicate the GeometryReplacer four (or more) times, connecting them to the Creator, then paste in the following for Geometry Source:
GeometryReplacer_2
{"type":"Point","coordinates":[-123.103609,49.265511]}
GeometryReplacer_3
{"type":"Point","coordinates":[-123.102751,49.281192]}
GeometryReplacer_4
{"type":"Point","coordinates":[-123.088846,49.277496]}
Next, add a CoordinateSystemSetter to the canvas and connect it to the GeometryReplacer. In the parameters, set the CoordinateSystem to LL84. Repeat this step for each point.
3. Add the Aggregator
This step is optional and only to prove that the custom transformer can input multi-point features. Read the documentation for more information.
By adding the Aggregate transformer, the point features will be combined into a single multi-point feature. In the parameters, change the accumulation mode to “Merge Incoming Attributes.”
4. Add the ArcGISOnlineServiceAreaCalculator
Add an ArcGISOnlineServiceAreaCalculator custom transformer to the canvas and connect it to the CoordinateSystemSetter. Make sure that the ArcGIS Online Parameters section retains the default values to return all outputs. In the next step, we’ll fill in the Authentication section. For more details on the parameters of the Service Area Calculator, see the Esri documentation.
5. Using the ArcGIS Online API
Three types of authentications are 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 ArcGISOnlineServiceAreaCalculator.
6. Run the Workspace and View the Output
Run the workspace with Feature Caching Enabled, then view the output in Visual Preview. You will have three outputs from the ArcGISOnlineServiceAreaCalculator transformer:
- Facilities: retaining original geometry and counting features tagged with their corresponding FacilityID.
- Service_Areas: provides FacilitiesID, Name, FromBreak, and ToBreak.
- <Rejected>: Input features are output via this port if the API calls fail. Any error message is stored in the fme_rejection_message attribute.
Final Workspace
Comments
0 comments
Please sign in to leave a comment.