I'm currently working on a project that will have me calculate the kernel density of a number of shapefiles with varying parameters. My current workflow goes like this:

  • Import shapefiles in QGIS 2.10.1 from PostGIS 2.2.2
  • Run the Kernel density estimation command from the SAGA 2.1.2 toolbox
  • Vectorize the output with the r.to.vect command from the GRASS toolbox
  • Export the vector grid back to PostGIS for calculations

The problem is that the r.to.vect operation takes about 30-45 minutes per layer, and I will eventually be working with even larger files. Is there a way that I could obtain a vector grid directly instead of a raster? That would save me the useless raster-to-vector transformation. I could work with a solution in PostGIS, QGIS or even R.

  • GDAL's Polygonize (raster to vector) tool is pretty efficient at vectorizing. Perhaps you could try giving this a go? – Joseph May 16 '16 at 9:40
  • I'll give it a go and I'll see if it speeds up the process. – gablee May 17 '16 at 14:47
  • 1
    For anyone interested, I ended up importing my raster into PostGIS directly and vectorizing it with ST_DumpAsPolygons. – gablee Feb 8 '17 at 21:16
  • Thanks for getting back about your problem. Could you please post your comment as an answer and accept it by clicking the green-faded tick :) – Joseph Feb 9 '17 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.