Skip to main content
Question

Creating distance raster from vector lines

  • August 28, 2019
  • 6 replies
  • 218 views

Forum|alt.badge.img

I want to create a raster that shows the distance from each cell to the closest line in a set of polylines (a cable network). This is very easily done in e.g. QGIS, but I want to be able to do it in FME. I can't find any transformer that would allow me to do so.

The closest I come is to use a 2DGridReplacer - creating a regular grid of vector points, then a Neighborfinder, and the rasterize it. But that seems the long way round.... any ideas?

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.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3701 replies
  • August 28, 2019

That is what I would try first to be honest, but I suspect it would be a very time-intensive process.

I wonder if you could make a 3D surface out of it and then generate a DEM raster for that. The trick would be to get the correct slopes (and thus distances)


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • 1442 replies
  • August 28, 2019

Hi @tomvanderputte,

QGIS is using a GDAL script to create the proximity raster, you could look into integrating GDAL into your FME workflow to produce the proximity raster and continue in FME.

Itay


Forum|alt.badge.img
  • Author
  • 12 replies
  • August 30, 2019

Hi all, thanks for the replies. Good to know that I wasn't missing anything at least, allthough it would have been easier if there had been a transformer for it :).

Both are valid answers so I haven't selected one.


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3701 replies
  • August 30, 2019

Hi all, thanks for the replies. Good to know that I wasn't missing anything at least, allthough it would have been easier if there had been a transformer for it :).

Both are valid answers so I haven't selected one.

You can accept both answers ;)


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • August 30, 2019

 

Realy?

For instance if i advice you to use python and PIL, plus numpy, matplot (with standard fme install) and a relevant script grabbed from some math/algorithm site and using a pythoncaller.....i...am elligable for an accepted answer? ;)cool

 

Fme has never delivered us the GDAL caller,did they not promise us such?

 

And to boot not a gdal library for python in standard install.(??)

 

 


Forum|alt.badge.img
  • Author
  • 12 replies
  • August 30, 2019

 

Realy?

For instance if i advice you to use python and PIL, plus numpy, matplot (with standard fme install) and a relevant script grabbed from some math/algorithm site and using a pythoncaller.....i...am elligable for an accepted answer? ;)cool

 

Fme has never delivered us the GDAL caller,did they not promise us such?

 

And to boot not a gdal library for python in standard install.(??)

 

 

Yes these are all viable methods, however I was hoping to refrain from having to use external libraries :)