Select to view content in your preferred language

Different spatial references allowed in REST-API for intersect?

1674
1
07-30-2015 11:22 AM
ScottStory
Deactivated User

Does anyone know if Intersect in the REST-API supports geometries with a different spatial reference? The documentation shows the four API parameters, one of which is sr (spatial reference) for the input geometries. The input geometries are not the same as the intersect geometry though.

The API reference elsewhere states that the spatial reference for a geometry object can be defined in the JSON (see below). So, shouldn't I be able to pass in an intersect geometry with a spatial reference for Web Mercator (WKID = 102100) for example, and input geometries with a different spatial reference, let's say Montana State Plane (WKID = 32100) for example and get a result? So far I am getting empty geometry returned. Want to make sure this is possible before I wrestle too much longer with it.

Example intersect geometry

{

    "geometryType": "esriGeometryPolygon",

        "geometry": {

            "rings": [

                [

                    [-12465664.8632, 5874425.9523999989],

                    [-12476494.0233, 5874425.9523999989],

                    [-12476494.0233, 5880752.628200002],

                    [-12465664.8632, 5880752.628200002],

                    [-12465664.8632, 5874425.9523999989]

                ]

            ],

  "spatialReference" : {"wkid" : 102100}

        }

    }]

}

Example input geometry (minified)

{"geometryType":"esriGeometryPolygon","geometries":[{"rings":[[[402996.10897525819,268296.93031765614],[403801.86511170655,268894.5075865984],[405288.37263122876,268497.72498104721],[405388.2327466053,267986.53692570888],[405875.02811967907,266833.88684637006],[405655.06559753942,266337.65533116553],[405121.3635704437,265600.04383672681],[404421.55283910845,265579.28164440487],[403408.97125356598,266236.70656091999],[403269.14811223536,267301.00128308684],[403209.75406958244,267709.36520597711],[402996.10897525819,268296.93031765614]]]},{"rings":[[[405875.02811967907,266833.88684637006],[405388.2327466053,267986.53692570888],[405288.37263122876,268497.72498104721],[406372.52634615579,268259.41401368938],[406675.13065843744,268162.56604694389],[407233.46969502495,267868.82895285543],[407722.85940442956,267693.45531840343],[407740.78322052828,267344.54344140086],[406689.65310156555,266807.55160703044],[405875.02811967907,266833.88684637006]]]},{"rings":[[[405288.37263122876,268497.72498104721],[405467.17458660278,269072.3699903572],[406438.62045954319,269403.65349544771],[406752.90240052511,269219.38683651481],[407460.29012285429,269036.99412928708],[407744.60695259878,268824.71296729334],[407939.82952354685,268557.24914641585],[407722.85940442956,267693.45531840343],[407233.46969502495,267868.82895285543],[406675.13065843744,268162.56604694389],[406010.26370115124,268339.02099001314],[405288.37263122876,268497.72498104721]]],"spatialReference" : {"wkid" : 32100}}]}

0 Kudos
1 Reply
DanielHauser
New Contributor

The rest API is actually sending a request to the SDE database.  As of 10.2 there was a know bug (that we reported).  At that time this did not work.  I have not checked to see if this bug was ever resolved.

#NIM094834

0 Kudos