Home

Mapgen User`s manual

image

Contents

1. style style csv original can be kept and maintained in OO sheet or MS Excel in also supports osm bz2 format Default output name is mapgen svg Output Basic and only output format from mapgen itself is SVG That has the advantage that all further formats contain all elements that mapgen can produce Disadvantage 1s a post processing done by inkscape out file svg png and pdf names are automatic DEFAULT mapgen svg There are two options specifying additional output formats png also produce png inkscape must be installed very big pdf also produce pdf inkscape must be installed The names are automatic and derived from the out name Inkscape must be installed and your system must be able to run it from command line in the current directory The PNG files are rather big So maybe some post processing is appropriate Usage examples Most simple form perl mapgen pl in file osm style mapgenRules csv Also specify an output name if you wish perl mapgen pl in file osm style mapgenRules csv out map svg Also specify size and that you want a PDF additionally perl mapgen pl in file osm style mapgenRules csv size 2048 pdf Now let s say you have a big osm file but only want a map of a certain city perl mapgen pl in germany osm style mapgenRules csv place Frankfurt This will probably not cover the whole of Frankfurt because the default radiuses are too small 2km each direction perl mapgen p
2. Times Baskerville e Verdena Symbol Oneways oneways add oneway arrows onewaycolor TEXT color for oneway arrows era i Mauergasse i CNS dl T pee Extracts If you don t wan t the whole osm data to be printed that is contained in the file no problem As long as you have installed osmosis and this can be invoked from the current directory by command line Just specify the name of a place or a node id and mapgen will look for such a place Upon success it will invoke osmosis to extract the needed data By default a width and height of 4km 2 2km radius 1s set But of course it can be overridden place TEXT Place to draw automatically quotation marks can be used if necessary node id can be given alternatively OSMOSIS REQUIRED lonrad FLOAT radius for place width in km DEFAULT 2 latrad FLOAT radius for place width in km DEFAULT 2 Program will print used OSMOSIS string to STDOUT for later use Declutter Usually when drawing maps especially with lots of details clutter may occur emapgen will register an used area for each drawn label except street labels and won t use this area again emapgen will register an used area for each drawn icon and won t use this area again mapgen registers a polygon for each drawn way label and will prevent collision Icons will be placed at the given location Text labels for nodes and areas will be placed on a default position and orientati
3. Ha heL Mereu au a e tee G5 Edeka Kundenparkplatz G7 Falkenberg Keramag E7 Bed eS SIM dra F6 GeldaltoMali nd eal Statistics You can print a tag statistic about the usage of the keys and values To keep the list short unimportant keys are omitted This must be adapted in the code if desired The idea is to see what keys are used mostly So you can decide for which features rules are needed Mapgen will print an alphabetical list of keys and values as well as a list of the most used k v combinations At the end of each line the program prints if it knows a rule for that k v Output is separated for nodes and ways and will be written in a file called name_tagstat txt tagstat lists keys and values used in osm file short see code array noListTags TOR 20 TESTS highway highway oneway highway highway highway TOGE highway oreko kialo bicycle amenity surface service highway landuse highway highway highway amenity amenity residential footway yes service primary steps yes secondary yes yes parking cobblestone parking_aisle pedestrian residential track path living_street restaurant pharmacy 123 hebra ay WOCDOOFRNAWOFRAE OI O1 O1 01 OY O CO program filters list to keep them RULE RULE RULE RULE RULE RULE RULE RUER RULE RULE Obviously we should maybe implement a rule for oneway yes And we can see that by far the most used tag here is highway res
4. grid can be laid over the map Just specify the number of squares you want in longitude direction The other dimension is automatic Of course you can specify the grid color The grid squares are labeled numerically and alphabetically grid lt integer gt number parts for grid O no grid DEFAULT 0 gridcolor TEXT color for grid lines and labels DEFAULT black E Ah A FIL Krankenhays of Street directory mapgen can even create a street directory It will do so including the grid squares where the street is located if the grid is turned on Output is an unformatted street list to be further processed The grid squares are separated by a tab File name is name_streets txt dir create street directory in separate file if grid is enabled grid squares will be added In the next table you can see a section of the street directory On the left without grids on the right with grid squares Burgstrake BULO TE 624 5 ee oe oe eee a ee BL CohausenstraBRe Cone usensttabe o ess Al A2 Bl Crufterostrafe CFUTTEPOS EaI esearo y aa D2 Elisabethenstra e EHlisabethenstrab a Bz Cl C2 D1 El Eschborner Weg ESechpbocner WEG 6 ace Sawa e die ee CI Feldbergstrake Feldbergstrabes 14 425464 i5e0 es Al Bl Poi and place list You can print a poi and place list like the street directory Grid option applies as well poi create list of pois PC ee te a6 a Ce le ae Bale a Stade ES Diedenbergen ss sc ecese F4
5. gt residential ij am motorway em primary secondary wh E Es tertiary track a footway path cycleway park we stadium Ti y t1 cemetery e military MM forest __ farmland residential industrial Mapgen by Gary68 User s manual Version 1 01 April 2010 Table of Contents AMOUR i ne 3 A A O E 3 AMA AAA ad 3 Basto parametro eden alee 4 OPUS de aos 4 USAGE CX AIMPICS saonat A E a e T 4 M psizeand the ik cuicce a T Net 5 Advanced parameters untada tros 5 Serios scale TOU MMC alone a a eto leds 7 A AMP a E aaa nieh Snsecaametnetn 8 Pen A a Pr LO nena 8 NOS dio READER 8 Way Sca E E on EII 9 AA er ree Pe E T a re ont ae eee 11 ROU ICON a ia A 13 EO IO SEE EET E A a 13 FOD ase O O 14 OTC Way ose clio 15 Era Sa TET BESES SENERE SEER SEYSE ERE SIGTER ESS EEN SETE 15 Decenas das 16 Grids directory MA A A es 17 Se MICS O acetate tad arrene ware a A Dred re aie norner wae oe awe te 17 Poranna place ta 18 SAUS NO 18 Coordinates AA A AAA A Mua madera idueaanateaiate 20 Introduction Mapgen has its roots in osmdiff pl and osmrender pl They were very basic render programs Once Haiti was hit by the strong earthquake I wanted to provide large png maps for the local help This proved to be hard since so many things couldn t be done with my programs So I decided to improve the features of my renderer and give it a new name So the basic goals became Fast and easy map generation di
6. l legend in top left corner 2 legend in lower right corner DEFAULT 1 You can also place the legend in the lower right corner by giving legend 2 The legend will only show elements that would be drawn if present in the current map scale A ruler is drawn by default in the upper right corner This can be switched off as well Additionally a color can be specified tower residential MOlOrWway primary secondary tertiary track cones footway path cycleway line fail EH park HE forest farmland FE harris ral ruler INT O no ruler l draw ruler DEFAULT 1 rulercolor TEXT DEFAULT black Optionally a scale value can be calculated and added to the map Of course the color for this text can be set scale print scale scalecolor TEXT set scale color DEFAULT black A specific scale can be set 1 e 1 25 000 by adding scaleset 25000 to the command line To be able to work with this information you have to specify the resolution of the output device in dpi By default this is set to 300dpi scaleset INTEGER 1 x preset for map scale overrides size INTEGER set correct printer options scaledpi INTEGER print resolution DEFAULT 300 dpi Setting the scale overrides the size parameter The program will in any case print information on how big the map will be and on what paper size it will fit Setting a scale for rules alone If you s
7. R hickness 8 FromScale INTEGER ToScale INTEGER The colors will be assigned to each found route in order of occurrence in style file if no k v for the colors are present in the osm file Additionally the labels can be configured by command line parameters routelabelcolor TBXT color tor labels of routes routelabelsize INTEGER DEFAULT 8 routelabelfont TEXT DEFAULT sans serif routelabeloffset INTEGER DEFAULT 10 Some bus stops in Frankfurt Route icons Aditionally icons for routes can be added to the map if icons are provided as follows Create folder routeicons and save icons there As the file name choose the ref or the name of the route preceeded by the route type and a dash If the route has a ref the ref has to be used Example routeicons hiking E3 png OR routeicons hiking E3 svg The default icon directory can be changed icondir TEXT dir for icons for routes icondir i e DEFAULT routeicons You can also change the default distance of 23 pixels between multiple icons for same way routeicondist INTEGER dist in y direction for route icons on same route DEFAULT 25 a d cd rr Brunhld ssteln g qu 308 50 23 Teufelsquarti r 45 4995 50 2 i arret S i i f J Colors aliceblue blueviolet cyan darkorange antiquewhite brown darkblue darkorchid aqua burlywood darkcyan darkred aquamarine cadetblue darkgoldenrod darksalmon azure chartr
8. der thickness is gt 0 7 aoe INTEGER Border thickness for the way thickness g Fil Jori 0 area will not be filled 1 area will be filled key where value will be used as 9 label label text entries can be separated by or if AND PRIO special keys _lon and lat 10 label color see below 11 label size INTEGER font size 12 oe owe see below family 13 label offset INTEGER tp os pesadez Ee HORE 14 legend 0 or I entry for automatic legend O no 1 yes applies for areas closd ways areas tagged 15 base layer Oorl with are drawn as background first use for landuse natural etc 16 Icon TEXT Fill icon for area SVG and PNG supported 17 FromScale INTEGER 16 ToScale INTEGER If you want to use SVG files as area tile patterns inkscape is mandatory Using _lon and lat you could nicely label a natural peak using a second rule for elevation 1 e Using area icons Ways with borders ge pol Parkplatz Folder i a i li i ai i ll al i a er Feldberg 46 4995 50 ee Burg Apotheke SS Routes I dl E FE Name Values Description l RouteType bus hiking see wiki gt cdo Malta A set of colors can be given by using the as a delimiter 3 Thickness INTEGER of the line 4 DashType See above of the line a Opacity 0 100 Opacity in percent 6 Label Valid keys Key to get the label from 7 StopNodel INTEGE
9. es 4 Name Values Description see wiki key 66199 values can be separated by a I see above see wiki 2 value an asterisk may be used as a wild card values can be separated by a I see above 3 color see separate table the fill color thickness INTEGER key where value will be the label text entries can 5 label be separated by or AND PRIO special keys _lon and _lat 6 label color see list below label size INTEGER size of text 8 o INTEGER NOT USED RIGHT NOW 9 legend 0 or 10 Icon File name 11 Icon size In pixels 12 FromScale INTEGER 13 ToScale INTEGER A halo can be specified by using the option halo lt FLOAT gt white halo width for point feature labels DEFAULT 0 However then a bold font is used so you also have to adjust ppc to maybe 7 The halo is white and opacity is 90 Use large font sizes Ways Name Values Description 1 ke see wiki gt values can be separated by a I see wiki 1 gt eis an asterisk may be used as a wild card values can be separated by a I 3 color see separate list the fill color 4 thickness INTEGER thickness of line 1 4 for tracks 10 14 relation 1 1 dashes i i 5 e 12003 for borders o the style of the dashes forming 30 35 for steps drawn with gt linecap BUTT Border Border color for the way Only valid if Q color PEA bor
10. euse darkgray darkseagreen beige chocolate darkgreen darkslateblue bisque coral darkgrey darkslategray black cornflowerblue darkkhaki darkslategrey blanchedalmond cornsilk darkmagenta darkturquoise blue crimson darkolivegreen darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon Fonts serif esans serif ecursive efantasy lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspring green mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen monospace
11. fferent output formats Fast extraction of needed data out of osm files place Easy style file handling e Street and place directories Keep it simple easy invocation with only 2 mandatory parameters e Keep it powerful by using more parameters Hints The projection method used is not appropriate for very big areas Be aware that at the edges of the map items may be missing This may occur when items are not completely contained in the osm file You can try to prevent this by using the clip parameter with larger values Installation Put the mapgen pl file in a folder Put pm files in a subfolder called OSM can also be put into a directory contained in the INC pathes Get Math Poygon from CPAN and create a subfolder Math can also be put into a directory contained in the INC pathes Install osmosis if desired take care that it can be invoked from command line Install inkscape if desired take care that it can be invoked from command line This is necessary when usein SVG files as tile patterns or when converting from SVG to PNG or PDF bzip2 installation sudo apt get install libcompress bz1p2 perl eGD installation sudo apt get install libed graph3d perl Information about Osmosis can be found here http wiki openstreetmap org wiki Osmosis Basic parameters Obviously there are some things that can t be hidden from the user So the user has to specify at least 2 basic parameters in file osm
12. idential Coordinates Grid You can add a grid of coordinates to your map by specifying the coords option By default the grid distance is 0 01 degrees This can be changed by using the coordsexp parameter The value given here is the power of 10 2 means 0 01 degrees 2 means 10 degrees And of course the color can be changed coords turn on coordinates grid coordsexp INTEGER degrees to the power of ten for grid distance DEFAULT 2 equals 0 01 degrees coordscolor TEXT set color of coordinates grid A h CAS UA Beta data qe pr aser ap ofa nail rae ede P T Epnrad Ad m uer Seh le 1 Debug Verbose will turn on lots of information to be printed while program executes This is mostly done for debug purposes verbose If you want to print a map only containing multipolygons you can specify so This is also a debug function although a graphical one multionly draws only areas of multipolygons for test purposes
13. l in germany osm style mapgenRules csv place Frankfurt lonrad 10 latrad 10 Now we want our map with grid lines and a street directory perl mapgen pl in file osm style mapgenRules csv grid 8 dir And let s turn off the legend perl mapgen pl in file osm style mapgenRules csv legend 0 Map size and the like The background color can be set according to the given color set The size of the picture 1s specified by the width in pixels Height is automatically calculated Clipping means that not all of the data given in the osm file will be presented This 1s useful to clip incomplete data at the edges of the area in the osm file Clipping can be done by a percentage or by giving a bounding box which might be more precise Padding means to pad the map with an empty border Useful for islands Program will output some useful information about map and paper sizes as well as resolution and scale bgcolor TEXT color for background size lt integer gt in pixels for x axis DEFAULT 1024 clip lt integer gt percent data to be clipped on each side O no clipping DEFAULT 0 SC LPD lt i lodar lt Oats float loa lefty ments DOLO bop Of DOOL EOL clipping map out of data more precise than clip pad lt INTEGER gt percent of white space around data in osm file DEFAULT 0 Advanced parameters By default a legend is drawn in the upper left corner This can be switched off legend INT 0O no legend
14. on If this is not possible other positions and alignments will be tried So labels might me moved and or omitted at all At the end of map drawing program will show how many labels and icons were omitted or moved To prevent a special form of clutter caused by certain parallel ways the following option may be specified declutter declutter text WARNING some labels might be omitted motorway and trunk will only be labeled in one direction eMotorways and trunks will be labeld only in one direction mapgen tries not to put labels on ways that are too short To do so it calculates the length of the way and the length of the text This is done by assuming a need of 6 pixels per character for a 10pt font Other font sizes are calculated automatically If you find out that 6 ppc doesn t suit your used font please reconfigure the value using the following option ppc lt float gt pixels needed per label char using font size 10 DEFAULT 5 5 Using option allowiconmove you can permit the program to slightly move icons if they don t fit the original position Icons might be moved by 10 pixels in each direction Labels are drawn afterwards and will be placed accordingly Using this option will significantly increase the number of drawn icons in cluttered areas In Frankfurt using a scale of 1 50 000 150 more icons could be drawn allowiconmove allows icons to be moved if they don t fit the exact position Grids directory and stats A
15. pecify a certain scale for rulescaleset then for selecting rules not the actual scale of the map is used but the specified one This 1s useful to show more or less details than initially intended by the given ruleset minScale maxScale A similar function can be found in the Garmin GPS receivers Map details normal more most less least rulescaleset INTEGER determines the scale used to select rules DEFAULI 0 meaning actual map scale is used to select rules Style file format In any case only one rule per object is used And this is the first matching rule according to the style file So it s possible 1 e first to look after all tracktype X Y and then having a default rule for all highway track So it is important to have more specific rule higher above in the sheet file The different sections of the file start with a SECTION line This line contains the word SECTION in the first cell These lines are mandatory even if no rules for a section are present You can add COMMENT lines for remarks if you enter COMMENT in the first cell These lines will be omitted when style file is read File Note that you can enter multiple key value pairs for a rule Valid for nodes and ways Different entries must be separated by a I If you for example want a rule for all tracks with tracktype grade1 then the entries would be column key tag highway tracktype column value track gradel Nodes Column

Download Pdf Manuals

image

Related Search

Related Contents

プラグイン方式 絶縁2出力型 2線式伝送器入力変換器 MS5307 取扱  Operating Instructions  Grundig GSD 300  Acco PocketMouse for Notebook  Samsung NV3 User's Manual  1. 化学物質等および会社情報 2. 危険有害性の要約  MUND CLIMA® - Salvador Escoda SA  papier transfert echenillable pour impression thermique  manuel d`utilisation modele ylrto.5-5m  019 Editing Files  

Copyright © All rights reserved.
Failed to retrieve file