Mapbox - OnGeometryDefined

Topics: SharpMap Project, SharpMap v0.9 / v1.x, SharpMap v2.0
Mar 19, 2015 at 12:02 PM

I have a method, where i get drawn polygon with MapBox.Tools.DrawPolygon tool.
private void mapBox_GeometryDefined(GeoAPI.Geometries.IGeometry geometry)
geometry.Area - ?? // What is this? And how can i get this value in kilometers or hectares?

Please help!

Sorry for my english.
Mar 19, 2015 at 12:47 PM
It is in what your coordinates are in. I suppose they are lat/long and thus the geometry.Area value is meaningless.
You need to do a coordinate transformation to a spatial reference system that is as accurate as possible for your geometries. might help you choose one.
Mar 19, 2015 at 3:22 PM
Thank's. But how can i do "GeoAPI.Geometries.IGeometry coordinate transformation to a spatial reference" ? Can you give me some simple example please?
Mar 19, 2015 at 6:48 PM
SharpMap does not have much documentation, but this is documented.
Mar 20, 2015 at 7:03 AM
Ok. Thanks for your help.