[Qgis-developer] Re: MXD

Alister Hood alister.hood at synergine.com
Sun Mar 27 00:27:15 EDT 2011


> Date: Fri, 25 Mar 2011 06:37:43 -0700 (PDT)
> From: mayeulk <mayeul.kauffmann at free.fr>
> Subject: [Qgis-developer] Re: MXD
> To: qgis-developer at lists.osgeo.org
> Message-ID: <1301060263087-6207713.post at n2.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> Hi Barry and Stephan,
> Any news about extracting data from mxd ?
> Building on your "strings -e l" I am able to extract list of
shapefiles from
> mxd but I wonder how to expand this to the other layer types in an
mxd, of
> if by now there are OS tools to do this.
> My current, limited code is:
> grep -A 2 "Shapefile Feature Class" foo.mxd  | sed -e
> -e 's/\t--\t/\n/g' | sed -e '/^Shapefile Feature Class\tShape\t/d' -e
> 's/^Shapefile Feature Class\t//g' -e 's/\tShapefile Feature
> Class\tShape\t/\t/g' > foo_shapefiles.csv
> Mayeul
> On Thu, Jan 27, 2011 at 1:56 PM, Stephan Holl
> <[hidden email]> wrote:
> > I would love to read more about Barries reverse engeneerings of the
> > 'obfuscated' format.
>  All I've discovered at the moment is that if you dump it using
> "strings -e l foo.mxd" on a Linux box you can actually see the file
> names of shapefiles and geotiffs - they're stored as UTF-16 strings.
> But being able to locate where in the whole mush of strings that whizz
> past so you could automatically strip them out is another problem.
>  If I actually had this problem on a one-off, say someone gave me a
> MXD with two layers and the accompanying shapefiles, I'd probably just
> do it manually - start Qgis, load two layers. With a hundred layers
> I'd probably get the filenames and make a Qgis project file
> programmatically. But given that extracting anything other than the
> layer file names and ordering (styling, for example) is just about
> impossible I'd probably do it from the filenames rather than the MXD
> itself. But anyway, for me the break-even point for automating this is
> about 20 layers, and that might only happen once in my lifetime...
> Barry

I missed the beginning of this conversation, but I'm wondering if
the arcmap2sld project would help at all with this.


More information about the Qgis-developer mailing list