[gdal-dev] gdal_rasterize usage problems

Frank Warmerdam warmerdam at pobox.com
Fri Nov 21 10:57:31 EST 2008


Andrew Brooks wrote:
> This is the reason why I am getting the problems which can be seen in the
> first image here:   http://www.sat.dundee.ac.uk/~arb/gdal-bugs/
> 
> The "reprojection" of the vectors using ogr2ogr is badly breaking them, so
> when I burn them using gdal_rasterize I get spurious lines overlaid (the
> smear images on the above page).

Andrew,

If you can provide the input gshhs_land dataset and the ogr2ogr commandline
you are using, I could investigate this.

> P.S. This probably won't solve the current problem but could gdal_rasterise
> be enhanced with something like this:
> 
>         poCT = OGRCreateCoordinateTransformation( hSrcSRS, hDstSRS );
> 
> and then
> 
>         hGeom = OGR_G_Clone( OGR_F_GetGeometryRef( hFeat )->transform( poCT ) );
> 
> or similar ?

Yes, something like this could be done.  But there would be need for a
condition where the OGRCreateCoordinateTransformation() fails, perhaps
just because of the common condition of the source or destination not
having properly set SRS information.   It might also be advisable to provide
additional commandline parameters to control the transformation.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list