Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

Datum Transformation in Arcgis 10.1 Amersfoort_To_WGS_1984_2008_MB

$
0
0
I am facing the problem that the Datum Transformation isn't working from Amersfoort_To_WGS_1984_2008_MB

I found that:
Name = Amersfoort_To_WGS_1984_2008_MB
Wkid = 108457
From this pdf: http://resources.arcgis.com/en/help/...formations.pdf

I use this code to check if there are 3 values in the url, and i look if it is the wkid of RD_NEW
Code:

if (textualMapPointAttributes.length == 3)
{
//var wkid:Number = parseFloat(textualMapPointAttributes[2]);
                wkid = parseFloat(textualMapPointAttributes[2]);
      if(wkid==28992){
                rdCheck = true;
        }
                                       
}

And then in the project function this is the code:

Code:

else
                {
                    var projectParams:ProjectParameters = new ProjectParameters();
                    projectParams.geometries = [ geometry ];
                                        trace("input = "+ geometry.spatialReference);
                    projectParams.outSpatialReference = map.spatialReference;
                                        trace("output = "+ map.spatialReference);
                                        if(rdCheck == true){
                                                trace("rdcheck=true");
                                                var datumTransform: DatumTransform = new DatumTransform();
                                                datumTransform.wkid = 108457;
                                                datumTransform.wkt = "Amersfoort_To_WGS_1984_2008_MB";
                                                projectParams.datumTransform = datumTransform;
                                                projectParams.transformForward = true;
                                                trace("rdcheck=done");

                                                /*projectParams.datumTransform.wkid = 108457;
                                                projectParams.transformForward = true;*/

                                        }
                                        trace(projectParams.datumTransform);
                                       
                                        trace(projectParams.transformForward);

                                        GeometryServiceSingleton.instance.project(
                        projectParams, new mx.rpc.Responder(projectionSuccessHandler,
                                                            projectionFailureHandler));

                    function projectionSuccessHandler(geometries:Array):void
                    {
                        trace("gelukt "+geometries[0]);
                                                responder.result(geometries[0]);
                    }

                    function projectionFailureHandler(fault:Fault):void
                    {
                                                trace("gefaald "+fault);

                                                responder.fault(fault);
                    }
                }

This is my output:

wkid is 28992
input = SpatialReference[wkid=28992]
output = SpatialReference[wkid=102100]
rdcheck=true
rdcheck=done
[object DatumTransform]
true

gefaald [RPC Fault faultString="Error executing project" faultCode="500" faultDetail=""]

Anyone know what i am doing wrong?

Or are these 3 values the only ones possible from the documentation

Quote:

datumTransform property

public var datumTransform: DatumTransform

Since : ArcGIS API 3.0 for Flex



The well-known ID or a json object specifying the datum transformation to be applied on the projected geometries. If specified, a value for transformForward parameter must also be specified. If not specified, a search is made through a set of default GeoTransformations. Currently, the following default transformations are used when applicable:


•esriSRGeoTransformation_NAD_1927_TO_NAD_1983_NADCON, forward and reverse, WKID=1241
•esriSRGeoTransformation_NAD1983_To_WGS1984_1, forward and reverse, WKID=1188
•esriSRGeoTransformation_NAD1927_To_WGS1984_4, forward and reverse, WKID=1173

This is an optional property and is only available with ArcGIS 10.1 and higher.
Thanks in advance

Viewing all articles
Browse latest Browse all 2097

Trending Articles