Skip to main content
Question

How to extract coordinates from json file and create geometry?

  • August 7, 2025
  • 2 replies
  • 53 views

emerson_styles
Contributor
Forum|alt.badge.img+4

I have a json file that holds coordinates in the following format:

 


How an I extract these coordinates to make the polygon that they form? I have tried reading the data through a text reader instead of a JSON reader and I have tried the JSONFragementor/JSONExtractor transformers but I can’t get the json query right, everything gets rejected.

Any ideas?​​​​​​​

2 replies

max_h
Supporter
Forum|alt.badge.img+19
  • Supporter
  • August 7, 2025

Try using a geojson reader, then fme should get the geometry directly and is able to display it.

 

Afterwards (if needed) you can use a CoordinateExtractor into AttributeExposer to get the Coordinates


geomancer
Evangelist
Forum|alt.badge.img+59
  • Evangelist
  • August 7, 2025

If the GeoJSON geometry is in an attribute, you can use the GeometryReplacer to turn it into real geometry.

But like max_h suggests, you can probably extract the geometries directly using GeoJSON in a JSON reader.