[gdal-dev] gdal_rasterize 1.8.0 options
Marius Jigmond
mariusjigmond at hotmail.com
Fri Feb 4 15:23:14 EST 2011
Eli,
Both input datasets (mask and raster) exist, which is why 1. works.
Option 1 doesn't use any of version 1.8.0 flags, which is why I thought
something else was introduced behind the scenes with the new flags.
-marius
On Fri, 2011-02-04 at 12:08 -0800, Eli Adam wrote:
> Marius,
>
> I don't know about 1. but possibilities for 2. and 3 below.
>
> > Hi Everyone,
> >
> > Some of the options (I didn't test all) introduced with version 1.8.0
> > seem to behave strangely. Here's what I'm doing:
> > 1. gdal_rasterize -burn 0 -i -l mask mask.shp sample.tif
> > works fine but I get the following warning:
> > Warning : the output raster dataset and the input vector layer do not
> > have the same SRS.
> > Results might be incorrect (no on-the-fly reprojection of input data).
> > even though both inputs use the same projection, EPSG:3844.
> >
> > 2. gdal_rasterize -burn 0 -i -a_srs EPSG:3844 -l mask mask.shp
> > sample.tif
> > fails with: '-tr xres yes' or '-ts xsize ysize' is required.
> >
> > 3. gdal_rasterize -burn 0 -i -a_nodata 0 -l mask mask.shp sample.tif
> > fails with: '-tr xres yes' or '-ts xsize ysize' is required.
> >
> >>From http://www.gdal.org/gdal_rasterize.html it doesn't seem that -a_srs
> > or -a_nodata would require -tr or -ts. Am I doing something wrong?
>
> Does sample.tif exist? If not, the docs say you need to use -tr or -ts, "Since GDAL 1.8.0, the target GDAL file can be created by gdal_rasterize. One of -tr or -ts option must be used in that case." I don't know why that error would not also come from 1.
>
>
> Bests, Eli
>
> >
> > -marius
> >
>
>
>
More information about the gdal-dev
mailing list