2

I want to write the Metadata for a Shapefile, which are saved in the ".shp.xml"-File. I know, I can look at and write those Metadata with ArcCatalog, but I want to do this programmatically. Is this possible with c# and arcobjects? Or do I have to write directly to the XML-File parsing the Content? If that's the case how can I create the "shp.xml"-File? I have a bundle of Shapefiles, which do not have this File. So maybe I could create the shp.xml-File and write to it using XElement or something like this ...
Do you have any suggestions, how to solve this Problem?
I use ArcGIS 10.1.

1

I noticed you tagged this question with C# which sort of suggests you are happy to develop some code in .net? If so you can create Metadata and add all the elements you need by obtaining a reference to the Metadata (even if none exists) through the IMetadata interface.

If your Shapefiles all have generic metadata then you could use model builder and import a "template", this can be done very quicky and is all discussed here.

0

Use modelbuilder or Python to run the Synchronize Metadata tool. This will create the XML file. If you want to then edit its content programmatically, this is can be done using XML capabilities in Python.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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