0

When I try convert Lat Long from shapefile using Dotspatial for Europe LAEA and it gives null values for whole Europe region. It is a custom CRS provided by client

I have used Dotspatial and tried conversion based on given PROJCS and I have tried for Russia, North and South America CRS and it works fine except Europe.

Below is the custom CRS provided by client

PROJCS["WGS84LAEAEurope_54386_PCRS",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["FALSE_EASTING",4321000.0],PARAMETER["FALSE_NORTHING",3210000.0],PARAMETER["CENTRAL_MERIDIAN",9.999999999999989],PARAMETER["LATITUDE_OF_ORIGIN",52.0],UNIT["Meter",1.0],AUTHORITY["XXX",722486]]

It provided NaN for complete Europe region, like UK , Spain, Italy, France etc.,

Below are Lt and Long information which I try to convert

Lat= 57.04632319800004 Long =6.977629678000028 Lat= 57.04357274600005 Long =6.945070506000036 Lat= 57.04062228300006 Long =6.912269669000068

1

I used OSGeo.MapGuide to convert LAT/LONG to X, Y for Europe LAEA.

Below is the code which is used for CRS conversion

Environment.SetEnvironmentVariable("MENTOR_DICTIONARY_PATH", @"D:\cs-map-dictionaries.3.1.1.9378\dictionaries", EnvironmentVariableTarget.Process);
csFactory = new MgCoordinateSystemFactory();
//Create WGS84 coord sys
wgs84 = csFactory.CreateFromCode("LL84");
//Create UTM coord sys
utm = csFactory.CreateFromCode("ETRF89.Europe/EqArea");
xform = csFactory.GetTransform(wgs84, utm);
MgCoordinate transformed = xform.Transform(x, y);
//MgCoordinate contains your transformed coordinates
tx = transformed.GetX();
ty = transformed.GetY();

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 1
    Hope this is clear. – Jey Jan 23 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.