Question

Force coordinates and cell sizes to be integer

  • 9 July 2019
  • 1 reply
  • 0 views

Badge

I have a workflow with some raster resampling and also some raster coercing (back to point data) and I end up having coordinates like this:

0684Q00000ArFJGQA3.png

 

Also, when I want to write a raster (using Aircom Enterprise writer) I get this warning.

Enterprise Plugin: Invalid raster cell size: 99.99999999888921 by 99.99999999339829

All my input coordinates and raster cell sizes are Integer numbers, so there must be some internal stuff going on that makes these numbers like this. I found this article: https://www.safe.com/blog/2018/09/fme2018-tolerance-evangelist179/

But I couldn't find out how to makes all coordinates integer. Any idea how this could be achieved?


1 reply

Badge +22

This looks like you encountered some floating point issues when coercing things back and forth.

 

The tolerance Mark talks about in the blog article will currently only work with vector geometries.

 

 

I haven't tried this but how about:

 

RasterExtractor to get the spacing and upper left coordinates.

 

AttributeRounder to round them to integers

 

RasterGeoreferencer (point and angle)

 

 

 

Reply