Quantcast
Channel: DotSpatial Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1128

Commented Issue: Problem with LAEA projection [23987]

$
0
0
Hello,

I'm new to Dot Spatial and really enthusiast to play with this great tool.
I am trying to convert lat/lng values to ETRS LAEA Europe coordinate system (EPSG:3035) but I always get NAN values (Not A Numeric). I think that this closed issue is probably the same: http://dotspatial.codeplex.com/workitem/22212

here is my code (VB.NET) :

```
Dim xy(1) As Double
xy(0) = 5
xy(1) = 50
Dim z(0) As Double
z(0) = 1
Dim pStart As ProjectionInfo = KnownCoordinateSystems.Geographic.World.WGS1984
Dim pEnd As ProjectionInfo = ProjectionInfo.FromProj4String("+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs")
Try
Reproject.ReprojectPoints(xy, z, pStart, pEnd, 0, 1)
Catch ex As Exception

End Try
MsgBox("The points have been reporjected." & vbCrLf & xy(0) & "," & xy(1))

```

The code works well with other coordinate systems. It doesn't work with KnownCoordinateSystems.Projected.Europe.ETRS1989LAEA nor if I use the definition found in AuthorityCodeToProj4.txt (line 1006)
The Proj4 definition I use in the code is correct (verified in the epsg file of PROJ4).

Any idea?

Yvan
Comments: ** Comment from web user: IvanD79 **

Same problem trying to convert from LAEA (3035) to WGS84 (4326), __it's a real BIG issue...__

For coordinates like, for example, 4175490.5731252655 - 1997066.9173578955 I receive NaN - NaN...

```
ProjectionInfo pStart = ProjectionInfo.FromEpsgCode(3035);
ProjectionInfo pEnd = KnownCoordinateSystems.Geographic.World.WGS1984;

SqlGeometry sqlPoint = sqlRing.STPointN(1);
double[] xy = new double[2];
xy[0] = sqlPoint.STX.Value;
xy[1] = sqlPoint.STY.Value;
Reproject.ReprojectPoints(xy, null, pStart, pEnd, 0, 1);
```


Viewing all articles
Browse latest Browse all 1128

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>