How to specify a datum transformation

3335
4
Jump to solution
10-07-2014 09:06 AM
MarkCederholm
Regular Contributor II

If I want to project a point from WGS1984 (4326) to NAD1983 (4269) using transformation NAD_1983_To_WGS_1984_5 (1515), how do I go about doing it?  Apparently I need to build a well-known text, but when I try the following it doesn't give the correct result:

string sGEOGCS = "GEOGCS[...";

string sGEOGTRAN = "GEOGTRAN[...";

string sWKT = sGEOGCS + " " + sGEOGTRAN;

MapPoint ptWGS84 = new MapPoint(dLon, dLat, new SpatialReference(4326));

SpatialReference srTrans = new SpatialReference(sWKT);

MapPoint ptNAD83 = (MapPoint)GeometryEngine.Project(ptWGS84, srTrans);

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Frequent Contributor

Explicitly-defined datum transformations are not supported in the .NET SDK in this release. However simple datum transforms are already applied automatically when possible.

View solution in original post

0 Kudos
4 Replies
dotMorten_esri
Esri Frequent Contributor

Explicitly-defined datum transformations are not supported in the .NET SDK in this release. However simple datum transforms are already applied automatically when possible.

0 Kudos
MarkCederholm
Regular Contributor II

Thanks for your reply.  While the geographic results are not exactly the same as those using ArcObjects, I projected them further to UTM and found that they're only a centimeter apart, which is good enough for my app.

0 Kudos
AnnaLambrechtsen
New Contributor

i appreciate it's not in there currently, but i just want to confirm that it's needed.

in New Zealand there are some odd projections that are certainly not in the simple list you mention which require datum transformations to convert between.

at the moment i'll be using the REST API to do this conversion, but it'd be nice to not have to.

0 Kudos
dotMorten_esri
Esri Frequent Contributor

Thanks Anna. We definitely have it on our future roadmap! There's also already a way to deploy extra datum grids that the projection engine will automatically use.

0 Kudos