I have a collection of coordinates which comes from a QGSGeometry object. The shape is a polygon.


qgsGeometry [[(75.2172,17.6566), (75.8499,17.9613), (75.5218,17.2113), (75.2172,17.4574), (75.2172,17.5277), (75.2172,17.6566)]]

How can I change the values of a raster file (geotif) only at the raster cells inside of the polygon (red line in screenshot)?

I know how to transform a raster and write or update with gdal it. But I don't know how to change values only at an given area like the inside of a polygon.

enter image description here

  • do they need to be fully contained? In other words, how is "inside" defined for you? And it doesn't even look like a polygon, so that needs fixing first. Then you could intersect and update there. – lynxlynxlynx Jan 9 '15 at 16:09

Your Answer

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

Browse other questions tagged or ask your own question.