Skip to main content
Question

Creating distance raster from vector lines


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?

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

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+17
  • Supporter
  • 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

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+49
tomvanderputte wrote:

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
  • 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
gio wrote:

 

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 :)

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