So I am doing a pretty simple process that looks a lot like right out of the SOAP API/SDK for AGS10.

My webservices takes a Lat/Lon coord from a mobile app, I reproject it to Web-Mercator to identify against my mapservice data and return a result. Pretty simple, but for some reason that I am not seeing any place, the project method is returning blank, no exception raised, no errors on the server/service side.

            SpatialReference inputSpatialReference = new GeographicCoordinateSystem();
            inputSpatialReference.WKID = 4326; //WGS 84
            inputSpatialReference.WKIDSpecified = true;

            PointN llPnt = new PointN { X = lon, Y = lat, Z = 0 };
            llPnt.SpatialReference = inputSpatialReference;

            SpatialReference outputSpatialReference = new ProjectedCoordinateSystem();
            outputSpatialReference.WKID = 3857; //Web Mercator (Auxiliary Sphere)
            outputSpatialReference.WKIDSpecified = true;

            Geometry[] inputGeometry = new Geometry[] { llPnt };

            bool transformForward = false;

            GeoTransformation transformation = new GeoTransformation();
            // NAD1983_To_WGS1984_1
            transformation.WKID = 108100;
            transformation.WKIDSpecified = true;

            EnvelopeN extent = null;

            Geometry[] outputGeometry = geometryService.Project(inputSpatialReference, outputSpatialReference,
                                                                transformForward, transformation, extent,

            PointN wmPnt = outputGeometry[0] as PointN;

Now; when my defining my points works great; I am able to see the point, my X, Y and Z values as well as my existing coordinate system look great. So I define where my coordinates are going, to, define my transformation since I need to get from Lat/Lon to WebMercator and then after that, fire the GeometryService.Project call.

Now when I look at the output in the debugger of the outputGeometr the point is blank; not even the existing coordinates the new point is null.

So I look to the server, to see what it says; no errors listed, so I am very puzzled.

Any thoughts or suggestions?


Where are you getting the transformation WKID 108100 from? Looking at the enum list linked from the SOAP documentation I see esriSRGeoTransformation_NAD1983_To_WGS1984_1 = 1188


Creating SOAP proxies off an ArcGIS Server 10.0 SP2 GeometryService endpoint and literally copy-pasting your code and touching it up to run off my new service reference, I get a fine good answer back from the server. Have you looked at the actual exchange with the server in a tool like Fiddler?

  • I was trying to different permutations; and didn't think NAD to WGS would hit my mark since I was jumping around a bit. Yet still looking at that as my transformation WKID still leaves the project returning with 'NaN' as all values.. – D.E.Wright May 20 '11 at 19:07
  • Kind of puzzled; but going to take the short way out; just setup a copy of the layer I need in WGS. Easy to do since the services are all scripted to replicate. Just sort of spinning my wheels on this one. Thanks for the feedback Philip. – D.E.Wright May 23 '11 at 16:49

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.