Hi Eli Probably I was not clear: When I use this it outputs a geotiff with two bands: 1 with the real data and another one with the mask of the pixels that fall inside each polygon. I just want to have an output file with one band (band 1) and without the mask. Is it possible? Thanks Luis
On Thu, Sep 6, 2012 at 4:50 AM, Eli Adam <[email protected]> wrote: > Luis, > > On Wed, Sep 5, 2012 at 3:00 AM, Luis Lisboa <[email protected]> > wrote: > > Thank you Chitanya. > > But it created an output file with two layers (one with the values from > > original file and another with a 255 for the pixels thar are inside KMZ > > file: How can I have produce one layer? > > I may be thinking of something else based on your description. If you > got an output that has the original values in the area of the kmz and > an alpha mask band over the other areas I think that would be > expected. You can also use -crop_to_cutline to remove that 'extra' > data. > > If that isn't what you are talking about, you may want to use ogr2ogr > to convert your kmz to a shapefile in the same projection as your > input raster and see if it gives you a better result. > > Bests, Eli > > > > Thanks > > Luis > > On Mon, Sep 3, 2012 at 5:10 PM, Chaitanya kumar CH < > [email protected]> > > wrote: > >> > >> Luis, > >> > >> gdalwarp has some options for this exact purpose. > >> The cutline can be from any of the OGR readable datasource. > >> > >> http://www.gdal.org/gdalwarp.html > >> > >> On Mon, Sep 3, 2012 at 9:34 PM, Luis Lisboa <[email protected]> > >> wrote: > >>> > >>> Greetings > >>> I have a raster file (Geotiff) and I have a KML file with a polygon > and I > >>> want to cut raster map to only have valid values inside the polygon. > How can > >>> I do this using just GDAL? > >>> > >>> Usually I used to cut geotiff file with gdalwarp and but in those > cases I > >>> was cutting a square (xmin xmax ymin ymax) and in this case is a more > >>> complex polygon > >>> > >>> Thanks > >>> Regards, > >>> Luis > >>> > >>> _______________________________________________ > >>> gdal-dev mailing list > >>> [email protected] > >>> http://lists.osgeo.org/mailman/listinfo/gdal-dev > >> > >> > >> > >> > >> -- > >> Best regards, > >> Chaitanya kumar CH. > >> > >> +91-9494447584 > >> 17.2416N 80.1426E > > > > > > > > _______________________________________________ > > gdal-dev mailing list > > [email protected] > > http://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
