Converting shapefiles to rasters best practice

2180
2
01-11-2022 09:48 AM
GISCoffee
New Contributor II

I have a set of manmade shapefiles which label land classes for a single satellite image. Some of the shapefile labels were created by a GIS expert, others were created by citizen scientists. I would like to compare how well the different citizen scientists classify the satellite image. 

In order to compare the accuracy, I will convert the manmade shapefiles to rasters and do a pixel by pixel comparison of the citizen scientist's and expert's land class rasters.

My planned workflow is:

1. Convert each land class shapefile to a raster. Make sure output land class raster's pixel size is the same as the underlying satellite image (e.g., if a 15 m resolution satellite image has been labelled with shapefiles, ensure the pixel size is 15 m when converting the shapefile).

2. When converting the shapefiles to rasters, overlaps will occur at the boundaries of the newly created rasters. To remove these overlapping pixels, merge the rasters into a single raster using Mosaic to New Raster.  (For example, if the satellite image has 4 rasters for each land class, then combine those 4 rasters into a single raster. Do this for each labeller).

3. Compare the merge expert raster and the citizen scientist rasters.

My question is what is the best way of ensuring alignment between rasters in this use case scenario (I'm aware of snapping to environment I'm just not sure how best to apply it for this context)? Perhaps there is a best practise when converting shapefiles to rasters for such practises.

2 Replies
DanPatterson
MVP Esteemed Contributor

If there are only minimal attributes being collected in the shapefile, my first inclination would to do a Union of them first, setting the symbology to a hollow fill so I could examine the boundary issues.

One could then examine the table records to see which rows contained the same data and delineate those polygons as being "good" and the rest requiring some attention.  You may find in a collection of 10 shapefiles you may have 9/10 as good and 1 not so good,  From there you could examine whether citizen X was good overall or had some spatial issues with their data collection.

After the vector analysis, you could proceed to a raster if needed or for supplementary analysis


... sort of retired...
curtvprice
MVP Esteemed Contributor

Before running Feature To Raster or Polygon To Raster (note these two tools do the same thing but Polygon To Raster has some additional options) on the shapefiles, set the snap environment and cell size environment (Analysis > Environment)  to match the image raster. Then your rasters will line up.

Note the merge will only work if your polygon labels used to rasterize are numeric codes. if they are text, you can't easily merge the rasters. If they are text codes you should convert them on the polygons to a new integer field, and specify that new field to use for the poly to raster conversion.

If you have overlaps between your tiles, the Mosaic To New Raster will apply codes based on the rule you specify, you probably want to use FIRST as you don't want to average polygon codes.

Hope this helps!

0 Kudos