I am an old user of Python, but relatively new to GIS. I have a .mxd
file and would like to read it into Python.
Is arcpy
the only way to do so?
I tried with pyshp
but it does not accept this file extension.
Is there perhaps another package for python3
for working with data in this format?
Best Answer
Mxd files are map documents containing information:
Since it is a binary file, you would need to use a piece of software that is capable of reading it. If you would like to get access to the file programmatically specifically using Python you have really three options:
arcpy
site-package that comes with ArcGIS.comtypes
package that can provide an interface to ArcObjects (the COM objects ArcGIS is built upon). Read more on how you can access ArcObjects using Python in this post. There is a post on reading version of mxd file usingcomtypes
here.