Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I maintain metadata as I always have....inconsistently and sporadically.. I know...booh to me. Anyways, I know python can pull all kinds of info out of mxd in V10. Has anybody come up with some scripts to populate basic stuff like layers and paths to mxd metadata? Seems like this should be pretty easy, but I would really like to know if there is any reason this won't work and if anybody has written anything along these lines to get me started in the right direction.

share|improve this question
Similar question (no answers yet):… – blah238 Feb 11 '11 at 17:29
I'll be watching this one closely...I'm just as inconsistent and sporadic as you. – Paul May 2 '11 at 21:03

It is definitely possible. The great thing about code is that you can do anything.

Why hasn't it been done? I dare say it's because Metadata is boring ;)

You could use the Arcgisscripting tools to extract the information that you want and save this information in an XML document with the same name as the data set. This would at least provide you with information like, Date Created, Date Modified, SRS/CRS/Projection, Location, etc. Most of which is available though the Python interface.

I would definitely have a look at XMl and XSLT as an implementation strategy. But if that is beyond your interest level then an CSV file would suffice. After all, any metadata (in a friendly format) is better than no Metadata at all.

share|improve this answer
Yep on the boring.....ElementTree was the key to our first kick at this. Not sure how to post code on here. – mstead May 19 '11 at 17:34

Check out these scripts they basically walk through directories looking for geographic information in the form of shp, tif, bil and img and using the GDAL bindings extracting its extent, geometry, number of elements, projection, dbf description, user, date last modification, path, etc and writes it into an csv file.

The idea is to generate an initial list of maps to later generate metadata

We release these scripts as an open source project, and it is intended to work with the FWTools installation (only was tested in FWTools 2.4.7)

The scripts can be found in

share|improve this answer

Your Answer


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.