├── .nojekyll
├── .prettierignore
├── .prettierrc.json
├── ARCHITECTURE.md
├── CONTRIBUTING.md
├── COPYING
├── README.md
├── examples
├── general_high_zoom.html
├── general_high_zoom_-_airport.png
├── general_high_zoom_-_road_crossing.png
├── general_high_zoom_map_style.js
├── generated
│ ├── general_high_zoom_taginfo.json
│ ├── laser_neighbourhood_taginfo.json
│ └── laser_road_area_taginfo.json
├── laser_neighbourhood.html
├── laser_neighbourhood_-_Madalińskiego.png
├── laser_neighbourhood_map_style.js
├── laser_road_area.html
├── laser_road_area_map_style.js
├── laser_road_area_prototype_delivered_cropped.jpg
├── lunar_assembler.dist.css
├── lunar_assembler.dist.js
├── lunar_assembler_in_action.gif
├── simple.html
├── simple_map_style_-_Sztynort.png
└── taginfo_file_generate.js
├── images_for_description
└── logo_osmf.png
├── lunar_assembler.js
├── lunar_assembler_dependencies
├── COPYING
├── d3-v5.16.0.js
├── leaflet-draw.v-zombie-bleeding-edge-latest-commit-with-manually-inlined-rectangle-svg.css
├── leaflet-draw.v-zombie-bleeding-edge-latest-commit.js
├── leaflet-v0.7.js
├── leaflet-version0.7_references_to_layer_switcher_image_commented_out.css
├── osmtogeojson.js
├── polygon-clipping.umd.js
└── turf.min.js
├── lunar_assembler_helpful_functions_for_map_styles.js
├── lunar_assembler_helpful_functions_for_map_styles_apply_patterns_to_areas.js
├── lunar_assembler_helpful_functions_for_map_styles_generate_inaccessible_areas.js
├── lunar_assembler_helpful_functions_for_map_styles_generate_symbolic_steps_from_area_highway.js
├── lunar_assembler_helpful_functions_for_map_styles_generate_symbolic_zebra_bars.js
├── lunar_assembler_helpful_functions_for_map_styles_openstreetmap_tagging_knowledge.js
├── lunar_assembler_helpful_functions_for_map_styles_unified_styling_handler.js
├── npm_replacement.py
└── tests
└── run_tests.js
/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matkoniecz/lunar_assembler/45fb1e623f78b23e13fc8e60f660b51ef6736f59/.nojekyll
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | lunar_assembler_dependencies
2 | examples/lunar_assembler.dist.css
3 | examples/lunar_assembler.dist.js
4 | *.html
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/ARCHITECTURE.md:
--------------------------------------------------------------------------------
1 | # Why it exists
2 |
3 | I needed SVG generator from OpenStreetMap data that would be accessible to anyone, without requirements to install anything new.
4 |
5 | Generated SVG must be usable as design files for laser cutter, for a [specific project](https://wiki.openstreetmap.org/wiki/Microgrants/Microgrants_2020/Proposal/Tactile_maps_for_blind_or_visually_impaired_children) (tactile maps for blind or visually impaired children).
6 |
7 | # Fundamentals
8 |
9 | Obtains OpenStreetMap data and generates SVG map from that.
10 |
11 | It must run as client side JS hosted on static page. Server-side solution is rejected as neither needed nor viable here. Serving it as a static site has a nice side-effect of making potential reuse easier.
12 |
13 | Performance was not considered during design, as main target of work would involve tiny areas. It is also intended as a feasibility test to check is it possible at all, and to identify what is bottleneck.
14 |
15 | # Alternatives
16 |
17 | There are some [known tools](https://wiki.openstreetmap.org/wiki/SVG) for that, but none working as client-side JS.
18 |
19 | Some were potentially adaptable, but ignored due to having too interesting architecture. For example [Osmarender](https://wiki.openstreetmap.org/wiki/Osmarender/Convert_osm_data_from_OSM_file_to_an_SVG_image) using XSLT to transform OSM XML into SVG XML or compiling my Python scripts to JS using [pyodide](https://github.com/pyodide/pyodide) was considered and discarded.
20 |
21 | # Structure
22 |
23 | ## GUI for triggerring generation
24 |
25 | GUI for selecting rectangle that will be processed - Leaflet + Leaflet-draw plugin.
26 |
27 | ## Obtaining OSM data
28 |
29 | Gets bounding box as an argument, returns geojson for further processing.
30 |
31 | Fetching OpenStreeMap data - [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API)
32 |
33 | OpenStreetMap data from the Overpass into geojson - [osmtogeojson](http://tyrasd.github.io/osmtogeojson/)
34 |
35 | # Generating SVG
36 |
37 | One extra step is needed because d3 is extraspecial and is deliberately breaking RFC 7946. So it is necessary to rewind all geometries to follow left-hand rule rather than right-hand rule. And d3 for now has this trap rather than fix it and release breaking update that would [fix this mess](https://github.com/d3/d3-geo/pull/79#issuecomment-281031437). (to be fair D3 predates RFC 7946 - but doing thing reverse than anyone else is an annoying trap)
38 |
39 | Rendering geojson data as SVG is done using [d3.js](https://d3js.org/).
40 |
41 | Allowing to download that SVG is fairly simple once SVG is part of web page.
42 |
43 | # Why JS?
44 |
45 | I started writing it as Python script, before realising that intended audience should not be assumed to be programmers (unlike say [library for automating OSM edits](https://github.com/matkoniecz/osm_bot_abstraction_layer)).
46 |
47 | So CLI installed as Python module would be a massive barrier for potential users, GUI would be really problematic. Even with self-contained installer people would still need to install something - again, a significant barrier.
48 |
49 | Still, people would need to install random executable.
50 |
51 | Visiting page in browser is significantly easier to use and has much lower barrier.
52 |
53 | # npm rant
54 |
55 | My dislike toward JS was significantly reduced while writing this - maybe even eliminated.
56 |
57 | My dislike toward `npm` ecosystem got confirmed, at least for now. The `npm_attempt` branch was so far massive time sink, I wasted a lot of time and I still have no working replacement. Note: while it may be a TypeScript fault or my failure to find a proper documentation... I tried really hard how to make something that would allow me to
58 |
59 | - specify dependencies
60 | - allow to easily update them
61 | - generate .js bundle from that
62 | - - skipping unused code from libraries is strongly preferable, but that is optional
63 | - do some code linting/autoformatting
64 |
65 | And I failed completely. Note that it is likely problem is not caused by my incopetence. I figured how to do it in Ruby and in Python, with just documentation that I found online. And here I failed even with external help (so far at least!).
66 |
67 | Note: if someone is able to point out how can I get working `leaflet-draw` (or equivalent) in TypeScript I would be thankful ( current attempt state in [https://github.com/matkoniecz/lunar_assembler/commits/npm_attempt](https://github.com/matkoniecz/lunar_assembler/commits/npm_attempt) ).
68 |
69 | Similarly if someone knows sane way to have simple working method to manage `.js` dependencies I would appreciate it.
70 |
71 | Fun fact: [https://docs.npmjs.com/getting-started](https://docs.npmjs.com/getting-started) has info how to upgrade to a paid account but no info how to do accomplish fundamental actually useful tasks with `npm`.
72 |
73 | [https://docs.npmjs.com/using-npm-packages-in-your-projects](https://docs.npmjs.com/using-npm-packages-in-your-projects) has
74 |
75 | > Once you have installed a package in node_modules, you can use it in your code.
76 |
77 | what explain exactly nothing how the heck I should do it
78 |
79 | # Feedback
80 |
81 | If you looked here to find something and it is not present - please open an issue.
82 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # To rebuild code you need to run npm_replacement.py script!
2 |
3 | Use `python3 npm_replacement.py` to do that.
4 |
5 | # Welcome!
6 |
7 | Contributions are highly welcomed!
8 |
9 | Bug reports, pull requests are welcomed and invited.
10 |
11 | For bigger changes I strongly encourage to create an issue first to review the idea.
12 |
13 | Issues with scathing criticism of code quality are also welcomed, as long as you are specific and clear what is wrong and how it can be improved.
14 |
15 | # License
16 |
17 | Note that by contributing code you are licensing it to license used by this repository (AGPL).
18 |
19 | # Installing development dependencies
20 |
21 | `sudo npm install -g prettier`
22 |
23 | # Detect code style issues
24 |
25 | ????
26 |
27 | TODO: find JS linter
28 |
29 | # Automatically reformat code to follow some sane coding style
30 |
31 | `npx prettier --print-width 200 --write .`
32 |
33 | Sadly, it is necessary to treat it as suggestions.
34 |
35 | I failed to find for now to:
36 |
37 | - allow multiline array definition, with one element per line
38 | - avoid pointless splitting if statements into multiple lines just because limit of 80 characters was reached
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Lunar assembler
2 |
3 | SVG maps from OpenStreetMap data in browser, can be used by marking area on a map. Using it does not require any programming skills.
4 |
5 | ## In action
6 |
7 | ### General high zoom map style
8 |
9 | [Publicly accessible generation of any location in this map style](https://mapsaregreat.com/osm_to_svg_in_browser/general_high_zoom)
10 |
11 | 
12 |
13 | #### Animation of a typical use
14 |
15 | 
16 |
17 | 
18 |
19 | [try it!](https://mapsaregreat.com/osm_to_svg_in_browser/)
20 |
21 | ### Generating design for laser cut tactile maps
22 |
23 | 
24 |
25 | This map styles are designed for used in a laser cutter, to produce maps for blind.
26 |
27 | [Ultra-high zoom map for showing a single crossing](https://mapsaregreat.com/osm_to_svg_in_browser/laser_road_area), relying on area:highway.
28 |
29 | [high zoom map style for showing neighbourhood, with some attempts to automatically simplify data, no need for area:highway](https://mapsaregreat.com/osm_to_svg_in_browser/laser_neighbourhood).
30 |
31 | #### Laser cut 3D tactile map
32 |
33 |
34 |
35 | 3D tactile map for blind children. Teaching aid for orientation lessons - special subject where children learn how to move on their own across the city. This is a map of a specific crossing, nearby their school. Made using this project, this propotype was donated to the school.
36 |
37 | Cut using file generated by [map style shown in the section above](https://mapsaregreat.com/osm_to_svg_in_browser/laser_road_area).
38 |
39 |
40 |
41 | ## How can I use it on my site?
42 |
43 | This work is AGPL licensed. This means that you also can use it, with requirement to share your improvements (see license for the full info, this is a single-sentence summary).
44 |
45 | [examples](examples) folder contains files necessary to use that in you project:
46 |
47 | - `lunar_assembler.dist.js` (build .js file containing all necessary JS code)
48 | - `lunar_assembler.dist.css` (build .js file containing all necessary CSS code)
49 |
50 | Feel free to use it in your own projects or build on it!
51 |
52 | Pull requests with improvements are also welcomed!
53 |
54 | ### How can I make own map style?
55 |
56 | Map style can be quite simple - just setting colors for lines/areas.
57 |
58 | You can make own map style and use it at your own site.
59 |
60 | You will need to copy [examples/lunar_assembler.dist.css](examples/lunar_assembler.dist.css) and [examples/lunar_assembler.dist.js](examples/lunar_assembler.dist.js) files and include it in your own site.
61 |
62 | Fully functional examples are in an [example](example/) folder.
63 |
64 | There is a very simple but also working map style that can show water area, forests, buildings and marinas. See [this simple example](https://github.com/matkoniecz/lunar_assembler/blob/master/examples/simple.html#L59), this page is hosted and shown [here](https://mapsaregreat.com/osm_to_svg_in_browser/simple).
65 |
66 | 
67 |
68 | #### Advanced map styles
69 |
70 | In some cases one needs to somehow deals with layers. For example, what should be displayed if road in tunnel goes under building? Or under forest? What should be shown if there is a lake in a forest?
71 |
72 | The most complex part of default map style is dealing with layers and it is often quite tricky.
73 |
74 | Map styles also have access to a powerful functionality allowing complete rewriting of geometries, what is necessary to implement some functionality but typically can be ignored. I used it for example to generate zebra crossing bars on detailed road maps and to generate symbolic representations of steps areas.
75 |
76 | ### Help!
77 |
78 | Note: especially this part of documentation is incomplete and would benefit from better info. Please [open an issue](https://github.com/matkoniecz/lunar_assembler/issues/new) and mention what is confusing and where you are stuck. Right now I am not entirely sure what kind of knowledge people using it will have and what and how should be explained.
79 |
80 | ## Other published styles
81 |
82 | Demonstration of [basic high-zoom map style](https://mapsaregreat.com/osm_to_svg_in_browser/general_high_zoom)
83 |
84 | ## Architecture
85 |
86 | It works in following way
87 |
88 | - user selects an area
89 | - Overpass API is called to download OpenStreetMap data in that area
90 | - data is locally processed and rendered
91 |
92 | it means that servers only delivers HTML site, code then runs on client. It still needs access to Overpass API but there are generously provided servers allowing some limited use.
93 |
94 | ### Use on other sites
95 |
96 | [current release and (for now only known use of it)](https://mapsaregreat.com/osm_to_svg_in_browser/)
97 |
98 | ## Potential uses
99 |
100 | SVG files may be much more accessible for further processing than alternatives formats of OSM data.
101 |
102 | SVG files may be directly usable for some purposes, for example in laser cutters.
103 |
104 | ## Mentions of use are welcome
105 |
106 | In case that you used this code or it inspired you to do something - feel free to create an issue with photo/description of what was produced! Or send an email to [matkoniecz@tutanota.com](mailto:matkoniecz@tutanota.com). It would be nice to have confirmation that publishing it was useful for somebody.
107 |
108 | ## Improving documentation
109 |
110 | Please create a new issue if you want to use it but current instructions are insufficient, wrong or can be in some way improved!
111 |
112 | I know that documentation may be far better, but I am not sure what kind of additional documentation would be most useful.
113 |
114 | ## Alternatives
115 |
116 | As usual [OSM Wiki documentation](https://wiki.openstreetmap.org/wiki/SVG#Ways_to_create_an_SVG_map_from_OpenStreetMap) is useful - there are also other ways to [make SVG maps from OpenStreetMap data](https://wiki.openstreetmap.org/wiki/SVG#Ways_to_create_an_SVG_map_from_OpenStreetMap).
117 |
118 | [https://touch-mapper.org/en/](Touch Mapper) is another OSM based tool for making tactile maps. It differs by relying on a 3D printing and by more complex infrastructure.
119 |
120 | It requires Amazon Web Services to run. Inability to put limit on spending there scared me away from basing my work on it. I do not accept idea that bug in my code may result in a 100 000$ bill that may or may not be waived.
121 |
122 | I have run programs that tried to [allocate 4654951TB of memory](https://github.com/a-b-street/abstreet/issues/148) due to a bad configuration and I am scared that Amazon would allow this to happen and then bill me.
123 |
124 | [hapticke.mapy.cz](https://hapticke.mapy.cz/?lang=en) may be useful if you need tactile maps.
125 |
126 | ## Skipped and rejected features
127 |
128 | Note that it is basically impossible to make SVGs that would qualify as high-quality cartography here. As reason why this project exists does not require it (generation of laser cutter designs) it was not considered during design and implementation. But feel free to open issues and create pull requests to add missing functionality!
129 |
130 | ## Sponsors
131 |
132 |
133 |
134 | The [OpenStreetMap foundation](https://wiki.osmfoundation.org/wiki/Main_Page) was funding the development of this project in their first round of the [microgrant program](https://wiki.osmfoundation.org/wiki/Microgrants) in 2020. It was done as part of making [tactile maps based on OpenStreetMap data, for blind or visually impaired children](https://wiki.openstreetmap.org/wiki/Microgrants/Microgrants_2020/Proposal/Tactile_maps_for_blind_or_visually_impaired_children) (part of making used tools accessible to other and OpenStreetMap promotion).
135 |
136 | If anyone else is also interested in supporting this project via funding - [let me know](mailto:osm-messages@etutanota.com) (opening a new issue is also OK) and it is likely that some way of doing that can be found :)
137 |
--------------------------------------------------------------------------------
/examples/general_high_zoom.html:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | General high zoom - SVG map from OpenStreetMap data
25 |
29 |
30 |
31 |
32 |
33 |
34 |
Press the rectangle button, select a rectangle on a map and wait. Note that this tool will work well with small areas. Entire cities may work, but will require long processing. Processing entire countries will fail.
35 |
36 |
Generation of vector maps from OpenStreetMap data. Supports area:highway tagging, works well for tiny areas (single crossing), neighbourhood maps - or of a single forest/airport/etc. Will work for entire town, villages - maybe even entire cities.
37 |
38 |
See also other map styles, allowing generation of other maps from the same OpenStreetMap data.
39 |
40 |
(there is more text below map, you can also see an animation showing how this tool is supposed to work)
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
Move map to a small area interesting for you (a single crossing will work, generating a map of Poland will fail).
51 |
Press the "rectangle" button, choose an area of interest.
52 |
Wait - waiting several seconds is normal, currently no real progress info is displayed during download. Not even progress bar animation is shown when map is generated in your browser, it may take a bit.
53 |
The generated map should appear below the map used for selecting. There is also a download button available below the generated map image.
54 |
Use this map for something!
55 |
56 |
57 |
58 |
Map style has support for areas such as buildings, water, parks, forests, road areas and linear features such as roads, railways, waterways, taxiway, runways. Produced SVG files can be downloaded.
Have fun with using OpenStreetMap data for interesting and/or useful purposes! Just remember that you must mention the source of data in a way visible to whoever will be using it. See this page for details, including cases where it is legally allowed to avoid giving a clear credit (but I encourage to do this in all cases).
72 |
73 |
If you liked this tool, something was confusing - you are welcomed to comment about it by creating a public issue or by sending me an email. You can also post a comment in OSM diary entry.
74 |
75 |
If you want to help mapping and you are unsure how to start - you can try StreetComplete (an Android app) allowing contributions, with sole requirements being (1) ability to read (2) ability to see things (3) ability to create an OpenStreetMap account.
76 |
77 |
If you want to map something (map missing objects, fix a mistake) and you are unsure how to start - visit openstreetmap.org, zoom in to interesting area and press the "edit" button and follow instructions. You can contact the OpenStreetMap community using one of global or local channels listed at community.osm.be and ask for help.
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/examples/general_high_zoom_-_airport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matkoniecz/lunar_assembler/45fb1e623f78b23e13fc8e60f660b51ef6736f59/examples/general_high_zoom_-_airport.png
--------------------------------------------------------------------------------
/examples/general_high_zoom_-_road_crossing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matkoniecz/lunar_assembler/45fb1e623f78b23e13fc8e60f660b51ef6736f59/examples/general_high_zoom_-_road_crossing.png
--------------------------------------------------------------------------------
/examples/general_high_zoom_map_style.js:
--------------------------------------------------------------------------------
1 | /*
2 | lunar_assembler - tool for generating SVG files from OpenStreetMap data. Available as a website.
3 | Copyright (C) 2021 Mateusz Konieczny
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU Affero General Public License as
7 | published by the Free Software Foundation, under version 3 of the
8 | License only.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU Affero General Public License for more details.
14 |
15 | You should have received a copy of the GNU Affero General Public License
16 | along with this program. If not, see .
17 | */
18 | function highZoomMapStyle() {
19 | var mapStyle = {
20 | paintOrder(feature) {
21 | // higher values: more on top
22 |
23 | var valueRangeForOneLayer = 10000;
24 | var layer = 0;
25 | if (feature.properties["layer"] != null) {
26 | /*
27 | ignore layer tag on buildings and similar
28 | to discourage tagging for renderer
29 | note that undeground buildings are later skipped
30 | */
31 | if (
32 | feature.properties["building"] == null &&
33 | (feature.properties["natural"] == null || feature.properties["natural"] == "water") &&
34 | feature.properties["landuse"] == null &&
35 | feature.properties["leisure"] == null
36 | ) {
37 | layer = feature.properties["layer"];
38 | }
39 | }
40 |
41 | if (railwayLinearValuesArray().includes(feature.properties["railway"])) {
42 | var priority = 0.99;
43 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
44 | }
45 | if (feature.properties["area:highway"] != null) {
46 | var priority = 0.98;
47 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
48 | }
49 | if (feature.properties["building"] != null && feature.properties["location"] != "underground") {
50 | var priority = 0.95;
51 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
52 | }
53 | if (feature.properties["aeroway"] == "runway" || feature.properties["aeroway"] == "taxiway") {
54 | var priority = 0.94;
55 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
56 | }
57 | if (feature.properties["barrier"] != null) {
58 | var priority = 0.9;
59 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
60 | }
61 | if (feature.properties["highway"] != null) {
62 | var priority = 0.85;
63 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
64 | }
65 | if (feature.properties["barrier"] != null) {
66 | var priority = 0.7;
67 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
68 | }
69 | if (feature.properties["man_made"] === "bridge") {
70 | var priority = 0.65;
71 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
72 | }
73 | if (feature.properties["waterway"] != null) {
74 | /* render waterway lines under bridge areas */
75 | var priority = 0.6;
76 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
77 | }
78 | if (feature.properties["natural"] === "water" || feature.properties["waterway"] === "riverbank") {
79 | // render natural=wood below natural=water
80 | var priority = 0.1;
81 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
82 | }
83 | if (feature.properties["natural"] === "bare_rock") {
84 | // render natural=wood below natural=bare_rock
85 | // render water rather than underwater rocks
86 | var priority = 0.05;
87 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
88 | }
89 | if (feature.properties["leisure"] != null) {
90 | // render leisure=park below natural=water or natural=wood
91 | // but above landuse=residential
92 | var priority = 0.03;
93 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
94 | }
95 | if (feature.properties["landuse"] != null || feature.properties["aeroway"] == "aerodrome") {
96 | //better higher and trigger layering problems quickly that have something failing ONLY in parks
97 | var priority = 0.02;
98 | return valueRangeForOneLayer * priority + valueRangeForOneLayer * layer;
99 | }
100 | return valueRangeForOneLayer * layer;
101 | },
102 |
103 | unifiedStyling() {
104 | returned = [];
105 | var i = motorizedRoadValuesArray().length;
106 | while (i--) {
107 | value = motorizedRoadValuesArray()[i];
108 | returned.push({
109 | area_color: "#555555",
110 | description: "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)",
111 | matches: [{ key: "area:highway", value: value }],
112 | });
113 | returned.push({
114 | line_color: "#555555",
115 | line_width: 2,
116 | description: "linear representation of a motorized road",
117 | matches: [{ key: "highway", value: value }],
118 | });
119 | }
120 |
121 | var i = railwayLinearValuesArray().length;
122 | while (i--) {
123 | value = railwayLinearValuesArray()[i];
124 | returned.push({
125 | line_color: "black",
126 | line_width: 2,
127 | description: "linear representation of a single railway track",
128 | matches: [{ key: "railway", value: value }],
129 | });
130 | }
131 |
132 | var i = pedestrianWaysValuesArray().length;
133 | while (i--) {
134 | value = pedestrianWaysValuesArray()[i];
135 | returned.push({
136 | area_color: "#aaaaaa",
137 | description: "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)",
138 | matches: [{ key: "area:highway", value: value }],
139 | });
140 | returned.push({
141 | line_color: "#aaaaaa",
142 | line_width: 1,
143 | description: "linear representation of a pedestrian way",
144 | matches: [{ key: "highway", value: value }],
145 | });
146 | }
147 |
148 | var barriersKeyValue = [];
149 | var i = linearGenerallyImpassableBarrierValuesArray().length;
150 | while (i--) {
151 | value = linearGenerallyImpassableBarrierValuesArray()[i];
152 | barriersKeyValue.push({ key: "barrier", value: value });
153 | }
154 |
155 | returned.push({
156 | line_color: "black",
157 | line_width: 1,
158 | description: "linear, generally impassable barrier",
159 | matches: barriersKeyValue,
160 | });
161 |
162 | returned.push(
163 | ...[
164 | {
165 | area_color: "#aaaaaa",
166 | description: "pedestrian square (using it for sidewalk areas is invalid!)",
167 | matches: [
168 | [
169 | { key: "highway", value: "pedestrian" },
170 | { key: "area", value: "yes", role: "supplementary_obvious_filter" },
171 | ],
172 | [
173 | { key: "highway", value: "pedestrian" },
174 | { key: "type", value: "multipolygon", role: "supplementary_obvious_filter" },
175 | ],
176 | ],
177 | },
178 | {
179 | area_color: "#555555",
180 | description: "road area of a taxi stop (used in addition to amenity=taxi)",
181 | matches: [{ key: "area:highway", value: "taxi_stop" }],
182 | },
183 | {
184 | area_color: "#555555",
185 | description: "road area of a bus stop (used in addition to highway=bus_stop)",
186 | matches: [{ key: "area:highway", value: "bus_stop" }],
187 | },
188 | {
189 | line_color: "#9595b4",
190 | line_width: 1,
191 | description: "linear representation of a cycleway",
192 | matches: [{ key: "highway", value: "cycleway" }],
193 | },
194 | {
195 | area_color: "#9595b4",
196 | description: "area of a cycleway (linear representation must be also present! Using only area representation is invalid!)",
197 | matches: [{ key: "area:highway", value: "cycleway" }],
198 | },
199 | {
200 | area_color: "#a06060",
201 | description: "pedestrian crossing through a road (area used in addition to area representing road)",
202 | matches: [{ key: "area:highway", value: "crossing" }],
203 | },
204 | {
205 | area_color: "#bea4c1",
206 | description: "bicycle crossing through a road (area used in addition to area representing road)",
207 | matches: [{ key: "area:highway", value: "bicycle_crossing" }],
208 | },
209 | {
210 | area_color: "blue",
211 | description: "water",
212 | matches: [
213 | { key: "natural", value: "water" },
214 | { key: "waterway", value: "riverbank" },
215 | ],
216 | },
217 | {
218 | line_color: "blue",
219 | line_width: 10,
220 | description: "linear representation of a river",
221 | matches: [{ key: "waterway", value: "river" }],
222 | },
223 | {
224 | line_color: "blue",
225 | line_width: 7,
226 | description: "linear representation of a canal, assumed to be large",
227 | matches: [{ key: "waterway", value: "canal" }],
228 | },
229 | {
230 | line_color: "blue",
231 | line_width: 2,
232 | description: "linear representation of a stream",
233 | matches: [{ key: "waterway", value: "stream" }],
234 | },
235 | {
236 | line_color: "blue",
237 | line_width: 1,
238 | description: "linear representation of a ditch/drain",
239 | matches: [
240 | { key: "waterway", value: "ditch" },
241 | { key: "waterway", value: "stream" },
242 | ],
243 | },
244 | {
245 | area_color: "black",
246 | description: "buildings",
247 | matches: [{ key: "building" }],
248 | },
249 | {
250 | area_color: "green",
251 | description: "tree-covered land",
252 | matches: [
253 | { key: "natural", value: "wood" },
254 | { key: "landuse", value: "forest" },
255 | ],
256 | },
257 | {
258 | area_color: "#efdfef",
259 | description: "part of general military-industrial land",
260 | matches: [
261 | { key: "landuse", value: "industrial" },
262 | { key: "landuse", value: "railway" },
263 | { key: "landuse", value: "quarry" },
264 | { key: "landuse", value: "construction" },
265 | { key: "landuse", value: "military" },
266 | { key: "aeroway", value: "aerodrome" },
267 | ],
268 | },
269 | {
270 | area_color: "#efefef",
271 | description: "part of general builtup land",
272 | matches: [
273 | { key: "landuse", value: "residential" },
274 | { key: "landuse", value: "highway" },
275 | { key: "landuse", value: "retail" },
276 | { key: "landuse", value: "commercial" },
277 | { key: "landuse", value: "garages" },
278 | { key: "landuse", value: "farmyard" },
279 | { key: "landuse", value: "education" },
280 | { key: "amenity", value: "school" },
281 | { key: "amenity", value: "kidergarten" },
282 | { key: "amenity", value: "university" },
283 | ],
284 | },
285 | {
286 | area_color: "#eef0d5",
287 | description: "plants on an agriculture land",
288 | matches: [
289 | { key: "landuse", value: "farmland" },
290 | { key: "landuse", value: "vineyard" },
291 | { key: "landuse", value: "orchard" },
292 | ],
293 | },
294 | {
295 | area_color: "#c8facc",
296 | description: "recreation land",
297 | matches: [
298 | { key: "leisure", value: "park" },
299 | { key: "leisure", value: "pitch" },
300 | { key: "leisure", value: "playground" },
301 | { key: "landuse", value: "village_green" },
302 | ],
303 | },
304 | {
305 | area_color: "#a2ce8d",
306 | description: "vegetation that is not agriculture or forest",
307 | matches: [
308 | { key: "landuse", value: "grass" },
309 | { key: "landuse", value: "allotments" },
310 | { key: "landuse", value: "meadow" },
311 | { key: "natural", value: "grassland" },
312 | { key: "natural", value: "scrub" },
313 | { key: "natural", value: "heath" },
314 | { key: "leisure", value: "garden" },
315 | ],
316 | },
317 | {
318 | area_color: "gray",
319 | description: "bridge outline",
320 | matches: [{ key: "man_made", value: "bridge" }],
321 | },
322 | {
323 | area_color: "#EEE5DC",
324 | description: "bare rock",
325 | matches: [{ key: "natural", value: "bare_rock" }],
326 | },
327 | {
328 | line_color: "purple",
329 | line_width: 5,
330 | description: "runway",
331 | matches: [{ key: "aeroway", value: "runway" }],
332 | },
333 | {
334 | line_color: "purple",
335 | line_width: 2,
336 | description: "taxiway",
337 | matches: [{ key: "aeroway", value: "taxiway" }],
338 | },
339 | ]
340 | );
341 | return returned;
342 | },
343 |
344 | fillColoring(feature) {
345 | //console.log(feature);
346 | if (["Point"].includes(feature.geometry.type)) {
347 | //no rendering of points, for start size seems to randomly differ
348 | // and leaves ugly circles - see building=* areas
349 | return "none";
350 | }
351 |
352 | // more complex rules can be used here in addition - or instead of unified styling
353 | return getMatchFromUnifiedStyling(feature, "area_color", mapStyle.unifiedStyling());
354 | },
355 |
356 | strokeColoring(feature) {
357 | if (["Point"].includes(feature.geometry.type)) {
358 | //no rendering of points, for start size seems to randomly differ
359 | // and leaves ugly circles - see building=* areas
360 | return "none";
361 | }
362 |
363 | // more complex rules can be used here in addition - or instead of unified styling
364 |
365 | return getMatchFromUnifiedStyling(feature, "line_color", mapStyle.unifiedStyling());
366 | },
367 |
368 | strokeWidth(feature) {
369 | // more complex rules can be used here in addition - or instead of unified styling
370 |
371 | return getMatchFromUnifiedStyling(feature, "line_width", mapStyle.unifiedStyling());
372 | },
373 |
374 | mergeIntoGroup(feature) {
375 | // note that points and lines are not being merged!
376 | // only areas (including multipolygins) can be merged for now
377 | // please open an issue if you need it, it increaes chance of implementation a bit
378 | // or open pull request with an implementation
379 | if (motorizedRoadValuesArray().includes(feature.properties["area:highway"])) {
380 | return "area:highway_carriageway_layer" + feature.properties["layer"];
381 | }
382 | if (
383 | pedestrianWaysValuesArray().includes(feature.properties["area:highway"]) ||
384 | (feature.properties["highway"] == "pedestrian" && (feature.properties["area"] === "yes" || feature.properties["type"] === "multipolygon"))
385 | ) {
386 | return "area:highway_footway" + feature.properties["layer"];
387 | }
388 | if (feature.properties["area:highway"] == "cycleway") {
389 | return "area:highway_cycleway" + feature.properties["layer"];
390 | }
391 | return null;
392 | },
393 |
394 | name(feature) {
395 | return feature.properties.name;
396 | },
397 | };
398 | return mapStyle;
399 | }
400 |
--------------------------------------------------------------------------------
/examples/generated/general_high_zoom_taginfo.json:
--------------------------------------------------------------------------------
1 | {
2 | "data_format": 1,
3 | "data_url": "https://raw.githubusercontent.com/matkoniecz/lunar_assembler/master/examples/generated/general_high_zoom_taginfo.json",
4 | "project": {
5 | "name": "general SVG maps with area:highway, for zoomed in areas (city and smaller)",
6 | "description": "Map style to produce SVG maps of tiny and small areas - from single crossing to a city. Lunar Assembler map style.",
7 | "icon_url": "https://mapsaregreat.com/favicon.svg",
8 | "project_url": "https://github.com/matkoniecz/lunar_assembler",
9 | "doc_url": "https://mapsaregreat.com/osm_to_svg_in_browser/general_high_zoom",
10 | "contact_name": "Mateusz Konieczny",
11 | "contact_email": "matkoniecz@tutanota.com"
12 | },
13 | "tags": [
14 | {
15 | "key": "area:highway",
16 | "value": "living_street",
17 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
18 | },
19 | {
20 | "key": "highway",
21 | "value": "living_street",
22 | "description": "linear representation of a motorized road"
23 | },
24 | {
25 | "key": "area:highway",
26 | "value": "escape",
27 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
28 | },
29 | {
30 | "key": "highway",
31 | "value": "escape",
32 | "description": "linear representation of a motorized road"
33 | },
34 | {
35 | "key": "area:highway",
36 | "value": "raceway",
37 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
38 | },
39 | {
40 | "key": "highway",
41 | "value": "raceway",
42 | "description": "linear representation of a motorized road"
43 | },
44 | {
45 | "key": "area:highway",
46 | "value": "busway",
47 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
48 | },
49 | {
50 | "key": "highway",
51 | "value": "busway",
52 | "description": "linear representation of a motorized road"
53 | },
54 | {
55 | "key": "area:highway",
56 | "value": "road",
57 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
58 | },
59 | {
60 | "key": "highway",
61 | "value": "road",
62 | "description": "linear representation of a motorized road"
63 | },
64 | {
65 | "key": "area:highway",
66 | "value": "track",
67 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
68 | },
69 | {
70 | "key": "highway",
71 | "value": "track",
72 | "description": "linear representation of a motorized road"
73 | },
74 | {
75 | "key": "area:highway",
76 | "value": "service",
77 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
78 | },
79 | {
80 | "key": "highway",
81 | "value": "service",
82 | "description": "linear representation of a motorized road"
83 | },
84 | {
85 | "key": "area:highway",
86 | "value": "residential",
87 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
88 | },
89 | {
90 | "key": "highway",
91 | "value": "residential",
92 | "description": "linear representation of a motorized road"
93 | },
94 | {
95 | "key": "area:highway",
96 | "value": "unclassified",
97 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
98 | },
99 | {
100 | "key": "highway",
101 | "value": "unclassified",
102 | "description": "linear representation of a motorized road"
103 | },
104 | {
105 | "key": "area:highway",
106 | "value": "tertiary_link",
107 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
108 | },
109 | {
110 | "key": "highway",
111 | "value": "tertiary_link",
112 | "description": "linear representation of a motorized road"
113 | },
114 | {
115 | "key": "area:highway",
116 | "value": "tertiary",
117 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
118 | },
119 | {
120 | "key": "highway",
121 | "value": "tertiary",
122 | "description": "linear representation of a motorized road"
123 | },
124 | {
125 | "key": "area:highway",
126 | "value": "secondary_link",
127 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
128 | },
129 | {
130 | "key": "highway",
131 | "value": "secondary_link",
132 | "description": "linear representation of a motorized road"
133 | },
134 | {
135 | "key": "area:highway",
136 | "value": "secondary",
137 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
138 | },
139 | {
140 | "key": "highway",
141 | "value": "secondary",
142 | "description": "linear representation of a motorized road"
143 | },
144 | {
145 | "key": "area:highway",
146 | "value": "primary_link",
147 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
148 | },
149 | {
150 | "key": "highway",
151 | "value": "primary_link",
152 | "description": "linear representation of a motorized road"
153 | },
154 | {
155 | "key": "area:highway",
156 | "value": "primary",
157 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
158 | },
159 | {
160 | "key": "highway",
161 | "value": "primary",
162 | "description": "linear representation of a motorized road"
163 | },
164 | {
165 | "key": "area:highway",
166 | "value": "trunk_link",
167 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
168 | },
169 | {
170 | "key": "highway",
171 | "value": "trunk_link",
172 | "description": "linear representation of a motorized road"
173 | },
174 | {
175 | "key": "area:highway",
176 | "value": "trunk",
177 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
178 | },
179 | {
180 | "key": "highway",
181 | "value": "trunk",
182 | "description": "linear representation of a motorized road"
183 | },
184 | {
185 | "key": "area:highway",
186 | "value": "motorway_link",
187 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
188 | },
189 | {
190 | "key": "highway",
191 | "value": "motorway_link",
192 | "description": "linear representation of a motorized road"
193 | },
194 | {
195 | "key": "area:highway",
196 | "value": "motorway",
197 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
198 | },
199 | {
200 | "key": "highway",
201 | "value": "motorway",
202 | "description": "linear representation of a motorized road"
203 | },
204 | {
205 | "key": "railway",
206 | "value": "monorail",
207 | "description": "linear representation of a single railway track"
208 | },
209 | {
210 | "key": "railway",
211 | "value": "miniature",
212 | "description": "linear representation of a single railway track"
213 | },
214 | {
215 | "key": "railway",
216 | "value": "construction",
217 | "description": "linear representation of a single railway track"
218 | },
219 | {
220 | "key": "railway",
221 | "value": "preserved",
222 | "description": "linear representation of a single railway track"
223 | },
224 | {
225 | "key": "railway",
226 | "value": "light_rail",
227 | "description": "linear representation of a single railway track"
228 | },
229 | {
230 | "key": "railway",
231 | "value": "narrow_gauge",
232 | "description": "linear representation of a single railway track"
233 | },
234 | {
235 | "key": "railway",
236 | "value": "subway",
237 | "description": "linear representation of a single railway track"
238 | },
239 | {
240 | "key": "railway",
241 | "value": "tram",
242 | "description": "linear representation of a single railway track"
243 | },
244 | {
245 | "key": "railway",
246 | "value": "disused",
247 | "description": "linear representation of a single railway track"
248 | },
249 | {
250 | "key": "railway",
251 | "value": "rail",
252 | "description": "linear representation of a single railway track"
253 | },
254 | {
255 | "key": "area:highway",
256 | "value": "pedestrian",
257 | "description": "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)"
258 | },
259 | {
260 | "key": "highway",
261 | "value": "pedestrian",
262 | "description": "linear representation of a pedestrian way"
263 | },
264 | {
265 | "key": "area:highway",
266 | "value": "steps",
267 | "description": "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)"
268 | },
269 | {
270 | "key": "highway",
271 | "value": "steps",
272 | "description": "linear representation of a pedestrian way"
273 | },
274 | {
275 | "key": "area:highway",
276 | "value": "path",
277 | "description": "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)"
278 | },
279 | {
280 | "key": "highway",
281 | "value": "path",
282 | "description": "linear representation of a pedestrian way"
283 | },
284 | {
285 | "key": "area:highway",
286 | "value": "footway",
287 | "description": "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)"
288 | },
289 | {
290 | "key": "highway",
291 | "value": "footway",
292 | "description": "linear representation of a pedestrian way"
293 | },
294 | {
295 | "key": "barrier",
296 | "value": "fence",
297 | "description": "linear, generally impassable barrier"
298 | },
299 | {
300 | "key": "barrier",
301 | "value": "wall",
302 | "description": "linear, generally impassable barrier"
303 | },
304 | {
305 | "key": "barrier",
306 | "value": "hedge",
307 | "description": "linear, generally impassable barrier"
308 | },
309 | {
310 | "key": "barrier",
311 | "value": "retaining_wall",
312 | "description": "linear, generally impassable barrier"
313 | },
314 | {
315 | "key": "barrier",
316 | "value": "hedge_bank",
317 | "description": "linear, generally impassable barrier"
318 | },
319 | {
320 | "key": "barrier",
321 | "value": "wire_fence",
322 | "description": "linear, generally impassable barrier"
323 | },
324 | {
325 | "key": "barrier",
326 | "value": "city_wall",
327 | "description": "linear, generally impassable barrier"
328 | },
329 | {
330 | "key": "barrier",
331 | "value": "guard_rail",
332 | "description": "linear, generally impassable barrier"
333 | },
334 | {
335 | "key": "barrier",
336 | "value": "haha",
337 | "description": "linear, generally impassable barrier"
338 | },
339 | {
340 | "key": "highway",
341 | "value": "pedestrian",
342 | "description": "pedestrian square (using it for sidewalk areas is invalid!)"
343 | },
344 | {
345 | "key": "highway",
346 | "value": "pedestrian",
347 | "description": "pedestrian square (using it for sidewalk areas is invalid!)"
348 | },
349 | {
350 | "key": "area:highway",
351 | "value": "taxi_stop",
352 | "description": "road area of a taxi stop (used in addition to amenity=taxi)"
353 | },
354 | {
355 | "key": "area:highway",
356 | "value": "bus_stop",
357 | "description": "road area of a bus stop (used in addition to highway=bus_stop)"
358 | },
359 | {
360 | "key": "highway",
361 | "value": "cycleway",
362 | "description": "linear representation of a cycleway"
363 | },
364 | {
365 | "key": "area:highway",
366 | "value": "cycleway",
367 | "description": "area of a cycleway (linear representation must be also present! Using only area representation is invalid!)"
368 | },
369 | {
370 | "key": "area:highway",
371 | "value": "crossing",
372 | "description": "pedestrian crossing through a road (area used in addition to area representing road)"
373 | },
374 | {
375 | "key": "area:highway",
376 | "value": "bicycle_crossing",
377 | "description": "bicycle crossing through a road (area used in addition to area representing road)"
378 | },
379 | {
380 | "key": "waterway",
381 | "value": "riverbank",
382 | "description": "water"
383 | },
384 | {
385 | "key": "natural",
386 | "value": "water",
387 | "description": "water"
388 | },
389 | {
390 | "key": "waterway",
391 | "value": "river",
392 | "description": "linear representation of a river"
393 | },
394 | {
395 | "key": "waterway",
396 | "value": "canal",
397 | "description": "linear representation of a canal, assumed to be large"
398 | },
399 | {
400 | "key": "waterway",
401 | "value": "stream",
402 | "description": "linear representation of a stream"
403 | },
404 | {
405 | "key": "waterway",
406 | "value": "stream",
407 | "description": "linear representation of a ditch/drain"
408 | },
409 | {
410 | "key": "waterway",
411 | "value": "ditch",
412 | "description": "linear representation of a ditch/drain"
413 | },
414 | {
415 | "key": "building",
416 | "description": "buildings"
417 | },
418 | {
419 | "key": "landuse",
420 | "value": "forest",
421 | "description": "tree-covered land"
422 | },
423 | {
424 | "key": "natural",
425 | "value": "wood",
426 | "description": "tree-covered land"
427 | },
428 | {
429 | "key": "aeroway",
430 | "value": "aerodrome",
431 | "description": "part of general military-industrial land"
432 | },
433 | {
434 | "key": "landuse",
435 | "value": "military",
436 | "description": "part of general military-industrial land"
437 | },
438 | {
439 | "key": "landuse",
440 | "value": "construction",
441 | "description": "part of general military-industrial land"
442 | },
443 | {
444 | "key": "landuse",
445 | "value": "quarry",
446 | "description": "part of general military-industrial land"
447 | },
448 | {
449 | "key": "landuse",
450 | "value": "railway",
451 | "description": "part of general military-industrial land"
452 | },
453 | {
454 | "key": "landuse",
455 | "value": "industrial",
456 | "description": "part of general military-industrial land"
457 | },
458 | {
459 | "key": "amenity",
460 | "value": "university",
461 | "description": "part of general builtup land"
462 | },
463 | {
464 | "key": "amenity",
465 | "value": "kidergarten",
466 | "description": "part of general builtup land"
467 | },
468 | {
469 | "key": "amenity",
470 | "value": "school",
471 | "description": "part of general builtup land"
472 | },
473 | {
474 | "key": "landuse",
475 | "value": "education",
476 | "description": "part of general builtup land"
477 | },
478 | {
479 | "key": "landuse",
480 | "value": "farmyard",
481 | "description": "part of general builtup land"
482 | },
483 | {
484 | "key": "landuse",
485 | "value": "garages",
486 | "description": "part of general builtup land"
487 | },
488 | {
489 | "key": "landuse",
490 | "value": "commercial",
491 | "description": "part of general builtup land"
492 | },
493 | {
494 | "key": "landuse",
495 | "value": "retail",
496 | "description": "part of general builtup land"
497 | },
498 | {
499 | "key": "landuse",
500 | "value": "highway",
501 | "description": "part of general builtup land"
502 | },
503 | {
504 | "key": "landuse",
505 | "value": "residential",
506 | "description": "part of general builtup land"
507 | },
508 | {
509 | "key": "landuse",
510 | "value": "orchard",
511 | "description": "plants on an agriculture land"
512 | },
513 | {
514 | "key": "landuse",
515 | "value": "vineyard",
516 | "description": "plants on an agriculture land"
517 | },
518 | {
519 | "key": "landuse",
520 | "value": "farmland",
521 | "description": "plants on an agriculture land"
522 | },
523 | {
524 | "key": "landuse",
525 | "value": "village_green",
526 | "description": "recreation land"
527 | },
528 | {
529 | "key": "leisure",
530 | "value": "playground",
531 | "description": "recreation land"
532 | },
533 | {
534 | "key": "leisure",
535 | "value": "pitch",
536 | "description": "recreation land"
537 | },
538 | {
539 | "key": "leisure",
540 | "value": "park",
541 | "description": "recreation land"
542 | },
543 | {
544 | "key": "leisure",
545 | "value": "garden",
546 | "description": "vegetation that is not agriculture or forest"
547 | },
548 | {
549 | "key": "natural",
550 | "value": "heath",
551 | "description": "vegetation that is not agriculture or forest"
552 | },
553 | {
554 | "key": "natural",
555 | "value": "scrub",
556 | "description": "vegetation that is not agriculture or forest"
557 | },
558 | {
559 | "key": "natural",
560 | "value": "grassland",
561 | "description": "vegetation that is not agriculture or forest"
562 | },
563 | {
564 | "key": "landuse",
565 | "value": "meadow",
566 | "description": "vegetation that is not agriculture or forest"
567 | },
568 | {
569 | "key": "landuse",
570 | "value": "allotments",
571 | "description": "vegetation that is not agriculture or forest"
572 | },
573 | {
574 | "key": "landuse",
575 | "value": "grass",
576 | "description": "vegetation that is not agriculture or forest"
577 | },
578 | {
579 | "key": "man_made",
580 | "value": "bridge",
581 | "description": "bridge outline"
582 | },
583 | {
584 | "key": "natural",
585 | "value": "bare_rock",
586 | "description": "bare rock"
587 | },
588 | {
589 | "key": "aeroway",
590 | "value": "runway",
591 | "description": "runway"
592 | },
593 | {
594 | "key": "aeroway",
595 | "value": "taxiway",
596 | "description": "taxiway"
597 | }
598 | ]
599 | }
600 |
--------------------------------------------------------------------------------
/examples/generated/laser_road_area_taginfo.json:
--------------------------------------------------------------------------------
1 | {
2 | "data_format": 1,
3 | "data_url": "https://raw.githubusercontent.com/matkoniecz/lunar_assembler/master/examples/generated/laser_road_area_taginfo.json",
4 | "project": {
5 | "name": "SVG for laser cutting a map based on area:highway",
6 | "description": "Map style to produce tactile maps for blind. Generated maps are for use in a laser cutter. Lunar Assembler map style.",
7 | "icon_url": "https://mapsaregreat.com/favicon.svg",
8 | "project_url": "https://github.com/matkoniecz/lunar_assembler",
9 | "doc_url": "https://mapsaregreat.com/osm_to_svg_in_browser/laser_road_area.html",
10 | "contact_name": "Mateusz Konieczny",
11 | "contact_email": "matkoniecz@tutanota.com"
12 | },
13 | "tags": [
14 | {
15 | "key": "area:highway",
16 | "value": "pedestrian",
17 | "description": "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)"
18 | },
19 | {
20 | "key": "area:highway",
21 | "value": "path",
22 | "description": "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)"
23 | },
24 | {
25 | "key": "area:highway",
26 | "value": "footway",
27 | "description": "area of a pedestrian way (linear representation must be also present! Using only area representation is invalid!)"
28 | },
29 | {
30 | "key": "highway",
31 | "value": "pedestrian",
32 | "description": "pedestrian square (using it for sidewalk areas is invalid!)"
33 | },
34 | {
35 | "key": "highway",
36 | "value": "pedestrian",
37 | "description": "pedestrian square (using it for sidewalk areas is invalid!)"
38 | },
39 | {
40 | "key": "area:highway",
41 | "value": "crossing",
42 | "description": "pedestrian crossing through a road (area used in addition to area representing road)"
43 | },
44 | {
45 | "key": "footway",
46 | "value": "crossing",
47 | "description": "detecting crossings"
48 | },
49 | {
50 | "key": "area:highway",
51 | "value": "steps",
52 | "description": "area representation of steps (used in addition to linear highway=steps)"
53 | },
54 | {
55 | "key": "area:highway",
56 | "value": "steps",
57 | "description": "area of steps, for an automatic generation of a symbolic representation"
58 | },
59 | {
60 | "key": "highway",
61 | "value": "steps",
62 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
63 | },
64 | {
65 | "key": "incline",
66 | "value": "up",
67 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
68 | },
69 | {
70 | "key": "incline",
71 | "value": "down",
72 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
73 | },
74 | {
75 | "key": "area:highway",
76 | "value": "steps",
77 | "description": "area of steps, for an automatic generation of a symbolic representation"
78 | },
79 | {
80 | "key": "highway",
81 | "value": "steps",
82 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
83 | },
84 | {
85 | "key": "incline",
86 | "value": "up",
87 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
88 | },
89 | {
90 | "key": "incline",
91 | "value": "down",
92 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
93 | },
94 | {
95 | "key": "area:highway",
96 | "value": "steps",
97 | "description": "area of steps, for an automatic generation of a symbolic representation"
98 | },
99 | {
100 | "key": "highway",
101 | "value": "steps",
102 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
103 | },
104 | {
105 | "key": "incline",
106 | "value": "up",
107 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
108 | },
109 | {
110 | "key": "incline",
111 | "value": "down",
112 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
113 | },
114 | {
115 | "key": "area:highway",
116 | "value": "steps",
117 | "description": "area of steps, for an automatic generation of a symbolic representation"
118 | },
119 | {
120 | "key": "highway",
121 | "value": "steps",
122 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
123 | },
124 | {
125 | "key": "incline",
126 | "value": "up",
127 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
128 | },
129 | {
130 | "key": "incline",
131 | "value": "down",
132 | "description": "detecting upper/lower side of steps, for an automatic generation of a symbolic representation"
133 | },
134 | {
135 | "key": "building",
136 | "description": "buildings"
137 | },
138 | {
139 | "key": "waterway",
140 | "value": "riverbank",
141 | "description": "water - pattern, part expected to be engraved"
142 | },
143 | {
144 | "key": "natural",
145 | "value": "water",
146 | "description": "water - pattern, part expected to be engraved"
147 | },
148 | {
149 | "key": "waterway",
150 | "value": "riverbank",
151 | "description": "water - entire area, expected to be cut at outline to separate element for easier painting (or used solely for orientation)"
152 | },
153 | {
154 | "key": "natural",
155 | "value": "water",
156 | "description": "water - entire area, expected to be cut at outline to separate element for easier painting (or used solely for orientation)"
157 | },
158 | {
159 | "key": "area:highway",
160 | "value": "living_street",
161 | "description": "area of a motorized road - pattern, part expected to be engraved"
162 | },
163 | {
164 | "key": "area:highway",
165 | "value": "escape",
166 | "description": "area of a motorized road - pattern, part expected to be engraved"
167 | },
168 | {
169 | "key": "area:highway",
170 | "value": "raceway",
171 | "description": "area of a motorized road - pattern, part expected to be engraved"
172 | },
173 | {
174 | "key": "area:highway",
175 | "value": "busway",
176 | "description": "area of a motorized road - pattern, part expected to be engraved"
177 | },
178 | {
179 | "key": "area:highway",
180 | "value": "road",
181 | "description": "area of a motorized road - pattern, part expected to be engraved"
182 | },
183 | {
184 | "key": "area:highway",
185 | "value": "track",
186 | "description": "area of a motorized road - pattern, part expected to be engraved"
187 | },
188 | {
189 | "key": "area:highway",
190 | "value": "service",
191 | "description": "area of a motorized road - pattern, part expected to be engraved"
192 | },
193 | {
194 | "key": "area:highway",
195 | "value": "residential",
196 | "description": "area of a motorized road - pattern, part expected to be engraved"
197 | },
198 | {
199 | "key": "area:highway",
200 | "value": "unclassified",
201 | "description": "area of a motorized road - pattern, part expected to be engraved"
202 | },
203 | {
204 | "key": "area:highway",
205 | "value": "tertiary_link",
206 | "description": "area of a motorized road - pattern, part expected to be engraved"
207 | },
208 | {
209 | "key": "area:highway",
210 | "value": "tertiary",
211 | "description": "area of a motorized road - pattern, part expected to be engraved"
212 | },
213 | {
214 | "key": "area:highway",
215 | "value": "secondary_link",
216 | "description": "area of a motorized road - pattern, part expected to be engraved"
217 | },
218 | {
219 | "key": "area:highway",
220 | "value": "secondary",
221 | "description": "area of a motorized road - pattern, part expected to be engraved"
222 | },
223 | {
224 | "key": "area:highway",
225 | "value": "primary_link",
226 | "description": "area of a motorized road - pattern, part expected to be engraved"
227 | },
228 | {
229 | "key": "area:highway",
230 | "value": "primary",
231 | "description": "area of a motorized road - pattern, part expected to be engraved"
232 | },
233 | {
234 | "key": "area:highway",
235 | "value": "trunk_link",
236 | "description": "area of a motorized road - pattern, part expected to be engraved"
237 | },
238 | {
239 | "key": "area:highway",
240 | "value": "trunk",
241 | "description": "area of a motorized road - pattern, part expected to be engraved"
242 | },
243 | {
244 | "key": "area:highway",
245 | "value": "motorway_link",
246 | "description": "area of a motorized road - pattern, part expected to be engraved"
247 | },
248 | {
249 | "key": "area:highway",
250 | "value": "motorway",
251 | "description": "area of a motorized road - pattern, part expected to be engraved"
252 | },
253 | {
254 | "key": "area:highway",
255 | "value": "living_street",
256 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
257 | },
258 | {
259 | "key": "area:highway",
260 | "value": "escape",
261 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
262 | },
263 | {
264 | "key": "area:highway",
265 | "value": "raceway",
266 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
267 | },
268 | {
269 | "key": "area:highway",
270 | "value": "busway",
271 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
272 | },
273 | {
274 | "key": "area:highway",
275 | "value": "road",
276 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
277 | },
278 | {
279 | "key": "area:highway",
280 | "value": "track",
281 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
282 | },
283 | {
284 | "key": "area:highway",
285 | "value": "service",
286 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
287 | },
288 | {
289 | "key": "area:highway",
290 | "value": "residential",
291 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
292 | },
293 | {
294 | "key": "area:highway",
295 | "value": "unclassified",
296 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
297 | },
298 | {
299 | "key": "area:highway",
300 | "value": "tertiary_link",
301 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
302 | },
303 | {
304 | "key": "area:highway",
305 | "value": "tertiary",
306 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
307 | },
308 | {
309 | "key": "area:highway",
310 | "value": "secondary_link",
311 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
312 | },
313 | {
314 | "key": "area:highway",
315 | "value": "secondary",
316 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
317 | },
318 | {
319 | "key": "area:highway",
320 | "value": "primary_link",
321 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
322 | },
323 | {
324 | "key": "area:highway",
325 | "value": "primary",
326 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
327 | },
328 | {
329 | "key": "area:highway",
330 | "value": "trunk_link",
331 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
332 | },
333 | {
334 | "key": "area:highway",
335 | "value": "trunk",
336 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
337 | },
338 | {
339 | "key": "area:highway",
340 | "value": "motorway_link",
341 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
342 | },
343 | {
344 | "key": "area:highway",
345 | "value": "motorway",
346 | "description": "area of a motorized road (linear representation must be also present! Using only area representation is invalid!)"
347 | },
348 | {
349 | "key": "area:highway",
350 | "value": "taxi_stop",
351 | "description": "road area of a taxi stop (used in addition to amenity=taxi) - pattern, part expected to be engraved"
352 | },
353 | {
354 | "key": "area:highway",
355 | "value": "taxi_stop",
356 | "description": "road area of a taxi stop (used in addition to amenity=taxi)"
357 | },
358 | {
359 | "key": "area:highway",
360 | "value": "bus_stop",
361 | "description": "road area of a bus stop - pattern, part expected to be engraved"
362 | },
363 | {
364 | "key": "area:highway",
365 | "value": "bus_stop",
366 | "description": "road area of a bus stop (used in addition to highway=bus_stop)"
367 | },
368 | {
369 | "key": "area:highway",
370 | "value": "cycleway",
371 | "description": "road area of a cycleway - pattern, part expected to be engraved"
372 | },
373 | {
374 | "key": "area:highway",
375 | "value": "cycleway",
376 | "description": "road area of a cycleway (used in addition to highway=bus_stop)"
377 | },
378 | {
379 | "key": "barrier",
380 | "value": "haha",
381 | "description": "generally impassable barrier, for detecting where access is blocked"
382 | },
383 | {
384 | "key": "barrier",
385 | "value": "guard_rail",
386 | "description": "generally impassable barrier, for detecting where access is blocked"
387 | },
388 | {
389 | "key": "barrier",
390 | "value": "city_wall",
391 | "description": "generally impassable barrier, for detecting where access is blocked"
392 | },
393 | {
394 | "key": "barrier",
395 | "value": "wire_fence",
396 | "description": "generally impassable barrier, for detecting where access is blocked"
397 | },
398 | {
399 | "key": "barrier",
400 | "value": "hedge_bank",
401 | "description": "generally impassable barrier, for detecting where access is blocked"
402 | },
403 | {
404 | "key": "barrier",
405 | "value": "retaining_wall",
406 | "description": "generally impassable barrier, for detecting where access is blocked"
407 | },
408 | {
409 | "key": "barrier",
410 | "value": "hedge",
411 | "description": "generally impassable barrier, for detecting where access is blocked"
412 | },
413 | {
414 | "key": "barrier",
415 | "value": "wall",
416 | "description": "generally impassable barrier, for detecting where access is blocked"
417 | },
418 | {
419 | "key": "barrier",
420 | "value": "fence",
421 | "description": "generally impassable barrier, for detecting where access is blocked"
422 | },
423 | {
424 | "key": "barrier",
425 | "value": "yes",
426 | "description": "unknown barrier, assumed to be generally impassable barrier, for detecting where access is blocked"
427 | },
428 | {
429 | "key": "barrier",
430 | "value": "haha",
431 | "description": "generally impassable barrier, for detecting where access is blocked"
432 | },
433 | {
434 | "key": "barrier",
435 | "value": "guard_rail",
436 | "description": "generally impassable barrier, for detecting where access is blocked"
437 | },
438 | {
439 | "key": "barrier",
440 | "value": "city_wall",
441 | "description": "generally impassable barrier, for detecting where access is blocked"
442 | },
443 | {
444 | "key": "barrier",
445 | "value": "wire_fence",
446 | "description": "generally impassable barrier, for detecting where access is blocked"
447 | },
448 | {
449 | "key": "barrier",
450 | "value": "hedge_bank",
451 | "description": "generally impassable barrier, for detecting where access is blocked"
452 | },
453 | {
454 | "key": "barrier",
455 | "value": "retaining_wall",
456 | "description": "generally impassable barrier, for detecting where access is blocked"
457 | },
458 | {
459 | "key": "barrier",
460 | "value": "hedge",
461 | "description": "generally impassable barrier, for detecting where access is blocked"
462 | },
463 | {
464 | "key": "barrier",
465 | "value": "wall",
466 | "description": "generally impassable barrier, for detecting where access is blocked"
467 | },
468 | {
469 | "key": "barrier",
470 | "value": "fence",
471 | "description": "generally impassable barrier, for detecting where access is blocked"
472 | },
473 | {
474 | "key": "barrier",
475 | "value": "yes",
476 | "description": "unknown barrier, assumed to be generally impassable barrier, for detecting where access is blocked"
477 | },
478 | {
479 | "key": "natural",
480 | "value": "water",
481 | "description": "generally impassable barrier, for detecting where access is blocked"
482 | },
483 | {
484 | "key": "waterway",
485 | "value": "riverbank",
486 | "description": "generally impassable barrier, for detecting where access is blocked"
487 | },
488 | {
489 | "key": "building",
490 | "description": "generally impassable barrier, for detecting where access is blocked"
491 | },
492 | {
493 | "key": "waterway",
494 | "value": "riverbank",
495 | "description": "generally impassable barrier, for detecting where access is blocked"
496 | },
497 | {
498 | "key": "area:highway",
499 | "description": "generally impassable barrier, for detecting where access is blocked"
500 | },
501 | {
502 | "key": "foot",
503 | "value": "no",
504 | "description": "generally impassable barrier, for detecting where access is blocked"
505 | },
506 | {
507 | "key": "railway",
508 | "value": "monorail",
509 | "description": "linear representation of a single railway track"
510 | },
511 | {
512 | "key": "railway",
513 | "value": "miniature",
514 | "description": "linear representation of a single railway track"
515 | },
516 | {
517 | "key": "railway",
518 | "value": "construction",
519 | "description": "linear representation of a single railway track"
520 | },
521 | {
522 | "key": "railway",
523 | "value": "preserved",
524 | "description": "linear representation of a single railway track"
525 | },
526 | {
527 | "key": "railway",
528 | "value": "light_rail",
529 | "description": "linear representation of a single railway track"
530 | },
531 | {
532 | "key": "railway",
533 | "value": "narrow_gauge",
534 | "description": "linear representation of a single railway track"
535 | },
536 | {
537 | "key": "railway",
538 | "value": "subway",
539 | "description": "linear representation of a single railway track"
540 | },
541 | {
542 | "key": "railway",
543 | "value": "tram",
544 | "description": "linear representation of a single railway track"
545 | },
546 | {
547 | "key": "railway",
548 | "value": "disused",
549 | "description": "linear representation of a single railway track"
550 | },
551 | {
552 | "key": "railway",
553 | "value": "rail",
554 | "description": "linear representation of a single railway track"
555 | }
556 | ]
557 | }
558 |
--------------------------------------------------------------------------------
/examples/laser_neighbourhood.html:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Laser neighbourhood - SVG map from OpenStreetMap data
25 |
29 |
30 |
31 |
32 |
33 |
34 |
Generation of vector maps from OpenStreetMap data, for use in laser cutters for producing tactile maps.
35 |
36 |
Press the rectangle button, select a rectangle on a map and wait. Note that this tool will work well with small areas, such as a neighbourhood.
37 |
38 |
See also other map styles, allowing generation of other maps from the same OpenStreetMap data.
39 |
40 |
(there is more text below map, you can also see an animation showing how this tool is supposed to work)
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
Move map to a small area interesting for you (a single crossing will work, generating a map of Poland will fail).
51 |
Press the "rectangle" button, choose an area of interest.
52 |
Wait - waiting several seconds is normal, currently no real progress info is displayed during download. Not even progress bar animation is shown when map is generated in your browser, it may take a bit.
53 |
The generated map should appear below the map used for selecting. There is also a download button available below the generated map image.
54 |
Use this map for something!
55 |
56 |
57 |
58 |
Map style is generating SVG design files for use in a laser cutter. As orientation maps for blind people of a very small area, such as a single road crossing.
59 |
laser parameters that I used are given, but this is a solely example! You will need to test it on laser cutter you use which parameters are optimal. Yes, it is time consuming
60 |
TODO: finish describing parameters at closeup, clone relevant ones
Have fun with using OpenStreetMap data for interesting and/or useful purposes! Just remember that you must mention the source of data in a way visible to whoever will be using it. See this page for details, including cases where it is legally allowed to avoid giving a clear credit (but I encourage to do this in all cases).
71 |
72 |
If you liked this tool, something was confusing - you are welcomed to comment about it by creating a public issue or by sending me an email. You can also post a comment in OSM diary entry.
73 |
74 |
If you want to help mapping and you are unsure how to start - you can try StreetComplete (an Android app) allowing contributions, with sole requirements being (1) ability to read (2) ability to see things (3) ability to create an OpenStreetMap account.
75 |
76 |
If you want to map something (map missing objects, fix a mistake) and you are unsure how to start - visit openstreetmap.org, zoom in to interesting area and press the "edit" button and follow instructions. You can contact OpenStreetMap community using one of global or local channels listed at community.osm.be.
Generation of vector maps from OpenStreetMap data, for use in laser cutters for producing tactile maps.
35 |
36 |
Press the rectangle button, select a rectangle on a map and wait. Note that this tool will work well with tiny areas, such as a single crossing.
37 |
38 |
This map style requires an area to be mapped with area:highway, otherwise it will not work.
39 |
40 |
See also other map styles, allowing generation of other maps from the same OpenStreetMap data. One of available generates laser cut designs for 3D maps, without need of area:highway mapping.
41 |
42 |
(there is more text below the map, you can also see an animation showing how this tool is supposed to work)
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
OpenStreetMap data (ODbL licensed) and this map style combined to make a 3D tactile map for the blind.
53 |
54 |
55 |
56 |
Move map to a small area interesting for you (a single crossing will work, generating a map of Poland will fail).
57 |
Press the "rectangle" button, choose a small area of interest.
58 |
Wait - waiting several seconds is normal, currently no real progress info is displayed during download. Not even progress bar animation is shown when map is generated in your browser, it may take a bit.
59 |
The generated map should appear below the map used for selecting. There is also a download button available below the generated map image.
60 |
Use this map for something!
61 |
62 |
63 |
Map style is generating SVG design files for use in a laser cutter. Intended for making orientation maps for blind people of a very small area, such as a single road crossing.
64 |
65 |
Have fun with using OpenStreetMap data for interesting and/or useful purposes! Just remember that you must mention the source of data in a way visible to whoever will be using it. See this page for details, including cases where it is legally allowed to avoid giving a clear credit (but I encourage to do this in all cases).
66 |
67 |
If you liked this tool, something was confusing - you are welcomed to comment about it by creating a public issue or by sending me an email. You can also post a comment in OSM diary entry.
68 |
69 |
If you want to help mapping and you are unsure how to start - you can try StreetComplete (an Android app) allowing contributions, with sole requirements being (1) ability to read (2) ability to see things (3) ability to create an OpenStreetMap account.
70 |
71 |
If you want to map something (map missing objects, fix a mistake) and you are unsure how to start - visit openstreetmap.org, zoom in to an interesting area and press the "edit" button and follow instructions. You can contact the OpenStreetMap community using one of global or local channels listed at community.osm.be and ask for help.
72 |
73 | You can visit matkoniecz/lunar_assembler to see code, obtain code or contribute. This software is AGPLv3 licenced.
74 |
75 |
Legend
76 |
77 |
Laser parameters
78 |
laser parameters that I used are given below, but this is a solely example! You will need to test it on laser cutter you use which parameters are optimal.
79 |
80 | Produced SVG is intended to be copied and used for multiple cuts:
81 |
82 |
83 | Empty base area, to keep elements together
84 |
85 |
86 | Base layer:
87 |
88 |
engraving road areas surface with own pattern - 400 speed 40 power 0.08mm line interval on laser that I used
89 |
cutting road areas from other areas (necessary to paint it properly) - ???
90 |
everything else - quick delicate burn to indicate where given elements should be glued - ?????
91 |
92 |
93 |
separate cuts of footway areas and crossing - I cut them into plexiglass to achieve clearly different surface in touch. I considered using leather or cork. For transparent plexiglass it is possible to spray-paint its bottom to change it colour to a desired one
94 |
separate cut for buildings, I used thick plywood to make it clearly distinct
95 |
separate cut for steps from plywood. This is a a quite tricky layer: first of all area:highway is processed and split into symbolic areas
96 |
97 |
outer shape surrounding entire steps area: should cut through to produce a separate piece
98 |
symbolic steps - should be engraved as areas, each with increasing power to burn wood to a different depth.
99 |
100 |
20% power, 1 repetition, line interval 0.08mm
101 |
MAX power (80% on this specific laser), 1 repetitions, line interval 0.08mm
Press the rectangle button, select a rectangle on a map and wait. It will generate map from OpenStreetMap data It is an example of a very simple map style, showing water, forest, buildings and marinas.
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
More detailed instructions
44 |
45 |
46 |
Move map to a small area interesting for you (a single crossing will work, generating a map of Poland will fail).
47 |
Press the "rectangle" button, choose an area of interest.
48 |
Wait - waiting several seconds is normal, currently no real progress info is displayed during download. Not even progress bar animation is shown when map is generated in your browser, it may take a bit.
49 |
The generated map should appear below the map used for selecting. There is also a download button available below the generated map image.
50 |
Use this map for something!
51 |
52 |
53 |
54 |
Even more info
55 |
Have fun with using OpenStreetMap data for interesting and/or useful purposes! Just remember that you must mention the source of data in a way visible to whoever will be using it. See this page for details, including cases where it is legally allowed to avoid giving a clear credit (but I encourage to do this in all cases).
56 |
57 |
If you liked this tool, something was confusing - you are welcomed to comment about it by creating a public issue or by sending me an email. You can also post a comment in OSM diary entry.
58 |
59 |
If you want to map something (map missing objects, fix a mistake) and you are unsure how to start - visit openstreetmap.org, zoom in to an interesting area and press the "edit" button and follow instructions. You can contact the OpenStreetMap community using one of global or local channels listed at community.osm.be and ask for help.
\n";
96 | }
97 |
98 | function addLegendEntriesForDataStraightFromOpenStreetMap(rule) {
99 | returned = "";
100 | var i = rule["matches"].length;
101 | while (i--) {
102 | const match = rule["matches"][i];
103 | if (Array.isArray(match)) {
104 | // multiple rules, all must be matched
105 | var actualFiters = [];
106 | var m = match.length;
107 | while (m--) {
108 | if (match[m]["role"] === "supplementary_obvious_filter") {
109 | continue;
110 | }
111 | actualFiters.push(match[m]);
112 | }
113 | if (actualFiters.length != 1) {
114 | throw "unsupported to have multiple actual filters! - on " + JSON.stringify(match);
115 | }
116 | returned += generateLegendEntry(actualFiters[0]["key"], actualFiters[0]["value"], rule);
117 | } else {
118 | // single key=* or key=value match
119 | returned += generateLegendEntry(match["key"], match["value"], rule);
120 | }
121 | }
122 | return returned;
123 | }
124 |
125 | function addLegendEntriesForProcessedElements(rule) {
126 | returned = "";
127 | returned += "
" + stylingSummary(rule) + " " + rule["description"] + " - this is generated using:\n";
128 | returned += "
";
129 | if ("automatically_generated_using" in rule == false) {
130 | showFatalError("map style is broken! In " + JSON.stringify(rule) + " a field automatically_generated_using is missing!");
131 | }
132 | if (rule["automatically_generated_using"] == undefined) {
133 | showFatalError("map style is broken! In " + JSON.stringify(rule) + " a field automatically_generated_using is set to undefined!");
134 | }
135 | var length = rule["automatically_generated_using"].length;
136 | var i = -1;
137 | while (i + 1 < length) {
138 | i += 1;
139 | const match = rule["automatically_generated_using"][i];
140 | if (Array.isArray(match)) {
141 | // multiple rules, all must be matched
142 | var actualFiters = [];
143 | var m = match.length;
144 | while (m--) {
145 | if (match[m]["role"] === "supplementary_obvious_filter") {
146 | continue;
147 | }
148 | actualFiters.push(match[m]);
149 | }
150 | if (actualFiters.length != 1) {
151 | throw "unsupported to have multiple actual filters! - on " + JSON.stringify(match);
152 | }
153 | returned += "