Question

Creating distance raster from vector lines

  • 28 August 2019
  • 6 replies
  • 28 views

Badge

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

Userlevel 5
Badge +25

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)

Badge +16

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

Badge

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.

Userlevel 5
Badge +25

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

Badge +3

 

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.(??)

 

 

Badge

 

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

Reply