source: subversion/applications/utils/gary68/mw.pl @ 26507

Last change on this file since 26507 was 26507, checked in by gary68, 8 years ago

mapweaver: small svg bux fixed

File size: 3.1 KB
Line 
1
2
3# 0.03 20110614 -help
4# 0.03 20110614 square for nodes
5# 0.03 print prg name and version
6# 0.03 ruler
7# 0.04 ruler positions; ruler background; disc opacity correction; -debug; -verbose
8# 0.04 scale, colors and positions; header/footer
9# 0.04 triangle and diamond for nodes; labels and icons for nodes
10# 0.05 categories for config values
11# 0.06 drawArea; area rules; extended help, added valid object properties
12# 0.07 way labels; minsizearea implemented;
13# 0.08 added coastlines; problems with completeObjects! use option -cie
14# 0.09 oneways
15# 0.10 pagenumbers; rectangles; comments and empty lines in rule file; config in rule file
16# 0.10 coast lines fixed; auto bridge implemented
17# 0.11 area icons / patterns added; time; street directory; poi directory; pdf directoriy
18# 0.12 way shields
19# 0.13 routes, not yet working...
20# 0.14 route work
21# 0.15 routes working now - finetuning needed; bgbolor implemented; multipolygons
22# 0.16 size check for multipolygon areas; scale rule sizes (x:y)
23# 0.17 -forcenodes; projection in footer
24# 0.18 direxclude options and rule properties
25# 0.19 pagenumber bug solved
26# 0.20 legend
27# 0.21 legend in separate file
28# 0.22 help texts for object properties in rule file
29# 0.23 latex string sanitize
30# 0.24 labels for areas
31# 0.25 labels for multipolygons
32# 0.26 fix directory bugs
33# 0.27 way name substitution, if name is too long for way. incl. legend for map
34# 0.28 oceancolor bug fixed
35# 0.29 fonts/families
36# 0.30 -wns=5 now possible; way name substitutions in separate file
37# 0.31 getXXXrule bug fixed; wnsunique
38# 0.32 -targetSize
39# 0.33 -onewayautosize
40# 0.34 pbf support; halo; label transform; bold print of labels
41# 0.35 svg text creation bug fixed
42# 0.36
43
44# TODO
45# -different tempfilenames
46
47my $version = "0.35" ;
48my $programName = "mapweaver" ;
49
50use strict ;
51use warnings ;
52
53use OSM::osm ;
54use mwConfig ;
55use mwMap ;
56use mwRules ;
57use mwFile ;
58use mwNodes ;
59use mwWays ;
60use mwRelations ;
61use mwMulti ;
62use mwMisc ;
63
64my $time0 = time() ; 
65
66
67print "\n$programName $version by gary68\n\n" ;
68
69initConfig() ;
70
71getProgramOptions() ;
72
73readConfigFile( cv('ini') ) ;
74
75if ( cv('help') eq "1" ) {
76        printConfigDescriptions() ;
77        printValidObjectProperties() ;
78        die ("quit after help output\n") ;
79}
80
81if ( cv('verbose') eq "1" ) {
82        printConfig() ;
83}
84
85readRules() ;
86
87if ( cv('debug') eq "1" ) {
88        printNodeRules() ;
89        printWayRules() ;
90        printAreaRules() ;
91        printRouteRules() ;
92}
93
94readFile() ;
95
96adaptRuleSizes() ;
97
98if ( cv('multionly') eq "0" ) {
99
100        processNodes() ;
101
102        if ( cv('poi') eq "1") {
103                createPoiDirectory() ;
104        }
105
106        initOneways() ;
107        processWays() ;
108
109        if ( cv('dir') eq "1") {
110                createDirectory() ;
111        }
112
113        if ( cv('dirpdf') eq "1") {
114                createDirPdf() ;
115        }
116
117        processRoutes() ;
118
119} # multionly
120
121processMultipolygons() ;
122
123
124if ( cv('legend') ne "0" ) { createLegend() ; }
125
126if ( cv('pagenumbers') ne "" ) { processPageNumbers() ; }
127if ( cv('rectangles') ne "" ) { processRectangles() ; }
128
129writeMap() ;
130
131my ($paper, $x, $y) = fitsPaper () ; $x = int ($x*10) / 10 ; $y = int ($y*10) / 10 ;
132print "map ($x cm x $y cm) fits paper $paper\n\n" ;
133
134my $time1 = time() ;
135print "\n$programName finished after ", stringTimeSpent ($time1-$time0), "\n\n" ;
136
Note: See TracBrowser for help on using the repository browser.