Closed fjod closed 2 years ago
I found the error, args must be passed in correct order:
double[] fromPoint = { 76, 66 };
double[] toPoint = trans.MathTransform.Transform(fromPoint);
My suggestion about creating WKTs from code is still up though
Okay, I think I will add that feature, probably within a week or so. But it will just be a forwarding of a provided WKT-CRS string to an implementation, and the implementation libraries may not always support exactly the same format of the string. ESRI vs OGC: https://en.wikipedia.org/wiki/Well-known_text_representation_of_coordinate_reference_systems#ESRI_vs_OGC "DotSpatial.Projections" seem to use the Esri version, considering their method name "ProjectionInfo.FromEsriString"
WKT-CRS is now supported in version 3.0.0
Hello! I found wierd issue with ProjNet and hope you can shed some light on it. I checked sources of crsTransformations, there is .csv file with WKT strings assigned to EPSG codes. In code you get WKT string by code (SridReader.fs) and use ProjNet classes to create CoordinateSystems and calculate result (CrsTransformationAdapterProjNet.fs). In my project I have many coordinate systems without EPSG codes, so I use ProjNet with WKTs and calculate result. It gives correct result when I transform GEOCS to PROJCS, but if I try to calculate between GEOCS to GEOCS, I receive results with mistake ~100 meters.
Consider code (dead simple):
I tried many WKT strings, get them from your CSV, from epsg.io etc. Your lib uses same ProjNet classes:
So I dont understand why ProjNet gives me bad result while crsTransformations works great. Maybe you have some ideas about it? I even checked binary content of ProjNet.dll, it's same for both cases :/ I answered this question here and got answers that ProjNet is outdated.
Also a suggestion, can you provide a feature to construct coordinateSystem from WKT ?