The following piece of code worked with an older version of DotSpatial.
public static Geometry Project_EPSG25832_To_EPSG3857(byte[] wkb, int SRID)
{
NetTopologySuite.IO.WKBReader reader = new NetTopologySuite.IO.WKBReader();
Geometry geom = (Geometry)reader.Read(wkb);
var epsg25832 = new DotSpatial.Projections.ProjectionInfo();
var epsg3857 = new DotSpatial.Projections.ProjectionInfo();
epsg25832.ParseEsriString(ESRI_EPSG_25832);
epsg3857.ParseEsriString(ESRI_EPSG_3857);
Geometry transformedGeom = (Geometry)DotSpatial.Projections.GeometryTransform.TransformGeometry(geom, epsg25832, epsg3857, NetTopologySuite.NtsGeometryServices.Instance.CreateGeometryFactory());
return transformedGeom;
}
I had to upgrade the DotSpatial suite to the latest version and now the above code breaks. It seems the "DotSpatial.Projections.GeometryTransform" class doesn't exist any more.
I can't seem to find anything similar in the new version of DotSpatial except for this method
Reproject.ReprojectPoints(xy, z, pStart, pEnd, 0, 1);
...but it takes an array of points...
Anybody know of a nice and easy way of coming from a WKB to an array of points, or maybe there is another library that is easier to use in .NET/C#??
DotSpatial
andNetTopologySuite
. Is this by intention?