OGR Reprojection Features

Frank Warmerdam warmerdam at p...
Fri Sep 21 12:37:50 EDT 2001


I have added a few features to OGR:

Added the SetFromUserInput() method which will attempt a variety of
best guess strategies to determine a coordinate system. This includes
support for direct WKT, EPSG:n values, and file names containing WKT. It
will likely be extended in the future.

Added the transform() method to transform the geometry using an
OGRCoordinateTransform object. Also the transformTo() method which does
the same but starts with just the desired output coordinate system and
derives the coordinate transformation.

The -a_srs option can now be used to assign a coordinate system
to the output layers.
The -t_srs option can now be used to reproject the geometry as it
is transferred to the output file.

It is thus now possible to reproject vectors as part of ogr2ogr. The
following will transform from lat/long to UTM 11/WGS84 (EPSG:32612).

% ogr2ogr -t_srs EPSG:32612 out canada.mif canada

The -t_srs and -a_srs flags will accept any definition that works for
the SetFromUserInput() method.

Best regards,

I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
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