[gdal-dev] gdal_rasterize 1.8.0 options

Even Rouault even.rouault at mines-paris.org
Sat Feb 19 18:38:39 EST 2011


Le dimanche 20 février 2011 00:24:16, Marius Jigmond a écrit :
> 
> Is the disconnect simply a reporting issue and reprojections are handled
> properly behind the scenes when using this EPSG code? It seems that what
> gdalinfo reports is in accordance to
> http://spatialreference.org/ref/epsg/3844/html/ .

Marius,

The .prj file of shapefiles stores WKT in ESRI WKT, not OGC WKT. 
http://trac.osgeo.org/gdal/changeset/21627 (which is a fix not found in 1.8.0) 
translates the ESRI "Stereographic" into the OGC "Oblique_Stereographic", to 
be consistant with what is done in the reverse transformation

> 
> -marius
> 
> On Sat, 2011-02-05 at 00:06 +0100, Even Rouault wrote:
> > Le vendredi 04 février 2011 20:25:43, Marius Jigmond a écrit :
> > > 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.
> > 
> > Unrelated with GDAL 1.8.0. The issue was that the transformation between
> > OGC WKT and ESRI WKT didn't handle well the Oblique Stereographic
> > projection. Fixed in trunk in http://trac.osgeo.org/gdal/changeset/21627
> > 
> > > 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?
> > 
> > When those 2 new options are used, they imply creating a new dataset. So
> > they actually need to be used with -tr or -ts option.
> > 
> > > -marius
> > > 
> > > _______________________________________________
> > > gdal-dev mailing list
> > > gdal-dev at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list