Skip to content

Commit 04d19bf

Browse files
committed
OpenStreetMap geo tutorial
1 parent e04b6bc commit 04d19bf

File tree

9 files changed

+356
-8
lines changed

9 files changed

+356
-8
lines changed

documents/tutorials/css/tutorial.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import url("https://fonts.googleapis.com/css?family=Roboto+Condensed:300|Fjalla+One");
1+
@import url("https://fonts.googleapis.com/css?family=Roboto+Condensed:300|Fjalla+One|Amarante");
22

33
#litvis {
44
@fSize: 11pt;

documents/tutorials/geoTutorials/geoFormats.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ _This is one of a series of 'geo' tutorials for use with litvis._
1616
1. **Geospatial File Formats**
1717
2. [Generating Global Map Projection Geo Files](geoGenerating.md)
1818
3. [Importing geographic datasets into elm-vegalite](geoImporting.md)
19+
4. [Importing and displaying OpenStreetMap data](openstreetmap.md)
1920

2021
---
2122

documents/tutorials/geoTutorials/geoGenerating.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ _This is one of a series of 'geo' tutorials for use with litvis._
1616
1. [geospatial File Formats](geoFormats.md)
1717
2. **Generating Global Map Projection Geo Files**
1818
3. [Importing geographic datasets into elm-vegalite](geoImporting.md)
19+
4. [Importing and displaying OpenStreetMap data](openstreetmap.md)
1920

2021
---
2122

documents/tutorials/geoTutorials/geoImporting.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ _This is one of a series of 'geo' tutorials for use with litvis._
1616
1. [Geospatial File Formats](geoFormats.md)
1717
2. [Generating Global Map Projection Geo Files](geoGenerating.md)
1818
3. **Importing geographic datasets into elm-vegalite**
19+
4. [Importing and displaying OpenStreetMap data](openstreetmap.md)
1920

2021
---
2122

@@ -35,16 +36,19 @@ _For related tutorials, see Mike Bostock's series [Command-Line Cartography](htt
3536

3637
## 0. Setup
3738

38-
Some of these steps involve using [Geospatial Abstraction Data Library (gdal)](http://www.gdal.org) and some d3 command line programs, so as a one-off setup stage you need to install the following with [homebrew](https://brew.sh) and [npm](https://docs.npmjs.com/getting-started/installing-node) (if you don't have them installed, do so first).
39+
To perform some of the file conversions you will need the [Geospatial Abstraction Data Library (gdal)](http://www.gdal.org), so if you do not have this already, as a one-off setup stage you should install it. Here are some installation instructions for [MacOS](https://medium.com/@vascofernandes_13322/how-to-install-gdal-on-macos-6a76fb5e24a4), for [Windows](https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows), and for [Ubuntu](https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html)).
3940

40-
Open a terminal and install the relevant packages with the following
41+
After installation, opening a command line window and typing
4142

42-
[comment]: # "Don't need `d3-geo-projection` as we use gdal instead for projection, which offers a more comprehensive set of transformations that account for ellipsoids."
43+
**`ogr2ogr --version`**
4344

44-
```bash
45-
brew install gdal
46-
npm install -g shapefile ndjson-cli topojson d3-geo-centroid
47-
```
45+
should display a message similar to
46+
47+
GDAL 2.4.1, released 2019/03/15
48+
49+
You will also need to install some d3 command-line utilities, so open a command line window and type
50+
51+
**`npm install -g shapefile ndjson-cli topojson d3-geo-centroid`**
4852

4953
The `-g` option ensures the installed packages are available globally from any directory.
5054
The `gdal` package will be used for the map projection work; `shapefile` for the conversion from shapefile to geoJSON; `ndjson-cli` splits JSON files into separate lines to ease processing; `topojson` does the conversion to topoJSON and the topology-preserving simplification; and `d3-geo-centroid` is used for generating centroid locations from polygons.
Loading
Loading
Loading
Loading

documents/tutorials/geoTutorials/openstreetmap.md

+342
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)