OpenStreetMap: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
mNo edit summary
 
(16 intermediate revisions by the same user not shown)
Line 9: Line 9:
Since OpenStreetMap uses a well documented data structure, it is used for creating all sorts of map-based application on all sorts of devices.
Since OpenStreetMap uses a well documented data structure, it is used for creating all sorts of map-based application on all sorts of devices.


<nowiki>Purpose of this article (for now): Extracting information for laser cutting and 3D printing. At some point, if something of interest emerges, sections will be made into stand-alone articles - ~~~~</nowiki>
Purpose of this article (for now): Extracting information for laser cutting and 3D printing. At some point, if something of interest emerges, sections will be made into stand-alone articles, e.g. the Maperitive section - [[User:Daniel K. Schneider|Daniel K. Schneider]] ([[User talk:Daniel K. Schneider|talk]]) 20:39, 15 March 2017 (CET)


== Mapertitive ==
== OpenStreetMap Data for laser cutting and 3D printing ==


Maperitive is a FREE desktop application for drawing maps based on OpenStreetMap and GPS data. You can define what gets on the map and how it is painted. You can also export these maps into bitmaps and SVG files and print them. ([http://maperitive.net/ Maperitive home page], March 2017). The application is programmed in Net and needs Net 4.0 installed on Windows or the latest Mono under Linux.
* Since OpenStreeMap data includes structured information it can be extracted to various formats suitable for laser cutting and 3D printing.


We are exploring this since it can export SVG layers that could be useful for [[laser cutting]] and [[3D printing]]
For the moment, read:
 
* [[Maperitive for laser cutting and 3D printing]]
In this context, one needs to know the following:
* By default, Maperitive will display a tiled bitmap map, called OSM Mapnik (the same that is used on the [http://www.openstreetmap.org/ OSM main map site])
* You will have to replace this map by vectorized maps. According to the [http://maperitive.net/docs/FAQ.html FAQ], 
{{quotatio1n|Maperitive rendering rules work on vector data, like OSM and GPX files. So you first need to load a vector file into Maperitive to see the actual rules in action. You can use File | Open Map Sources menu command to open one or more map sources. After loading, make sure you turn off the Web map layer (you can see the layers list in the bottom right tool window)}}
 
=== Installation under Ubuntu ===
 
Prerequisites
* Mono (a .Net implementation)
There are many mono ubuntu packages and I frankly do not know which are needed, I just got the complete set (but it's not that huge)
sudo apt-get install mono-complete
 
Download as zip file from
[http://maperitive.net/download/Maperitive-latest.zip Dowload the latest version]
unzip ...
cd Maperitive
chmod a+x Mapertive.sh
./Maperitive.sh &
 
Exporting a map to SVG for either Illustrator or Inkscape
Menu tools -> Export to SVG
 
=== Using the Map to create contours for laser cutting ===
 
'''Setting your zone of interest'''
* Zoom out then in
* Menu View -> Set home location
* You now can export what you see. The result will be a tiled SVG file. Each tile is *.png file. Only the coordinates and the scale are SVG. This is not too useful for laser cutting or 3D printing.
 
'''Loading contour data'''
 
Read the [http://braincrunch.tumblr.com/post/9921938947/maperitive-tutorial-a-hiking-web-map-in-ten-easy Maperitive Tutorial: A Hiking Web Map In Ten Easy Steps]. In summary the steps are the following:
 
* Right click; Place Geometry bounds here
* Adjust the rectangle
* Get NASA SRTM DEM data: Menu Tools -> Generate Hillshading (Igor)
* Turn off the Web Map (OSM Mapnik) in the Map source at bottom right.
* Generate the relief contours: Menu Tools -> Generate Relief Contours.
 
Below are my exploration with the Salève, the "house mountain" of Geneva, its base 15 min from downtown.
<gallery widths="300" heights="400">
saleve-selection.png|Salève Selection in Maperitive
saleve-contour-lines.png|Salève. Just the contour lines
saleve-inkscape.png|Salève. Tedious contour repairing work.
</gallery>
 
'''Preparing for Laser cutting'''
 
You now can export to SVG and laser cut the contour lines. This is very tedious work. Consider using a tool that can automatically slice a 3D model and start from that.
 
* Untick the image in the Map Sources (unless you want to use it for engraving)
* Zoom in or out. Details of output will match zoom level !
* Menu Tools -> Export to SVG
* Open in a SVG editor like Inkscape
** Get rid of layers you do not want
** Lock all layers except the contour layer
** Get rid of contours along the edges (optional)
** Repair open lines. Typically you could edit the path in the following way: (1) Select the path, (2) Add a node in one of the 4 corners. (3) Link this node to the dangling ends. You also must close the lines that include an altitude number. Displace the number itself inside an area so that it can be engraved.
** Arrange each contour line in a different spot (if the model is complex, consider adding a number, else find an otherwise logical arrangement
** Make the lines "hairline" and select a color you like
** Send to laser cutter.
 
Of course this only works with small areas !
 
'''Variant that adds roads'''
* Download the OSM Data (in particular roads): Map->Download OSM Data (Overpass API)
* You could export again in SVG, but the cleanup work required will be quite impressive, unless you really do a very small area. (not yet tested)
 
'''Customize'''
 
Instead of running scripts using the menu, you could modify the parameters. In particular, read [http://maperitive.net/docs/Commands/ExportSvg.html Export-SVG Command]
 
* In the '''Assistant Window''' search for the command, e.g. export-svg
* Double click on it. You will see <code>export-svg</code> in the Command prompt (bottom of main window)
* Select various command parameters
 
You then can combine these into a script that you can load and run in the file menu. The following example will select an area south and east of Geneva, i.e. the Salève mountain and then export the contours to SVG
 
File ''saleve.mscript'':
<source lang="bash">
set-geo-bounds 6.08,46.03,6.25,46.185
move-pos x=6.1 y=46.1
export-svg file="output/saleve/saleve.svg" zoom=12 map-scale=1 compatibility=Inkscape scale=2 copy-images=true
 
</source>


== Links ==
== Links ==

Latest revision as of 12:51, 17 March 2017

Draft

Introduction

OpenStreetMap is an initiative to create and provide free geographic data, such as street maps, to anyone. The OpenStreetMap Foundation is an international not-for-profit organization supporting, but not controlling, the OpenStreetMap Project. It is dedicated to encouraging the growth, development and distribution of free geospatial data and to providing geospatial data for anyone to use and share. (OMSFoundation, March 2017)

OpenStreetMap is available through the official[openstreemap.org web application], but can be found in many applications, including may phone applications.

Since OpenStreetMap uses a well documented data structure, it is used for creating all sorts of map-based application on all sorts of devices.

Purpose of this article (for now): Extracting information for laser cutting and 3D printing. At some point, if something of interest emerges, sections will be made into stand-alone articles, e.g. the Maperitive section - Daniel K. Schneider (talk) 20:39, 15 March 2017 (CET)

OpenStreetMap Data for laser cutting and 3D printing

  • Since OpenStreeMap data includes structured information it can be extracted to various formats suitable for laser cutting and 3D printing.

For the moment, read:

Links

The online map
  • OpenStreeMap. The online map as web application (not the same thing as the OpenStreeMaps
Introductions (official)
Using (official)