Hoppa till huvudinnehållet

How to configure Datum Transformations in the HTML5 Viewer 2.8

Kommentarer

3 kommentarer

  • Permanently deleted user
    Try the old projection 6177
    0
  • Andrew Edwards
    @Sylvia, Trying 6177, yields the same error result: "You have selected a geographic output type. Please enter a valid WKID for a geographic coordinate system."

     

    When debug the silverlight viewer, every request my GeomertyServer has the following parameters: inSR, outSR, geometries, transformation, and transformForward.  

     

    Observing the HTML5 requests on the other hand shows only the following parameters being passed to the GeometryServer: inSR, outSR, and geometries.

     

    This is the core of the problem, because when I open the GeomeryServer dierectly it needs the transformation parameter or else it will not do the transformation. In Viewer.xml for the Silverlight viewer there is a section defining the datumTransforms as follows (i'll just show one): 

     

     <DatumTransforms>

     

          <DatumTransform WKT="GEOGTRAN[&quot;WGS84_To_NAD27_Ft&quot;,GEOGCS[&quot;GCS_WGS_1984&quot;,DATUM[&quot;D_WGS_1984&quot;,SPHEROID[&quot;WGS_1984&quot;,6378137.0,298.257223563]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]],GEOGCS[&quot;GCS_North_American_1927&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]],METHOD[&quot;Coordinate_Frame&quot;],PARAMETER[&quot;X_Axis_Translation&quot;,179.48644],PARAMETER[&quot;Y_Axis_Translation&quot;,69.373657],PARAMETER[&quot;Z_Axis_Translation&quot;,27.594132],PARAMETER[&quot;X_Axis_Rotation&quot;,-7.86223912],PARAMETER[&quot;Y_Axis_Rotation&quot;,8.16276969],PARAMETER[&quot;Z_Axis_Rotation&quot;,6.04231114],PARAMETER[&quot;Scale_Difference&quot;,13.92519391]]" FromWKID="6135" ToWKT="PROJCS[&quot;NAD_1927_UTM_Zone_17N&quot;,GEOGCS[&quot;GCS_North_American_1927&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;False_Easting&quot;,1640419.947506562],PARAMETER[&quot;False_Northing&quot;,0.0],PARAMETER[&quot;Central_Meridian&quot;,-81.0],PARAMETER[&quot;Scale_Factor&quot;,0.9996],PARAMETER[&quot;Latitude_Of_Origin&quot;,0.0],UNIT[&quot;Foot&quot;,0.3048]]" />

     

    .

     

    .

     

    .

     

    </DatumTransforms>

     

    However, in HTML5 (Desktop.json.js) I don't know how to add this datumTransform, I am merely guessing at the syntax based on what I have reviewed in the HTML5 viewer Developer's documentation (which gives no examples by the way). It says this:

     

    "When you configure one or more datumTransforms, the viewer does not use the built-in datum

     

    transformations—the built-in transformations are only used if datumTransforms is empty.

     

    A datumTransforms item has the properties listed below. To specify a datum transformation using the wellknown

     

    ID (WKID), configure transformWkid, fromWkid, and toWkid. To use the well-known text (WKT)

     

    instead of the WKID, configure transformWkt, fromWkt, and toWkt.

     

    l transformWkid: The WKID of the datum transform to use.

     

    l transformWkt: The WKT of the datum transform to use. This is ignored if transformWkid is also

     

    specified.

     

    l fromWkid: The WKID of the spatial reference to project from.

     

    l fromWkt: The WKT of the spatial reference to project from. This is ignored if fromWkid is also specified.

     

    l toWkid: The WKID of the spatial reference to project to.

     

    l toWkt: The WKT of the spatial reference to project to. This is ignored if toWkid is also specified. "

     

    Now then, I beleive the reason the requests to the GeometryServer coming from the HTML5 viewer (when you attempt to switch coordinate systems) does not contain the "transformation and tansformForward" parameters is due to the fact that the datumTransforms is not properly constructed for the HTML5 viewer. And this is friends is what I am seeking help with.

     

    Thanks again.

     

    //Houdini
    0
  • Permanently deleted user
    The datumTransforms array has to be wrapped in the application object:

     

    "application":{

     

    .

     

    .

     

    .

     

         "datumTransforms":[

     

          .

     

          .

     

          .

     

          ]

     

    }

     

    That's the object where you configure the proxiUri, geometryServiceUrl and some other stuff as well.

     

    --peace
    0

Du måste logga in om du vill lämna en kommentar.