joewdavies / geoblender

Tutorials for making 3D-looking maps with Blender and QGIS
1.54k stars 96 forks source link

Clarification about making a mask #3

Closed cpg closed 2 years ago

cpg commented 2 years ago

Great tutorial, thanks for posting it!

I ran into a little bit of trouble, being a noob and all, in the part about making a mask.

Step 1 mentions the options (value to burn, etc.), however, the first thing to select is the Input layer. There is nothing to select and I cannot seem to know (again, noob) what to do here. If I do not select anything and leave it blank, I get this when trying to run:

Wrong or missing parameter value: Input layer

I tried a couple of other things, like doing it from a new project (not having done the warp), etc., but nothing seems to help.

I tried 'select file' and use the same tiff file, however that crashes QGIS.

Edit: also, I should say that you specify "Step 1 : Rasterize vector polygon" and the options in the menu Raster > Convert are Polygonize and Rasterize. I chose Rasterize, though the word polygon in the step leads to the idea that perhaps there is some step missing or something.

Could you clarify what should be done in this area?

Related to this, perhaps add that the output data type is under the Advanced parameters (I can send you pull requests for a handful of extras like this, if you prefer).

joewdavies commented 2 years ago

Thanks for your feedback,

It appears that you are trying to rasterize...a raster, when in fact your input layer needs to be a file in vector format (the polygon you used to clip the DEM).

cpg commented 2 years ago

Thanks. I did not do any clipping. Looks like I need to figure out how to obtain a geographical/whatever mask. So far, downloading XML of a geographical area in OpenStreetMap and loading that does not appear to help. Learning how to do it ..

joewdavies commented 2 years ago

If your AOI is a country then you can get country polygons from natural earth data then in QGIS select your country > right click the layer > export> save selected features as > new shapefile or geopackage. Good luck!

cpg commented 2 years ago

Thanks so much. I was able to grasp things better about the polygon used as a mask[*].

I found and used the QuickOSM plugin for QGIS and with the details in this page, specifically the bit about using "Around", I was able to get three layers, one of which had the polygon of the the region I wanted and that worked well. Thanks!

For those noobs like me that may read this in the future, I used the bit about querying with key=boundary and value=administrative

[*] My need was a large region, which I was able to find in OSM (and eventually export as a .osm.pbf as well as a couple of other formats) however, importing them crashed the plugin/qgis.