changeset 218:fb1ffd385115

merged with upstream changes
author Stephan Holl <stephan.holl@intevation.de>
date Mon, 25 Jul 2011 11:09:52 +0200
parents 13f1cf17f620 (diff) 69ec9129ff96 (current diff)
children f13f51627f07 a44d442577ca
files doku/funktionsweise/funktionsweise-MXD-konverter.svg ttf-fonts/esri_1.ttf ttf-fonts/esri_105.ttf ttf-fonts/esri_11.ttf ttf-fonts/esri_12.ttf ttf-fonts/esri_121.ttf ttf-fonts/esri_13.ttf ttf-fonts/esri_130.ttf ttf-fonts/esri_131.ttf ttf-fonts/esri_132.ttf ttf-fonts/esri_133.ttf ttf-fonts/esri_14.ttf ttf-fonts/esri_144.ttf ttf-fonts/esri_149.ttf ttf-fonts/esri_15.ttf ttf-fonts/esri_150.ttf ttf-fonts/esri_151.ttf ttf-fonts/esri_152.ttf ttf-fonts/esri_153.ttf ttf-fonts/esri_159.ttf ttf-fonts/esri_16.ttf ttf-fonts/esri_160.ttf ttf-fonts/esri_161.ttf ttf-fonts/esri_17.ttf ttf-fonts/esri_19.ttf ttf-fonts/esri_2.ttf ttf-fonts/esri_20.ttf ttf-fonts/esri_21.ttf ttf-fonts/esri_216.ttf ttf-fonts/esri_22.ttf ttf-fonts/esri_220.ttf ttf-fonts/esri_221.ttf ttf-fonts/esri_222.ttf ttf-fonts/esri_223.ttf ttf-fonts/esri_224.ttf ttf-fonts/esri_225.ttf ttf-fonts/esri_23.ttf ttf-fonts/esri_24.ttf ttf-fonts/esri_25.ttf ttf-fonts/esri_26.ttf ttf-fonts/esri_27Mcr_2.ttf ttf-fonts/esri_29.ttf ttf-fonts/esri_3.ttf ttf-fonts/esri_30s.ttf ttf-fonts/esri_33.ttf ttf-fonts/esri_34.ttf ttf-fonts/esri_375.ttf ttf-fonts/esri_376.ttf ttf-fonts/esri_377.ttf ttf-fonts/esri_39.ttf ttf-fonts/esri_4.ttf ttf-fonts/esri_40.ttf ttf-fonts/esri_400.ttf ttf-fonts/esri_405.ttf ttf-fonts/esri_406.ttf ttf-fonts/esri_44.ttf ttf-fonts/esri_47.ttf ttf-fonts/esri_48.ttf ttf-fonts/esri_49.ttf ttf-fonts/esri_5.ttf ttf-fonts/esri_500.ttf ttf-fonts/esri_651.ttf ttf-fonts/esri_652.ttf ttf-fonts/esri_7.ttf ttf-fonts/esri_730.ttf ttf-fonts/esri_8.ttf ttf-fonts/esri_800.ttf ttf-fonts/esri_801.ttf ttf-fonts/esri_802.ttf ttf-fonts/esri_803.ttf ttf-fonts/esri_804.ttf ttf-fonts/esri_832.ttf ttf-fonts/esri_837.ttf ttf-fonts/esri_9.ttf website/img/funktionsweise-MXD-konverter.png website/img/funktionsweise-MXD-konverter_small.png
diffstat 1 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 '''<li>Layer:  <strong>%s</strong></li>
 <br>
+<a target="bild" href="%s"><img witdth="80" height="60" border="" src="%s"></a>
 Anzahl der Layer: %s
-''' % (basename, len(layers))
+''' % (basename, png, png, len(layers))
     i = 0
     print "<ul>"
     while i < len(layers):
@@ -60,6 +62,22 @@
         i=i+1
     print "</ul>"
 
+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 "<ul>"
                     writeLayers(f, layers, extent)
                     print "</ul>"
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)