Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Add export page

Russ Garrett1bd6a96ed374
diff --git a/web-backend/main.py b/web-backend/main.py
index 747b09b..32ce4cc 100644
--- a/web-backend/main.py
+++ b/web-backend/main.py
@@ -60,6 +60,12 @@ async def about(request):
return templates.TemplateResponse("about.html", {"request": request})
[email protected]("/about/exports")
+@cache_for(3600)
+async def exports(request):
+ return templates.TemplateResponse("exports.html", {"request": request})
+
+
@app.route("/copyright")
@cache_for(3600)
async def copyright(request):
@@ -154,7 +160,9 @@ async def plants_country(request, country):
try:
min_output = int(request.query_params["min_output"])
plants = [
- plant for plant in plants if plant["output"] and plant["output"] >= min_output
+ plant
+ for plant in plants
+ if plant["output"] and plant["output"] >= min_output
]
except ValueError:
pass
@@ -232,8 +240,7 @@ async def plant_detail(request, country):
and wd["claims"]["P18"][0]["mainsnak"]["datatype"] == "commonsMedia"
):
image_data = await get_commons_thumbnail(
- wd["claims"]["P18"][0]["mainsnak"]["datavalue"]["value"],
- 400
+ wd["claims"]["P18"][0]["mainsnak"]["datavalue"]["value"], 400
)
return templates.TemplateResponse(
diff --git a/web-backend/templates/about.html b/web-backend/templates/about.html
index af7c067..1e83477 100644
--- a/web-backend/templates/about.html
+++ b/web-backend/templates/about.html
@@ -2,9 +2,9 @@
{% block title %}About{% endblock %}
{% set breadcrumbs = [('About', None)] %}
{% block content -%}
- <p class="lead"><a href="/">Open Infrastructure Map</a> is a view of the world's hidden infrastructure mapped in the
+ <p class="lead"><a href="/">Open Infrastructure Map</a> is a view of the world's infrastructure mapped in the
<a href="http://www.openstreetmap.org/">OpenStreetMap database</a>.</p>
- <p>By and large, this data isn't exposed on the main OSM map, so I built
+ <p>This data isn't exposed on the default OSM map, so I built
Open Infrastructure Map to visualise it.</p>
<h2>How do I contribute?</h2>
@@ -16,21 +16,32 @@
<a href="http://wiki.openstreetmap.org/wiki/Power">power</a> and <a href="http://wiki.openstreetmap.org/wiki/Telecoms">telecoms</a>.
</p>
+ <h2>How do I access the data?</h2>
+ <p>All the data currently displayed on OpenInfraMap is sourced directly from OpenStreetMap.</p>
+
+ <p>If you can consume vector data in Mapbox Vector Tiles format, you can fetch vector data directly
+ from the OpenInfraMap tile server using the <a href="/map.json">TileJSON file</a>.</p>
+
+ <p>If you need relatively small extracts of data, you can use
+ <a href="https://overpass-turbo.eu/">Overpass Turbo</a> to generate these in GeoJSON and
+ similar formats.</p>
+
+ <p>For larger amounts of data, you will need to fetch and process the raw OSM data directly,
+ which is relatively complex. You may wish to use our <a href="{{url_for('exports')}}">commercial export service</a>.</p>
+
<h2>How is OIM made?</h2>
<p>The following mess of tools and services make Open Infrastructure Map run:</p>
<ul>
<li><a href="https://www.postgresql.org/">Postgres</a>/<a href="http://postgis.net/">PostGIS</a> for data storage
<li><a href="https://imposm.org/">Imposm3</a> for filtering and importing the OSM data
<li><a href="http://tegola.io/">Tegola</a> for vector tile rendering and serving
- <li>The <a href="https://github.com/MapLibre/maplibre-gl-js">MapLibre GL JS</a> web interface</li>
+ <li>The <a href="https://github.com/MapLibre/maplibre-gl-js">MapLibre GL JS</a> web interface
</ul>
<p>The background map data is kindly provided by <a href="https://www.maptiler.com/"><img width="150px" src="img/maptiler.png" alt="MapTiler"></a>.</p>
<h2>Where's the code?</h2>
- <p>You can find some bits of OIM on the
- <a href="https://github.com/openinframap/">openinframap Github organisation</a>.
- More to come, soon.</p>
+ <p>You can find the code which runs OpenInfraMap <a href="https://github.com/openinframap/">openinframap Github organisation</a>.</p>
<h2>Who made this?</h2>
<p>I'm <a href="https://russ.garrett.co.uk">Russ</a>, and I like infrastructure.
@@ -53,27 +64,4 @@
<noscript><a href="https://liberapay.com/russss/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
</p>
- <h2>How do I access the data?</h2>
- <p>All the data currently displayed on OpenInfraMap is sourced directly from OpenStreetMap.</p>
-
- <p>If you can consume vector data in Mapbox Vector Tiles format, you can fetch vector data directly
- from the OpenInfraMap tile server using the <a href="/map.json">TileJSON file</a>.</p>
-
- <p>If you need relatively small extracts of data, you can use
- <a href="https://overpass-turbo.eu/">Overpass Turbo</a> to generate these in GeoJSON and
- similar formats.</p>
-
- <p>For larger amounts of data, you will need to fetch and process the raw OSM data directly,
- which is relatively complex.</p>
-
- <p>I can provide exports from the OpenInfraMap database, for which I charge a fee of
- £85 to cover my time. More complex work will normally be billed at £100/hour although I am
- happy to negotiate this based on the task. Please contact
- <a href="mailto:[email protected]">[email protected]</a> if you are interested in this.</p>
-
- <p>If you use this data, you will need to comply with the
- <a href="https://www.openstreetmap.org/copyright">OpenStreetMap licensing terms</a>, which
- require that you attribute OpenStreetMap. Attribution of "OpenInfraMap", and a link to this
- website, would be appreciated but is not required.
- </p>
{% endblock %}
diff --git a/web-backend/templates/exports.html b/web-backend/templates/exports.html
new file mode 100644
index 0000000..62947e0
--- /dev/null
+++ b/web-backend/templates/exports.html
@@ -0,0 +1,55 @@
+{% extends "_base.html" %}
+{% block title %}OpenStreetMap Data Exports{% endblock %}
+{% set breadcrumbs = [('Exports', None)] %}
+{% block content -%}
+ <p>We can provide exports of worldwide power and telecoms infrastructure from OpenStreetMap.</p>
+ <p>Our standard export provides the following information:</p>
+
+ <ul>
+ <li>Power plants as polygons</li>
+ <li>Substations as points and polygons</li>
+ <li>Power lines</li>
+ <li>Telecommunication lines</li>
+ <li>Telecommunication buildings/datacenters</li>
+ </ul>
+
+ <p>Custom exports with additional data are available at additional cost.</p>
+
+ <p>We can only provide exports of data which is visible on OpenInfraMap. If you require
+ exports of other OpenStreetMap data, you may wish to consider the
+ <a href="https://www.geofabrik.de/data/shapefiles.html">Geofabrik export service</a>.</p>
+
+ <h3>Formats</h3>
+
+ <p>Exports can be provided in many standard geospatial vector formats, such as GeoJSON, Shapefile, etc.</p>
+
+ <p>Exports of power network data in KML (Google Earth) format, with styling and interactivity, are available
+ at an additional cost. Please note that these tend to be unusuably slow for areas larger than a single country.</p>
+
+ <h3>Pricing</h3>
+ <table>
+ <thead>
+ <caption>OpenInfraMap Export Prices</caption>
+ </thead>
+ <tbody>
+ <tr></th><th>Area</th><th>Price</th></tr>
+ <tr><td>1-3 countries</td><td>£200</td></tr>
+ <tr><td>Worldwide</td><td>£600</td></tr>
+ </tbody>
+ </table>
+
+ <p>Payment is required in advance of delivery by card or GBP bank transfer.</p>
+ <p>A discount is available for non-profit or academic research projects.</p>
+
+ <h3>License</h3>
+ <p>This data is licensed under the
+ <a href="https://www.openstreetmap.org/copyright">OpenStreetMap licensing terms</a>, which
+ require that you attribute OpenStreetMap in any derived data. Attribution of "OpenInfraMap",
+ and a link to this website, would be appreciated but is not required.
+ </p>
+
+ <h3>Ordering</h3>
+ <p>To order an export, please <a href="mailto:[email protected]">drop us an email</a>.</p>
+ <p>Exports are provided by Zarya Ltd, a UK consultancy which supports the development of OpenInfraMap.</p>
+
+{% endblock %}