This project has moved and is read-only. For the latest updates, please go here.

SharpMap CoordinateSystems as separate assembly

Jan 24, 2007 at 4:19 PM
As NetTopologySuite developer, in the past months i've integrated the CoordinateSystems code developed my Morten for sharpMap directly in NTS, with Morten permissions :), introducing some non-functional modifications, i.e. namespace names change and stuff...
Now i've play with the code and i've refactored NTS for nove the CS code in a separate assembly without any dipendency to NTS code.
The main refactoring is to use a Point class (i0ve used a struct for design choices) that stores coordinate values, and to move coordinateSystems.Transformations.GeometryTransform from the newly created NetTopologysuite.CoordinateSystems assembly in the main NetTopologySuite assembly.
This is necessary because GeometryTransform need references to the NetTopologySuite.Geometries classes: in this class i perform some conversions from the Point struct in the CS dll to the Point class in the main dll.
Those operations obviously introduce some performance issues, but i think that in the Conversion operations a simply class creation + struct destruction are not a great problem for the GarbageCollection...

I've take a look at the SharpMap code and i think it's possible to replicate in SharpMap code all those modifies, so we could create a SharpMap.CoordinateSystems.dll that is referenced from both SharpMap and NetTopologySuite.

If we think that those modifies could be an interesting refactoring for SharpMap, i could try to work on it and build the new SharpMap code and then send the modifies to the SharpMap developers.

Bye :)
Jan 24, 2007 at 5:10 PM
Hi Diego,

Your timing is perfect.

Currently I'm discussing this issue with a guy from the Netherlands.
We are thinking to exclude the Geometry and CoordinateSystems part out of SharpMap into a separate assembly for general use.

So both, NTS and SharpMap could use this common base.

As you know SharpMap lacks a full DE-9IM model. Would you like to integrate this into the new library? You are more experienced on this field as you have integrated successfully JTS code into managed code.
I see a geos for the .Net world. Should we call it NGeo or NGeos? ;-)

Please contect me via .

regards Christian
Jan 27, 2007 at 10:33 AM
I have used Geometry and Coordinate System of NTS in SharpMap. it seems to work well.