Get Geometry from Feature Layer ?

870
2
03-13-2023 02:39 PM
ahargreaves_FW
Occasional Contributor III

Hey @SeanKMcGinnis 

I'm struggling to obtain the Lat/Long as decimal degrees from my features despite them being available in the JSON. Here's my issue:

  • Feature Service1 in AGOL is in Spatial Reference: 3857 (WGS84 Web Mercator (Auxiliary Sphere)). The unit is set to display Meters.
  • Feature Service2 in AGOL also in Spatial Reference: 3857 (WGS84 Web Mercator (Auxiliary Sphere)). The unit is set to display Meters.
  • Using ArcGIS for Power Automate for each new record in FS1 I wish to create a new record in FS2. 
  • I set the geometry for the new feature in FS2 to be the geometry from the latest feature in FS1.
  • The geometry for FS1 gets recorded in AGOL as 3857. This is shown in the 'Extent' values for the feature service:

ahargreaves_FW_0-1679065150158.png

  • Using the dynamic content functions within ArcGIS for MS Power Automate Connector to pull 'lat' or 'long' values for FS1 or 2 I'm getting Meters values back. This may be expected behaviour, but...
  • If I query the (geo)JSON and obtain the full feature, not just what the ArcGIS for MS Power Automate Connector returns, I can see that the feature's coordinates as recorded in AGOL are listed in Decimal Degrees:
2023-03-14_10-11-49.png

 

 Therefore: 
  1. Is it expected behaviour that using the dynamic content functions within ArcGIS for MS Power Automate Connector to pull 'lat' or 'long' values returns them in the units specified within the feature service?
  2. How do I actually get the values used by AGOL (decimal degrees) using the ArcGIS for MS Power Automate Connector to pull 'lat' or 'long' functions? I'm presently having to query the whole features geoJSON and parse out the {coordinates} shown above.

 

0 Kudos
2 Replies
RudolfdeMunnik
New Contributor III

Hi @ahargreaves_FW,

Firstly - Thank you @SeanKMcGinnis for your procedure and assistance.

I recently posted detailed procedures to your question. The procedures include the detailed procedure from @SeanKMcGinnis. Please find the link to the post below "Shape in Geojson"

https://community.esri.com/t5/arcgis-for-power-bi-questions/shape-in-geojson/m-p/1247011#M1408

Thank you @SeanKMcGinnis.

In the same post i also provide the procedure by using the REST API without Power Automate, please have a look.

https://community.esri.com/t5/arcgis-for-power-bi-questions/shape-in-geojson/m-p/1265256/highlight/t...

@ahargreaves_FWLet me know if this helped.

Regards

Rudolf

0 Kudos
ahargreaves_FW
Occasional Contributor III

Thanks @RudolfdeMunnik I tried the "Get Data from Feature" tool using the below flow:

  • Detect new features in FS1
  • Fetch those features
  • For each new feature "get data from feature" (including the geometry)

 

 

ahargreaves_FW_0-1679077708547.png

However, the raw output from the "get data from feature" still returns geometry as Meters. In my mind the dynamic content 'geometry', 'Lat' or 'Lon' should be in WKID 3857 decimal degrees as recorded in AGOL.

ahargreaves_FW_1-1679077802752.png

 

 

 

0 Kudos