[Gdal-dev] SetLocalCS() binding?
szekerest at gmail.com
Tue Mar 27 19:04:32 EDT 2007
2007/3/27, Simon Perkins <sy at perkins.net>:
> While I'm here, what's the difference between OGR.SpatialReference and
> OSR.SpatialReference? Why are there two such similar namespaces?
Some of the OGR classes like DataSource, Geometry, Layer internally
use the SpatialReference class which requires the internal reference
to the unmanaged memory to be passed between the classes. In this
regard it was not really reasonable to put these classes into
different assemblies and make these accessors public instead of
internal. In addition placing these classes into different namespaces
(within the same assembly) would require using fully qualified names
or 'using' directives inside the generated wrappers.
When the user would like to use the SpatialReference class along with
the OGR classes the OSGeo.OGR.SpatialReference should be used. If
someone would like to use solely the osr functionality it would be
enough to use the osr_csharp.dll and the classes within the OSGeo.OSR
namespace. However, I consider that the latter is rarely used.
More information about the Gdal-dev