简体   繁体   中英

How can I query latitude and longitude in esri ArcGIS rest API instead of spatial coordinates?

I am using ArcGIS for a project. While using its Rest API, I realized that the coordinates are returning in a spatial coordinates format:

        "rings": [
            [
                [
                    227682.63361452334,
                    365316.62928415462
                ]
         ]
         ]

instead of

        "rings": [
            [
                [
                    33.302915077034889,
                    34.917748779655412
                ]
       ]]

I realized that I can convert those to lon lat but in some occasions the data set is huge, taking ages to convert them.

Is there a better way to do it?

Please note that you can set outSR param to 4326 in your request. For example:

curl --location --request GET 'https://yourARCGISserverDomain/arcgis/rest/services/National/General_Search/MapServer/12/query?f=json&outFields=*&outSR=4326&returnGeometry=true&where=1=1'

Note the outSR=4326 parameter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM