I have GeoTiff image which contains latitude and longitude for each pixel instead of x,y coordinates.
My task is to crop this image on provided polygon by user. Currently I am trying GDAL for same, but didn't found perfect solution.
I have GeoTiff image which contains latitude and longitude for each pixel instead of x,y coordinates.
My task is to crop this image on provided polygon by user. Currently I am trying GDAL for same, but didn't found perfect solution.
to crop or clip particular part from raster image use gdal libraries with either geojson or shape file. You need gdal-bin to clip/crop raster image. Use gdalwarp
with -of
parameter to specify output format(default GTiff-geotiff), pass your geojson path, your raster image path, path where you want to store output. Complete command looks like
gdalwarp -of GTiff -crop_to_cutline -cutline #.geojson #.tif #.tif