now, I am using NetTopologySuite For Create polygon in C#, I need to save circle As well, but I can't find how to implement If anyone help me with it?
Asked
Active
Viewed 903 times
1 Answers
1
Try this below where "cirRadiusInMiles" is the radius of the circle you want to make as an IGeometry datatype of "circle" and "circleCenter" is the coordinate of the center of the circle.
double cirRadiusInMiles;
var geometryFactory = NtsGeometryServices.Instance.CreateGeometryFactory(4326); // WGS84
var circleCenter = new NetTopologySuite.Geometries.Coordinate(coordinate.Longitude,coordinate.Latitude);
var circle = geometryFactory.CreatePoint(circleCenter ).Buffer(cirRadiusInMiles/69.17); // To me, this is 1000 meters because the SRID is WGS84.