2

I have a shapefile I brought into QGIS with a lot of point data. One of the data layers represents an integer value that is assigned to each position.

enter image description here

I am attempting to create a raster map of the data but I don't want the interpolation process to calculate non-integer values. I simply want it to fill in the spaces as "1", "2", etc. and change basically where they meet.

Eventually I want to create a Contour map that shows these different zones. The only way I know how to do that currently is to create a raster first and then convert. If there is another way to do that, I'd be happy to try that instead.

Is there any way to automate this process or do I have to draw these polygons manually?

  • I've been searching around the internet and this site for more ideas and found the following link: gis.stackexchange.com/questions/39205/…. I've tried running the Voronoi Polygon tool, but the status bar gets to 3% and then seems to quit. I've waited 15 to 20 minutes for it to move on, but it doesn't. Is there a maximum number of points that tool will work with? This data set I'm trying to process has 18,000 points. I suspect that is a bit more than is expected. – Jason Steffen Jun 3 '16 at 21:06
2

You might want to try "Convex Hull" on all the points to create a polygon over the whole area. Then repeat just around the local areas. Then with some digitizing either clip/intersect/ring until you have two polygons that fit nicely together. I'm not sure if this part is necessary but with the local areas use "Singleparts to Multipart" so that only have one polygon. Then "Merge" the two shapefiles. Define the attributes so one area has '0' and the other has '1'. Then you can do as Josh K suggests and use Rasterize. This is how I normally do it.

2

Well it isn't pretty, but I was able to put together a string of procedures to do this. I used the Buffer feature instead of the Voronoi Polygon tool. This procedure gave me a bunch of curved lines (from the buffer circles). I would have like to see what I would have gotten back if I could have made the Voronoi Polygon tool work but that kept stopping at 3% complete and would not go any further. Anyway, here is what I had to do.

1) I first ran the Vector/Geoprocessing Tools/Buffers... tool. I used the measure tool to get the approximate distance between the points and found it to be around 9.3 meters. I used a Buffer distance of 4.7. This gave me the following map. enter image description here

2) I then ran the Vector/Geoprocessing Tools/Dissolve... tool. I used the Buffer layer I just created as the input vector layer. I used the layer with the integers I wanted as the Dissolve field and created a new layer. This created the polygons I wanted around the various integer values as shown in the following map.

enter image description here

3) I then just needed to clean things up around the Field Boundary. To do this I ran the Vector/Geoprocessing Tools/Clip tool. I selected the polygons I just created and uses the Boundary to clip it. This got me to my solution as shown:

enter image description here

4) My goal was to create a Contour map so this got me to where I wanted. However, if I did want to rasterize it, I can use the Raster/Conversions/Rasterize tool to convert it. I then would use the Raster/Extraction/Clipper tool to clip the output to the Field Boundary again.

5) Eventually I was able to add the Legend for each soil type and get the map I wanted.

enter image description here

The boundaries are a bit rough, but it will work for now. If anyone has a way to do this and smooth the boundary lines more, I'd greatly appreciate some suggestions.

Thanks

1

If the data is as regular as it looks, instead of interpolating it, have you tried just converting the shapefile to raster (QGIS-Raster/Conversion/Rasterize) based upon the integer attribute (just setting the spacing between points as the resolution)?

  • I've given this a try, but it doesn't seem to work. I think it is because it appears this tool is expecting a Shape file with data from polygons and then converts that to a Raster. I don't think it works when the data in the shape file is actually point data. It came close though as I can see the general change in shapes for each area, but the data has a lot of small gaps – Jason Steffen Jun 3 '16 at 6:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.