Preparing my custom shp file for use as LULC in InVEST

Description

I am using QGIS

I have made (what I think is) a beautiful .shp file for my study site. There are houses and streets and various kinds of parkland are all delineated as polygons, and with associated attributes in the attribute table. I have 31 landuse types in my map.

My big plan is to:
a. export the attribute table, and add usle_c and usle_p to the .csv as my biophysical table (this I can do, copy-paste out the table to excel, and add the usle_c and usle_p columns, save as .csv)
b. create a raster of the map information so I can use it as my Land Use/Land Cover raster

and then run my wonderful SDR model.

I am having trouble exporting the raster to a format that is any good to me - I have tried
Project > Import/Export > Export map to image (then select .tiff)
Project > New Print Layout (add map) > save map as image

In both cases, I end up with a raster that has more like 255 colours (instead of 31) and so I guess either my workflow philosophy above is incorrect, or I am exporting my map incorrectly, or something else that I don’t know that I am doing wrongly.

I understand this is more like a general-purpose GIS question than an InVEST problem, but I thought you might be able to help this newbie save the world through the powers of GIS.

The .shp file is zipped here, and is 15mb, in case you want to see it.

Thanks in advance,

mat

Hi @gismat , sounds like a good plan overall. I think what you want is to “rasterize” your shapefile. In QGIS, find the following menu:

Raster > Conversion > Rastertize . Then the “burn-in” field should be a field from the shapefile’s attribute table with a landuse code integer.

Good luck,

1 Like

you’re a genius.

Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.