Skip to main content
Question

Force coordinates and cell sizes to be integer

  • July 9, 2019
  • 1 reply
  • 11 views

Forum|alt.badge.img

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?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • July 9, 2019

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)