0

I am trying to export polygon from raster.

I have 6 lat-lon coordinates. If I type in the CMD the following command I can export but in a square form:

gdalwarp -te x_min y_min x_max y_max input.tif output.tif

Is there a way to export a polygon using coordinates ?

Thanks

Yotam
  • 31
  • 3
  • What does `export` mean in this context? *Recognise*, *extract*? Write to some destination that part of the raster that's within a given polygon? – greybeard Feb 20 '19 at 21:41
  • extract. Create a smaller image depending on the coordinates – Yotam Feb 20 '19 at 21:55
  • Anyone know.. ? – Yotam Feb 21 '19 at 07:27
  • The resulting raster will of course always be rectangular. Have you seen this answer: https://stackoverflow.com/questions/23769531/gtiff-mask-with-shapefile-in-python-with-gdal-ogr-etc/23950892#23950892 These days the use of `subprocess` can be avoided by using `gdal.Warp` – Rutger Kassies Feb 21 '19 at 08:15

0 Answers0