[Gdal-dev] types common to raster/vector
Frank Warmerdam
warmerdam at pobox.com
Mon Oct 31 20:44:56 EST 2005
On 10/31/05, Ray Gardener <rayg at daylongraphics.com> wrote:
> I was wondering if the following OGR types:
>
> OGRSpatialReference
> OGR_SRSNode
> OGRCoordinateTransformation
> OGREnvelope
> OGRRawPoint
>
> would be better placed in their own lib/namespace, since they are often
> used in raster routines when doing georeferencing (or put another way,
> there's nothing particularly vector-specific about coordinate
> transforms). The OGR area could then be more pertaining specifically to
> shapefile specifics, and it would let raster-only projects more easily
> declude OGR.
>
> e.g., a C++ decl might be:
>
> namespace spatial
> {
> class coordsys { ... };
> class coordsys_node { ... };
> class coordinate_transform { ... };
> class envelope { ... };
> class point { ... };
> }
>
> For backwards compatiblity there could be:
>
> typedef spatial::coordsys OGRSpatialReference;
> typedef spatial::coordsys_node OGR_SRSNode;
> typedef spatial::coordinate_transform OGRCoordinateTransformation;
> typedef spatial::envelope OGREnvelope;
> typedef spatial::point OGRRawPoint;
Ray,
I would go a little further to say that OGRSpatialReference
(and associated stuff) ought to have been factored into it's own
low level library on which separate GDAL and OGR libraries
could depend.
However, I am not planning on any wholesale changes in
this regard now.
I don't think that a distinct namespace would really help
anyone very much though, unless I am missing something.
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