ArcGIS – Get Information in XML, GeoJSON, or Text Format from URL

arcgis-10.0arcgis-desktopcoordinate systempngwms

I have a URL like this

https://arcgisserver.lund.se/arcgis/rest/directories/arcgisoutput/extern/Extern_Stadsplanering_MapServer/_ags_mapd3b02fb986704186a28a270abd0baff1.png

Source Page

https://geoportal.lund.se/portal/apps/webappviewer/index.html?id=b49e2d6859dd4b2c9d9ae523f1d92cd9

Is there a way to generate the XML or JSON file from this so that I can get the polygon coordinates from the server? For example in WMS we can change the format to KML and we will get the XML file with coordinates. Is there is a method in ArcGIS or is it impossible to get that data from this URL?

Best Answer

You need to identify the source of the layer that's been used and published, after checking the site, i identified the source of that layer (this maybe incorrect source), and then from that layer, generated this url, you can call this URL and it will return the geojson of all the polygons that's available on that service, Furthermore you can change the params for the request.

https://geoportal.lund.se/arcgis/rest/services/GenerellaTjanster/Lund_Search/MapServer/12/query?where=1%3D1&text=&objectIds=&time=&timeRelation=esriTimeRelationOverlaps&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&sqlFormat=none&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=geojson