4

I want to transform Lambert (EPSG:3035) coordinates to EPSG:4326 in C#.

I have tried this:

var lambert = cf.CreateFromWkt("PROJCS[\"ETRS89 / ETRS-LAEA\",GEOGCS[\"ETRS89
\",DATUM[\"European_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS 
1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6258
\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree
\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4258
\"]],PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude_of_center
\",52],PARAMETER[\"longitude_of_center\",10],PARAMETER[\"false_easting
\",4321000],PARAMETER[\"false_northing\",3210000],UNIT[\"metre\",1,AUTHORITY[\"EPSG
\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3035\"]]");

Error: Projection Lambert_Azimuthal_Equal_Area is not supported.

As far as I understand, ProjNet should support Lambert. Can someone help me? Or show me another way how to achieve my goal?

1

You can use dotspatial to make your transformation. The two projections is created by:

//EPSG 3035
ProjectionInfo fromProjection = KnownCoordinateSystems.Projected.Europe.ETRS1989LAEA;
//EPSG 4326
ProjectionInfo toProjection = KnownCoordinateSystems.Geographic.World.WGS1984;

And you make the transformation with

Reproject.ReprojectPoints(fromPoint, toPoint, fromProjection, toProjection, 0, 1);
1
  • A bit late, but I will accept this answer. I am not working with C# anymore, but I will accept it anyway for the following reasons: (1) dotspatial is still actively maintained & provides the mentioned classes: github.com/DotSpatial/DotSpatial (2) the example code is quite straight forward and obvious. If the class name or method names changes a bit in the future, it should be easy to adapt it.
    – np00
    Jun 21 '19 at 6:43
1

This helped me but this code is not right

Reproject.ReprojectPoints(fromPoint, toPoint, fromProjection, toProjection, 0, 1);

ReprojectPoints should be called like this:

Reproject.ReprojectPoints(fromXY, fromZ, fromProjection, toProjection, 0, 1);

fromXY is an array with 2 doubles (X and Y) and fromZ is an array with 1 double (Z).

The function returns the result in the fromXY variable.

But for me it does not work for ETRS89LAEA anyway. just get NaN in the result...

If anyone got conversion to ETRS89LAEA to work with dotspatial, please show me how to do it.

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.