Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I try to download a web map from arcgis online into arcgis desktop. From the site I get a file named item.pkginfo and arcgis desktop opens it. Unfortunately it only gets me the basemap image and not the features.

According to the knowledgebase article 3824 from Esri, one can reach the data via the url after the tag but what i get is something looking like a long string of json-like data. (The esri-page doesnt say anything about the format one get.)

Haw anyone tried to extract data from arcgis online the same way and can tell the data-format of that string?

The datastring is this: http://www.arcgisonline.com/sharing/content/items/4dde65a4ffd846ff862ed6c508853e37/data?f=pjson for reference.

I admit its a rather vague question but I can't really formulate it better.

share|improve this question
add comment

3 Answers 3

The data is actually in there. I have extracted point data before by copying the file into Notepad++ and just doing some search and replace. With lines and polygons, your best bet is going to be to do some python scripting using json.load.

Basically, you will use urllib2.urlopen() to connect to your items page and read down the json as text.

Load your json text into a python object using json.loads(). Using the properties of your new object, you should be able to use arcpy to construct your features and then push them out to whatever Esri format you might like.

This actually seems like a worthwhile python utility; maybe someone has made it already? I'll see if I can put together time to create it, as I have use for it too. If you do any work on it, please post your code back up here?

share|improve this answer
add comment

If you need to convert the EsriJSON into a FileGDB format from the service, you could take this little project I made called GeoScraper and tweak it to handle the ArcGISOnline data. It just converts EsriJSON to GeoJSON and then to a FileGDB you can use.

It's configured to pull data from a map service query end point and I don't have it set up to handle ArcGISOnline data, but it looks like the only difference is it sits in an operationalLayers object with some drawInfo data.

In this case, it's set up to do most of the work, so it could be worth a shot.

It's also something I just started, so not sure how well it will fare with geometries like donuts.

share|improve this answer
add comment

I'm guessing the source is a feature service just because of this tag: "type": "Feature Layer", If you can find the URL to the feature service (not the arcgis.com item id), you can consume the feature service in ArcMap. Using tools (like copy features) you can "save" a local copy of the data.

Of course the previous answer of parsing the JSON are more suited as an answer to your question. I'm just providing a different way to achieve the same result if you have more info.

share|improve this answer
    
I think the features stored directly on arcgis online are not feature services (although it might be if using ArcGIS Online for Organizations) –  blord-castillo Nov 29 '12 at 19:02
    
Right, I'm not 100% sure the source of the link ("uploaded csv", full on ArcGIS Server service, AGOO-hosted service). But thats correct, Hosted Service (AGOO) serves tiled and feature services. –  KHibma Nov 29 '12 at 19:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.