Hi ,
I want to convert the - sometimes irregular - extent of my map Services to a Feature class. The goal is to have an index layer that shows the user where a map service (in the end there are more than hundred) is present. Certainly I could use the original raster catalogues and convert them to a feature class. But the (automated) export of the map service boundarys would be more secure and I have already published dozens of services.
Does anyone have an idea?
Best regards
Thorsten Dey
Solved! Go to Solution.
Hello Torsten,
this should be no problem. The REST API of ArcGIS for Server is also usable in scripts. So you could write a script which first asks for all services:
http://localhost:6080/arcgis/rest/services?f=pjson
Then you'll get a response with all folders and servies like this:
{
"currentVersion": 10.31,
"folders": [
"Utilities"
],
"services": [
{
"name": "SampleWorldCities",
"type": "MapServer"
}
]
}
Then you can loop through all services and folders and ask the services for their info
like this:
http://localhost:6080/arcgis/rest/services/SampleWorldCities/MapServer?info&f=json
This will return the the information about every single service including the start extent. You can collect all these extents and write them into a FeatureClass. There is a good sample script, that shows how to do that:
I hope this helps. Please feel free to contact me. We will see us the next days in the ArcGIS for Server training in Hamburg 😉
Hello Torsten,
this should be no problem. The REST API of ArcGIS for Server is also usable in scripts. So you could write a script which first asks for all services:
http://localhost:6080/arcgis/rest/services?f=pjson
Then you'll get a response with all folders and servies like this:
{
"currentVersion": 10.31,
"folders": [
"Utilities"
],
"services": [
{
"name": "SampleWorldCities",
"type": "MapServer"
}
]
}
Then you can loop through all services and folders and ask the services for their info
like this:
http://localhost:6080/arcgis/rest/services/SampleWorldCities/MapServer?info&f=json
This will return the the information about every single service including the start extent. You can collect all these extents and write them into a FeatureClass. There is a good sample script, that shows how to do that:
I hope this helps. Please feel free to contact me. We will see us the next days in the ArcGIS for Server training in Hamburg 😉