# HG changeset patch # User Stephan Holl # Date 1311584992 -7200 # Node ID fb1ffd38511553b8196871bddc1b2da9b718d427 # Parent 13f1cf17f6206bbe655c446b3ec4dd2c4b26ffad# Parent 69ec9129ff965c1d36a12ecbb5179a98e063c8b1 merged with upstream changes diff -r 69ec9129ff96 -r fb1ffd385115 contrib/python/generateHTML.py --- a/contrib/python/generateHTML.py Fri Jul 22 14:37:49 2011 +0200 +++ b/contrib/python/generateHTML.py Mon Jul 25 11:09:52 2011 +0200 @@ -43,10 +43,12 @@ def writeLayers(mapfile, layers, extent): basename = os.path.basename(mapfile) + png = mapfile.replace(".map", "_arcpy.png") print '''
  • Layer: %s

  • + Anzahl der Layer: %s -''' % (basename, len(layers)) +''' % (basename, png, png, len(layers)) i = 0 print "" +def generateArcImage(mapfile): + basename = os.path.basename(mapfile) + mxdfile = mapfile.replace(".map",".mxd") + output = mapfile.replace(".map", "_arcpy.png") + if debug: + print "MXDfile: %s\nOutput: %s " % (mxdfile, output) + + if not output: + import arcpy + mxd = arcpy.mapping.MapDocument(mxdfile) + df = arcpy.mapping.ListDataFrames(mxd)[0] + arcpy.mapping.ExportToPNG(mxd, output, df, df_export_width=800, + df_export_height=600, world_file=True) + del mxd + + def writeGroups(mapfile,groups): if len(groups) > 1: print "Anzahl der Gruppen: %s" % len(groups) @@ -103,6 +121,7 @@ ext = line[9:].replace('"','').replace(' ', ',') extent.append(ext) + generateArcImage(f) print ""