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