Coordinate systems, reprojection on-the-fly

Topics: Algorithms, General Topics, SharpMap v2.0
Coordinator
Jul 1, 2013 at 7:16 PM
Edited Jul 1, 2013 at 7:20 PM
I was working on coordinate system implementation using GDAL in my SharpMap branch since it looked like very simple to add and should be fast (based on C proj4). In SharpMap we use SRID everywhere plus Proj4Projection in ILayer. It seems to be redundant to have both?
Plus having only SRID in IProvide is not sufficient. Is there a vision on how it will be implemented?

ILayer

int SRID - looks like it is not needed when Proj4Projection is defined (was added later, SRID comes with original SharpMap)

string Proj4Projection

IProvider

int SRID - comes from original data source, however this is not sufficient

I've decided to change it to:

IProvider (IFeatureProvider in my case)

string SrsWKT

ICoordinateSystem CoordinateSystem - created using SrsWKT, getter only

ILayer

ICoordinateTransformation CoordinateTransformation - is set when map projection differs from the one used in layer's data source



... or maybe I should use Proj4CoordinateSystem (it is not always projected CRS, right?)

... plus having CRS on ILayer seems to be redundant, IProvidee may be a better place? With Transformation on ILayer, used when transformation is required.
Coordinator
Jul 1, 2013 at 7:36 PM
a small follow-up, +1 for WKT instead of PROJ.4 as a string representation:

PROJ.4: No translation for Behrmann to PROJ.4 format is known.

WKT:
PROJCS["World_Behrmann",
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_1984",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]],
PROJECTION["Behrmann"],
PARAMETER["False_Easting",0],
PARAMETER["False_Northing",0],
PARAMETER["Central_Meridian",0],
UNIT["Meter",1],
AUTHORITY["EPSG","54017"]]
Coordinator
Jul 2, 2013 at 6:51 AM
Gennadiy, please have a look at
Trunk/GeoAPI.Extensions/SpatialReference
and the implementations
Trunk/SharpMap.SpatialReference.ProjNet
Trunk/SharpMap.SpatialReference.DotSpatialProjections
Coordinator
Jul 2, 2013 at 4:10 PM
ProjNet - as I understood it is not maintained anymore
DotSpatial - do we have speed comparison with pure PROJ.4? I guess I will have to make one :).
Coordinator
Jul 3, 2013 at 7:04 AM
gennadiy_d wrote:
ProjNet - as I understood it is not maintained anymore
But widely used, due to the large memory footprint of DotSpatial.Projections
DotSpatial - do we have speed comparison with pure PROJ.4? I guess I will have to make one :).
I don't know any....
Developer
Jul 3, 2013 at 8:00 AM
gennadiy_d wrote:
ProjNet - as I understood it is not maintained anymore
Only some thoughts.
Actually, true.
The developer that build the library isn't actively involved anymore, and, for reason that I don't want to explain here, any other development from other developers are not encouraged.
Probably this shold be written in the ProjNET home page (by me, of course) but I need a clarification first with the developer of the library.
NTS has it's own "branch" here, ProjNet4GeoAPI, that Felix maintain actively, and that maybe this library can be released as separate project.
Coordinator
Jul 3, 2013 at 8:44 AM
D_Guidi wrote:
Probably this shold be written in the ProjNET home page (by me, of course) but I need a clarification first with the developer of the library.
+1
NTS has it's own "branch" here, ProjNet4GeoAPI, that Felix maintain actively, and that maybe this library can be released as separate project.
All I did was reestablish GeoAPI dependency and fixed some bugs, incorporated some patches. I have no plans or ressources to take this any further