[OpenLayers-Users] Geometry.Collection (LineString) GetCentroid - fake?

BrainDrain paulborodaev at gmail.com
Thu Feb 18 05:31:09 EST 2010


I need just center point of polyline that belongs to polyline.
Ok, I'll do it with Linear Referencing System of NTS (C# port of JTS)
[WebMethod(EnableSession = true)]
[ScriptMethod(UseHttpGet = true)]
public string GetCenterPoint(...)
{
   //...
   return new NetTopologySuite.IO.WKTWriter().Write(new
NetTopologySuite.Geometries.Point(LengthLocationMap.GetLocation(geometry,
geometry.Length/2).GetCoordinate(geometry)));
}
-- 
View this message in context: http://n2.nabble.com/Geometry-Collection-LineString-GetCentroid-fake-tp4584888p4591018.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list