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

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

mapweaver: label halo; pbf support; bold and italic fonts

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