C#.Net Solution using GDAL/OGR bindings..
I drew from this GDAL C# example as a reference. Other GDAL C# examples are here.
public static string BufferGeom(string wkt)
string projected_geom_WKT = "";
// If GDAL > 3.0..
// Unexpected coordinate reversal in Well Known Text!
// Explaination: https://github.com/OSGeo/gdal/issues/1546
// Solution is..
SpatialReference sr1 = new SpatialReference("");
Geometry g1 = Geometry.CreateFromWkt(wkt);
// Create localized Azimuthal Equidistant Projection centered on the point you want to buffer..
// "+proj=aeqd +lon_0=-80.9957 +lat_0=33.97105 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=ft +no_defs";
// This block uniquely adapts the Azimuthal Equidistant Projection for every geometry submitted.
// We get the centroid in case a linestring or a polygon is submitted.
// This keeps the projection centered even for non-point shapes.
Geometry proj_center_geom = g1.Centroid();
string aeqd_proj_string = "+proj=aeqd +lon_0=" + proj_center_geom.GetX(0).ToString() +
" +lat_0=" + proj_center_geom.GetY(0).ToString() +
" +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=ft +no_defs";
// Transform to localized projection..
SpatialReference sr2 = new SpatialReference("");
// 50 = distance in projection units (feet, in this case), and 30 = "quadsecs"
// "QuadSecs" are the number of segments used to represent 90-degree arc of circle..
Geometry g2 = g1.Buffer(50, 30);
g2.AssignSpatialReference(sr2); // We have to tell OGR the projection of the new geom
string g2WKT = "";
// Transform back to WGS84/LatLng
string g2GeogWKT = "";
projected_geom_WKT = g2GeogWKT;
static void Main(string args)
// Point you want to buffer..
string latlngWKT = "POINT(-80.9957 33.97105)";
string proj_geom_WKT = GeoUTIL.BufferGeom(latlngWKT);
I had to import the following GDAL/OGR assemblies (.dll files) into my C# project to reference the bindings:
I found them where I initially unpacked files for my GDAL installation in the following directory:
I also found them here (probably where GDAL copied them during install):
C:\Program Files (x86)\GDAL\csharp
One last thing, I ran into some build issues at first, and I had to go to Project > Properties > Build (tab), and set "Platform Target" to "x86".
A comment on that ..I probably intentionally installed 32-bit GDAL for macro compatibility with a lot of other things. But for this purpose, it might make sense to download a specific GDAL, like a 64-bit build, for importing into your project.