Skip to main content
Question

Best way to round/trim point geometry? CoordinateExtractor > AttributeRounder > GeometryReplacer?


tim_wood
Contributor
Forum|alt.badge.img+8

I know there's always about 10 different ways to do things in FME, so is there a better way than this to trim the geometry of a point?

CoordinateExtractor (to _x and _y attributes)

AttributeRounder (_x and _y to 3 decimal places using Nearest method)

GeometryReplacer (OGC Well Known Text Geometry Encoding, POINT (@Value(_x) @Value(_y)) Geometry Source)

5 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • January 23, 2017

Have a look at the CoordinateRounder

No need to extract the coordinates first.


david_r
Celebrity
  • January 23, 2017

Agree with erik_jan about the CoordinateRounder. Alternatively, if you're going to write your data to an ESRI database (ArcSDE, File Geodatabase, etc), consider looking into the ArcSDEGridSnapper as well.

Extracting coordinates is guaranteed to slow down your workspace by quite a lot, so try to avoid it as much as possible.


tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • January 24, 2017
erik_jan wrote:

Have a look at the CoordinateRounder

No need to extract the coordinates first.

Brilliant - thank you.

 

For info, I subsequently noticed the coordinates are in the data as attributes, already rounded. However a comparison of using GeometryReplacer with those existing attribute values vs CoordinateRounder shows that CoordinateRounder is about a minute faster for 320,000 records.

 


tim_wood
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • January 24, 2017
david_r wrote:

Agree with erik_jan about the CoordinateRounder. Alternatively, if you're going to write your data to an ESRI database (ArcSDE, File Geodatabase, etc), consider looking into the ArcSDEGridSnapper as well.

Extracting coordinates is guaranteed to slow down your workspace by quite a lot, so try to avoid it as much as possible.

Thanks - that's useful to know. We have had instances (before we had FME) where we'd run a Check/Repair Geometry in ArcGIS, load into ArcSDE, export, Check Geometry and find errors again. Even if we don't use the ArcSDEGridSnapper, that page is a useful resource on loading data into ArcSDE.

 

 


david_r
Celebrity
  • January 24, 2017
tim_wood wrote:
Thanks - that's useful to know. We have had instances (before we had FME) where we'd run a Check/Repair Geometry in ArcGIS, load into ArcSDE, export, Check Geometry and find errors again. Even if we don't use the ArcSDEGridSnapper, that page is a useful resource on loading data into ArcSDE.

 

 

Yes, that is exactly the use case for the ArcSDEGridSnapper, very handy when validating data on its way to an SDE storage.

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings