[gdal-dev] Simple circle in OGR
Renison
rex200789 at gmail.com
Thu Nov 3 09:47:14 PDT 2016
Figured it out like this:
SpatialReference defaultGeoSys = new SpatialReference("");
defaultGeoSys.SetWellKnownGeogCS("EPSG:4326");
//define a circle using point and buffer
string pointlineString = "POINT (" + longitude + " " + latitude
+ ")";
Geometry center = OGR.Ogr.CreateGeometryFromWkt(ref
pointlineString, defaultGeoSys);
Geometry bufferDefn = center.Buffer(radiusInMiles, 10000);
Geometry bufferDefnPolygon = bufferDefn.GetGeometryRef(0);
Geometry actualCircle = Ogr.ForceToPolygon(bufferDefnPolygon);
The actualCircle serves my purpose of within and intersects. This is just a
fyi if someone else has an issue like this.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Simple-circle-in-OGR-tp5294053p5294217.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list