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

Version probleme

Sep 22, 2014 at 7:28 PM
hi guys

i see in sharp map V1.0 they remove the namespace sharpmap.geometries and replaced by GeoApi.Geometries

but there exist only abstract class like IPoint

Could someone give some docs about that?

like how can i create a instance like sharp.geometries.point or sharpmap.geometries.polygon
Sep 23, 2014 at 7:05 AM
The implementation used within SharpMap is the one provided by NetTopologySuite.
To create a geometry of any kind you need a geometry factory:
var factory = GeoAPI.GeometryServiceProvider.Instance.CreateGeometryFactory(4326);
var point = factory.CreatePoint(0, 0);
If this throws an exception, you need to assign the geometry service provider manually:
GeoAPI.GeometryServiceProvider.Instance = NetTopologySuite.NtsGeometryServices.Instance;
Marked as answer by yuan3366 on 9/23/2014 at 10:07 AM
Sep 23, 2014 at 6:07 PM
thx FObernaier,

it works.

BTW Have u got some document about all those stuff?