-1

I am having a basic problem using DotSpatial.Projections. I am simply trying to convert one point from Google's Geopgraphic CRS, used in Leaflet (EPSG Code: 3857), to US State Plane Wyoming East Central. I get back NaNs. Here is my simple code:

ProjectionInfo dest = KnownCoordinateSystems.Projected.StatePlaneNad1927.NAD1927StatePlaneWyomingEastCentralFIPS4902;
int googleEPSGCode = 3857;
ProjectionInfo src = ProjectionInfo.FromEpsgCode(googleEPSGCode);

double[] xy = { 43.265081, -106.17565155 };
double[] z = { 0 };
Reproject.ReprojectPoints(xy, z, src, dest, 0, 1);

The xy's are both NaN. Any ideas? I have also tried to use the Wyoming East Centreal EPSG code as well but it gives the same results.

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Chris
  • 325
  • 1
  • 3
  • 12

1 Answers1

0

My bad. longitude needs to be entered as X and latitude as y in the xy[] array. I had them backwards. Now it throws the GridShift error because of NAD27, but that is another issue.

Chris
  • 325
  • 1
  • 3
  • 12