0.9 -> 2.0 code

Oct 14, 2008 at 1:39 PM

Hi all, new user here.  I had a basic control working with the 0.9 code, but am trying to move to the 2.0 codebase for some of the new features.  I got the SharpMap.dll compiled finally, but now in my old control I'm trying to get things compiled.  Hopefully this is a stupid question, but where is the Point datatype?  And why does the map object no longer have a Zoom attribute?  I'm not finding a Geometries namespace under SharpMap, which is where the Point type used to live... where is it now?  Thanks a lot in advance.  Also, any 2.0 demo code would be great - the SharpMap\Demos\WebSite folder seems to be empty in the latest code drop. 
Oct 14, 2008 at 2:12 PM
Hi stealthboy, the geometries are defined in GeoAPI, and implemented in NTS, overall the design is quite different from 0.9. Btw are you using the source from googlecode? cheers jd
Oct 14, 2008 at 2:35 PM

Can you please point me to the most recent API documentation that would include all these differences?  I'm finding it very difficult just trying to guess how it all works.  Perhaps some simple hello world equivalent demos with the 2.0 code.  For example, what is the 2.0-equivalent to the old 0.9 SharpMap.Geometries.Point?  Thanks in advance.

Oct 14, 2008 at 3:26 PM
Hi stealthboy, there isn't really any documentation apart from the comments in the code itself, over time this will change but for the time being we are concentrating on writing the actual code..


where TCoordinate is a type of coordinate (usually NetTopologySuite.Coordinates.BufferedCoordinate).

You don't generally create the point (or any other geometry for that matter) yourself, instead you use an IGeometryFactory

you can find one in SharpMap.Utilities.GeometryServices.

As a general rule you should avoid passing the geometries around by their concrete types and use the interfaces instead.

hth jd