Skip to main content

Hi I created a workspace to evaluate if a point is inside a polygon, the workspace looks:

The first input is an Esri ArcGIS Server Feature Service I'm loading the polygons from a Feature service, the second input is a csv file with a list of points. The workspace is working as expected, PointOnAreaOverlayer is detecting is the points are inside any polygon.

Now, my goal is to sent the points from another application to the workflow (can be to a rest endpoint) and call another rest endpoint if the point is inside any polygon, additionally, I want to keep in memory the polygon list (loaded from an external arcgis feature service) and refresh the geofences list periodically (The geofences changes time to time).

[More information]

Basically we need:

  1. A way to send features from an external application, We have an AVL application that receive vehicle data we can forward each message receive by vehicles to FME (about 500 messages per second)
  2. We need to evaluate for every single message if the vehicle is inside a polygon (geofence), the geofences list goes from arcgis feature service and can be a lot of features (about 20k) and each 30minutes the feature list change, there is a way to manitaing in memory (or cache) these features and no call the arcgis server for each workflow execution?

How can I acomplish this requirement?, I have FME Desktop and Server.....

Thanks.

You can access REST endpoints inside a workspace using the HTTPCaller.

I'm not sure what you mean by keep in memory the polygon list, is that during the translation, or between translations?


You can access REST endpoints inside a workspace using the HTTPCaller.

I'm not sure what you mean by keep in memory the polygon list, is that during the translation, or between translations?

Hi,

 

 

I will use HTTPCaller in the output when a point is inside any Geofence, this is one part of the problem. There are few things to solve:

 

 

  1. How can I send the points to evaluate to the workflow? There is a way to expose an api to send the points in json format? Currently I'm loading a File, but in real life the data is on external datasource.
  2. The ArcGIS feature service returns geofences depending of the time its called, some times returns about 20k geofences, I do not want to call this service for each point I need to evaluate (about 10 per seconds), I need to keep the data (Geofences) in memory and evaluate every single point I sent to the workflow, as I said, the geofence data is variable, so, I also need a way to call the ArcGIS server and refresh the geofences each x minutes.

 

 


Hi,

 

 

I will use HTTPCaller in the output when a point is inside any Geofence, this is one part of the problem. There are few things to solve:

 

 

  1. How can I send the points to evaluate to the workflow? There is a way to expose an api to send the points in json format? Currently I'm loading a File, but in real life the data is on external datasource.
  2. The ArcGIS feature service returns geofences depending of the time its called, some times returns about 20k geofences, I do not want to call this service for each point I need to evaluate (about 10 per seconds), I need to keep the data (Geofences) in memory and evaluate every single point I sent to the workflow, as I said, the geofence data is variable, so, I also need a way to call the ArcGIS server and refresh the geofences each x minutes.

 

 

1. If you're using a JSON reader, you can set the input parameter to the api endpoint, rather than a local file, otherwise you can use a creator to trigger the workspace, and have that connected to an HTTPCaller to get the json points.

 

 

2. As far as I am aware the Esri ArcGIS Server Feature Service does not allow for caching. How long does it take to run your full workspace? What happens when the FeatureService refreshes? Ie if a point was analysed to be inside a polygon, but that polygon no longer exists after the refresh, is that point still treated as inside?
1. If you're using a JSON reader, you can set the input parameter to the api endpoint, rather than a local file, otherwise you can use a creator to trigger the workspace, and have that connected to an HTTPCaller to get the json points.

 

 

2. As far as I am aware the Esri ArcGIS Server Feature Service does not allow for caching. How long does it take to run your full workspace? What happens when the FeatureService refreshes? Ie if a point was analysed to be inside a polygon, but that polygon no longer exists after the refresh, is that point still treated as inside?
First of all, Thanks for your help:

 

 

  1. Do you have documentation or a simple example to look at? a simple workflow to receive a json o json array that can be exposed in FME server and the test url to call.
  2. To load all geofences is taking about 30 seconds, so would be great to keep in memory and refresh the data set each x minutes, when the feature refreshes the data received could be different to the data in the previous call so, the points shoul be treated as inside only with the latest data.

 

 

 


First of all, Thanks for your help:

 

 

  1. Do you have documentation or a simple example to look at? a simple workflow to receive a json o json array that can be exposed in FME server and the test url to call.
  2. To load all geofences is taking about 30 seconds, so would be great to keep in memory and refresh the data set each x minutes, when the feature refreshes the data received could be different to the data in the previous call so, the points shoul be treated as inside only with the latest data.

 

 

 

for 1, I suggest you query your api and save the results to a JSON file. Set up your FME workspace using a JSON reader and the sample file. Once you have the JSON processing (Extracting/fragmenting etc) working, replace the source parameter from the JSON reader to point to the api rest endpoint instead of the local file.

 

 

For 2, I'm still not understanding why you would want to refresh your data mid translation as opposed to fetching it at the start of the workspace (ie same time as you get your json points).

 

 


1. If you're using a JSON reader, you can set the input parameter to the api endpoint, rather than a local file, otherwise you can use a creator to trigger the workspace, and have that connected to an HTTPCaller to get the json points.

 

 

2. As far as I am aware the Esri ArcGIS Server Feature Service does not allow for caching. How long does it take to run your full workspace? What happens when the FeatureService refreshes? Ie if a point was analysed to be inside a polygon, but that polygon no longer exists after the refresh, is that point still treated as inside?
Hi, The load from the feature service takes about 30 seconds, I do not wat each time the workspace runs to wait, I want to store in memory the result and create a temporary cache...

 

 


Reply