I have problems using the ReprojectPoints and unsure if this is a bug or a misunderstanding.
I do the following:
double[] xy = new double[2];
xy[0] = e.Position.Longitude.ToRadians().Value;
xy[1] = e.Position.Latitude.ToRadians().Value;
double[] z = new double[1];
z[0] = 100.0; // Altitude assumed at 100m
ProjectionInfo src = ProjectionInfo.FromEpsgCode(4326); // WGS 84 http://epsg.io/4326
ProjectionInfo dst = ProjectionInfo.FromEpsgCode(2056); // CH1903+ / LV95 http://epsg.io/2056
Reproject.ReprojectPoints(xy, z, src, dst, 0, 1);
which returns the wrong coordinates. I checked that with my own verified projection.
I had closer look to ReprojectPoints . What I observed is that the input data is always converted to latitude/longitude even if the xy is already latitude/longitude, see Reproject.cs, Line 138:
// Transform source points to lam/phi if they are not already
ConvertToLatLon(source, xy, z, srcZtoMeter, startIndex, numPoints);
If I comment out this line, the reprojection works as expected.
Is this indeed a bug or do I wrongly apply the ReprojectPoints function?
