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

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

new mapweaver version; help texts for rule properties

File size: 2.6 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
30# TODO
31# -area labels
32# -different tempfilenames
33
34my $version = "0.22" ;
35my $programName = "mapweaver" ;
36
37use strict ;
38use warnings ;
39
40use OSM::osm ;
41use mwConfig ;
42use mwMap ;
43use mwRules ;
44use mwFile ;
45use mwNodes ;
46use mwWays ;
47use mwRelations ;
48use mwMulti ;
49use mwMisc ;
50
51my $time0 = time() ; 
52
53
54print "\n$programName $version by gary68\n\n" ;
55
56initConfig() ;
57
58getProgramOptions() ;
59
60readConfigFile( cv('ini') ) ;
61
62if ( cv('help') eq "1" ) {
63        printConfigDescriptions() ;
64        printValidObjectProperties() ;
65        die ("quit after help output\n") ;
66}
67
68if ( cv('verbose') eq "1" ) {
69        printConfig() ;
70}
71
72readRules() ;
73
74if ( cv('debug') eq "1" ) {
75        printNodeRules() ;
76        printWayRules() ;
77        printAreaRules() ;
78        printRouteRules() ;
79}
80
81readFile() ;
82
83adaptRuleSizes() ;
84
85if ( cv('multionly') eq "0" ) {
86
87        processNodes() ;
88
89        if ( cv('poi') eq "1") {
90                createPoiDirectory() ;
91        }
92
93        initOneways() ;
94        processWays() ;
95
96        if ( cv('dir') eq "1") {
97                createDirectory() ;
98        }
99
100        if ( cv('dirpdf') eq "1") {
101                createDirPdf() ;
102        }
103
104        processRoutes() ;
105
106} # multionly
107
108processMultipolygons() ;
109
110
111if ( cv('legend') ne "0" ) { createLegend() ; }
112
113if ( cv('pagenumbers') ne "" ) { processPageNumbers() ; }
114if ( cv('rectangles') ne "" ) { processRectangles() ; }
115
116writeMap() ;
117
118my ($paper, $x, $y) = fitsPaper () ; $x = int ($x*10) / 10 ; $y = int ($y*10) / 10 ;
119print "map ($x cm x $y cm) fits paper $paper\n\n" ;
120
121my $time1 = time() ;
122print "\n$programName finished after ", stringTimeSpent ($time1-$time0), "\n\n" ;
Note: See TracBrowser for help on using the repository browser.