Python to open shp files and populate metadata across directories

571
3
01-08-2014 03:27 PM
PeterShoemark
New Contributor II
Hi,
   I am looking for some input regarding Python scripting. (Win 7 x64, Python 2.7, Arc 10.1)

  Our office outputs numerous shp files from other software that only creates .shp, .dbf, .shx files.

   The requirement is to have the shp files 'open' in arccatalog thus creating most of the metadata (.xml) needed to meet our quality system. I can then harvest the metadata and import it to geoportal. (well I think i can)

  I have copied/cut/pasted parts together to create a python script that searches directories for .shp and writes the result to a csv file. That script works just fine for that process however I would like to know how/if it is possible to get it to do the arccatalog bit??

Cheers, Peter
Tags (2)
0 Kudos
3 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Peter,

Incorporate the Upgrade Metadata tool into your script and this should create the XML file.
0 Kudos
PeterShoemark
New Contributor II
Thanks Jake, I will give that a fly. (Note at this stage the files are .shp still not in mxd so I may have to mess around a bit with wild cards)

Cheers, Peter
0 Kudos
MartenHogeweg
Esri Contributor

after you have your python script generating the metadata, you can use the desktop publication add-in to publish the metadata to a geoportal server using the Geoportal Publish Client downloadable from GitHub

0 Kudos