1

I am trying to trim/clip a DEM with a shapefile layer. I read somewhere that the GDAL should be able to get the job done, but can't seem to get it to work.

I have a raster layer and a shapefile layer, then using the "clip raster by extent" where the extent is generated from the shapefile layer.

The red square is the cutting line, and the black and white background is the DEM maps which I want to cut/trim

The red square is the cutting line, and the black and white background is the maps which I want to cut/trim

This is the input into the dialogue

enter image description here

The elevation data needs to be kept as the map will later be used to create a 3D model of the area.

  • What error message do you get? – ArMoraer Sep 18 '17 at 13:01
  • 4
    I see that your path has non-english characters. Try saving the DSM in a new location without ø, and then run the clip – HDunn Sep 18 '17 at 13:11
  • @AndreSilva while the answer to the question may be a duplicate, the question you linked is not a duplicate. This question is asking about clipping a raster while the other is asking about converting raster to polygons. Please consider adding an answer to this question - use only ASCII characters in the raster file name and see if that solves OPs question. – jbalk Sep 20 '17 at 0:33
  • @jbalk, gis.stackexchange.com/questions/10117/…. – Andre Silva Sep 20 '17 at 0:37
1

There is a related question/answer here: QGIS polygonize error 4 "file does not exist in the file system"?

The answer to your question is that you need to use only ASCII characters in the raster file name.

Non-ASCII characters in the file name aren't recognized and are removed when you try to process them.

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.