Mercurial > mxd2map
annotate contrib/python/generateHTML.py @ 227:58d8ac962683
Replaced position of GetCaps-Link
author | Stephan Holl <stephan.holl@intevation.de> |
---|---|
date | Wed, 27 Jul 2011 13:45:21 +0200 |
parents | 18cb0b709df8 |
children | 1cfb92731f48 |
rev | line source |
---|---|
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
2 # |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
3 # (C) 2011, Intevation GmbH, Stephan Holl <stephan.holl@intevation.de> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
4 # |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
5 # |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
6 # Generate a HTML-Page based on a recursive folder structure of generated |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
7 # mapfiles from MXD2map |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
8 # |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
9 # |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
10 # Usage: generateHTML.py > output.html |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
11 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
12 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
13 import os |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
14 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
15 # this is intended to run in the folder where the generates mapfiles are |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
16 # stored: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
17 rootdir = os.getcwd() + '/map-test-2' |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
18 debug = False |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
19 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
20 # adopt for you needs: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
21 url = 'http://localhost/cgi-bin/mapserv.exe' |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
22 getmap = url + '?Request=GetMap&Service=WMS&Version=1.1.1' |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
23 getmap += '&srs=EPSG:4326&width=800&height=600&format=image/png&styles=' |
225
a9a3ce2625a8
Added Link to GetCapabilities
Stephan Holl <stephan.holl@intevation.de>
parents:
224
diff
changeset
|
24 getcaps = url + '?Request=GetCapabilities&Service=WMS&Version=1.1.1' |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
25 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
26 def writeHeader(): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
27 print '''<html> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
28 <head> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
29 <title>MXD2map-examples</title> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
30 <style> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
31 body { |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
32 font-family: arial, sans-serif; |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
33 font-size: 12pt; |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
34 } |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
35 </style> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
36 </head> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
37 <body> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
38 <h1>Verfuegbare MXD-Dateien</h1> |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
39 ''' |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
40 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
41 def writeFooter(): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
42 content = "</body></html>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
43 print content |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
44 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
45 def writeLayers(mapfile, layers, extent): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
46 basename = os.path.basename(mapfile) |
217
13f1cf17f620
[mq]: arcpy_image
Stephan Holl <stephan.holl@intevation.de>
parents:
216
diff
changeset
|
47 png = mapfile.replace(".map", "_arcpy.png") |
227
58d8ac962683
Replaced position of GetCaps-Link
Stephan Holl <stephan.holl@intevation.de>
parents:
226
diff
changeset
|
48 gc = getcaps + '&map=' + mapfile |
58d8ac962683
Replaced position of GetCaps-Link
Stephan Holl <stephan.holl@intevation.de>
parents:
226
diff
changeset
|
49 print '''<li>Layer: <strong>%s</strong> | <a target='_getcaps' href='%s'>GetCapabilities</a></li> |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
50 <br> |
221
a44d442577ca
Fixes correct paths for Browser-output, added target for GROUP-output
Stephan Holl <stephan.holl@intevation.de>
parents:
217
diff
changeset
|
51 <a target="bild" href="file://%s"><img witdth="80" height="60" border="" src="file://%s"></a> |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
52 Anzahl der Layer: %s |
227
58d8ac962683
Replaced position of GetCaps-Link
Stephan Holl <stephan.holl@intevation.de>
parents:
226
diff
changeset
|
53 ''' % (basename, gc, png, png, len(layers)) |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
54 i = 0 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
55 print "<ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
56 while i < len(layers): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
57 urlmapfile = url + '?map=' + mapfile |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
58 urlmapfile += '&template=openlayers&mode=browse&layers=' + layers[i] |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
59 gm = getmap + '&map=' + mapfile + '&layers=' + layers[i] |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
60 if extent: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
61 ext = str(extent).strip('[\'\'\\r\\n]') |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
62 gm += '&bbox='+''.join(ext) |
227
58d8ac962683
Replaced position of GetCaps-Link
Stephan Holl <stephan.holl@intevation.de>
parents:
226
diff
changeset
|
63 print "<li><a target='_new' href='%s'>%s</a> | <a target='_getmap' href='%s'>WMS GetMap</a></li>" % (urlmapfile, layers[i], gm) |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
64 i=i+1 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
65 print "</ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
66 |
216
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
67 def generateArcImage(mapfile): |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
68 basename = os.path.basename(mapfile) |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
69 mxdfile = mapfile.replace(".map",".mxd") |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
70 output = mapfile.replace(".map", "_arcpy.png") |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
71 if debug: |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
72 print "MXDfile: %s\nOutput: %s " % (mxdfile, output) |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
73 |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
74 if not output: |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
75 import arcpy |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
76 mxd = arcpy.mapping.MapDocument(mxdfile) |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
77 df = arcpy.mapping.ListDataFrames(mxd)[0] |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
78 arcpy.mapping.ExportToPNG(mxd, output, df, df_export_width=800, |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
79 df_export_height=600, world_file=True) |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
80 del mxd |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
81 |
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
82 |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
83 def writeGroups(mapfile,groups): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
84 if len(groups) > 1: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
85 print "Anzahl der Gruppen: %s" % len(groups) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
86 i = 0 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
87 print "<ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
88 while i < len(groups): |
222
316a2b3d4126
added switch for replacing backslashes in win32
Stephan Holl <stephan.holl@intevation.de>
parents:
221
diff
changeset
|
89 if os.name == "nt": |
316a2b3d4126
added switch for replacing backslashes in win32
Stephan Holl <stephan.holl@intevation.de>
parents:
221
diff
changeset
|
90 mapfile = mapfile.replace('\\', '/') |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
91 urlmapfile = url + '?map=' + mapfile |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
92 urlmapfile += '&template=openlayers&mode=browse&layers=' + groups[i] |
221
a44d442577ca
Fixes correct paths for Browser-output, added target for GROUP-output
Stephan Holl <stephan.holl@intevation.de>
parents:
217
diff
changeset
|
93 print "<li><a target='_group' href='%s'>%s</a></li>" % (urlmapfile, groups[i]) |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
94 i=i+1 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
95 print "</ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
96 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
97 def main(): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
98 writeHeader() |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
99 for root, subFolders, files in os.walk(rootdir): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
100 for file in files: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
101 f = os.path.join(root, file) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
102 if os.path.isfile(f): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
103 basename, extension = os.path.splitext(f) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
104 if extension.lower() == ".map": |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
105 if "orig" in f: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
106 # do not generate links for -orig.map-files |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
107 continue |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
108 if debug: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
109 print "Bearbeite Dokument %s" % f |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
110 #read file and search for wms_title |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
111 layers = [] |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
112 groups = [] |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
113 extent = [] |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
114 for line in open(f): |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
115 if "wms_title" in line: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
116 #print line |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
117 la = line.strip()[12:].replace('"','') |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
118 if la != "Layers": |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
119 layers.append(la) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
120 if "GROUP" in line: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
121 gr = line.strip()[6:].replace('"','') |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
122 if gr not in groups: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
123 groups.append(gr) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
124 if "EXTENT" in line: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
125 ext = line[9:].replace('"','').replace(' ', ',') |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
126 extent.append(ext) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
127 |
216
d0acdab62b03
imported patch arcpy-erweiterung
Stephan Holl <stephan.holl@intevation.de>
parents:
208
diff
changeset
|
128 generateArcImage(f) |
208
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
129 print "<ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
130 writeLayers(f, layers, extent) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
131 print "</ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
132 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
133 # write groups |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
134 print "<ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
135 writeGroups(f, groups) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
136 print "</ul>" |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
137 if debug: |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
138 print "Layer %s hat %s Layer" % (f, len(layers)) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
139 print "Layer %s hat %s Gruppen" % (f, len(groups)) |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
140 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
141 writeFooter() |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
142 |
0c58db91311c
* contrib/python/generateHTML.py: New. Script for generating a
Stephan Holl <stephan.holl@intevation.de>
parents:
diff
changeset
|
143 main() |