Skip to content

Commit

Permalink
Remove attribution-free and improve wording
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis committed Jul 22, 2024
1 parent 816c6b9 commit 4c0f759
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 51 deletions.
1 change: 1 addition & 0 deletions src/pages/documentation/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"index": "Introduction",
"basemap": "Basemap",
"getting-started": "Getting started",
"examples": "Examples",
"developer-manual": "Developer manual"
Expand Down
27 changes: 27 additions & 0 deletions src/pages/documentation/basemap.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Basemap

Apache Baremaps comes with a [default schema and style](https://baremaps.apache.org/documentation/basemap/) similar to [OpenStreetMap Carto](https://github.com/gravitystorm/openstreetmap-carto).

We chose the [Apache License](https://github.com/apache/incubator-baremaps/blob/main/LICENSE) so that map vendors can create derived work without attributing the Apache Baremaps project on the map.
The only requirement is to give proper credit to the wonderful contributors behind the data sources, such as [OpenStreetMap](https://www.openstreetmap.org/) or [Natural Earth](https://www.naturalearthdata.com/).
Notice that this schema and style are now used by default to display vector maps on the [OpenStreetMap wiki](https://wiki.openstreetmap.org/wiki/Template:Vector_map).

While the quality of the schema and style keeps improving, contributions, improvements, and feedback are welcome and encouraged.

import Map from '@/components/map';

<div style={{ marginTop: 20, height: 450 }}>
<Map />
</div>

## Build the basemap

In order to build the basemap locally, move to the `/basemap` directory and run the following workflow:

```bash
baremaps workflow execute --file=workflow.js
```

> Note: If you are using Docker, you need to increase the storage allocated to Docker to at least 20GB.
Depending on your machine and internet connection, the process can take up to 30 minutes.
27 changes: 0 additions & 27 deletions src/pages/documentation/developer-manual/basemap.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions src/pages/documentation/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ You should have completed the [Installation Guide](/getting-started/installing-t

For the creation of custom vector tiles you can follow these guides:

- The [OpenStreetMap](/documentation/examples/import-osm-into-postgis/) example is a good introduction to Baremaps, it shows how to produce high resolution vector tiles.
- The [OpenStreetMap](/documentation/examples/import-osm-into-postgis/) example shows how to import OpenStreetMap data into postgis and create minimalistic vector tiles (see the [basemap](https://baremaps.apache.org/documentation/basemap/) for a more detailed shema and style).
- The [NaturalEarth](/documentation/examples/import-naturalearth-into-postgis/) example shows how to produce low resolution vector tiles.
- The [Contour](/documentation/examples/import-contour-into-postgis/) example shows how to produce contour lines from a digital elevation model.
- The [Extrusion](/documentation/examples/extrusion/) example shows how to import OSM data into postgis and use the MVT specification to extrude the vectors into 3d.
- The [Extrusion](/documentation/examples/extrusion/) example shows how to import OpenStreetMap data into postgis and use the MVT specification to extrude the vectors into 3d.

For the creation of an IP to location service follow this guide:

Expand Down
20 changes: 10 additions & 10 deletions src/pages/documentation/examples/import-osm-into-postgis.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: default
title: Import OSM data into PostGIS
title: Import OpenStreetMap data into PostGIS
---

# Import OSM data into PostGIS
# Import OpenStreetMap data into PostGIS

In this tutorial, we'll learn how to use Baremaps to import contour lines data in a PostGIS database.

Expand All @@ -13,16 +13,16 @@ Also, if you are in a hurry, consider skipping the "Under the Hood" sections.

## Dataset

OpenStreetMap (OSM) is a free and editable map of the world.
OpenStreetMap is a free and editable map of the world.
It is maintained by a community of passionate volunteers in a way which is similar to Wikipedia.
Every week, OpenStreetMap publishes a [full dump](https://planet.openstreetmap.org/) of its data in two flavours: a large XML file of about 90GB and a more compact binary file of about 50GB in the [Protocol Buffer Format](https://developers.google.com/protocol-buffers) (PBF).
As processing such large files can take several hours, [Geofabrik](http://www.geofabrik.de/data/download.html) regularly publishes smaller extracts of OSM for specific regions.
In this example we will use a tiny extract of OSM for [Liechtenstein](https://en.wikipedia.org/wiki/Liechtenstein), which is suitable for fast experiments.
As processing such large files can take several hours, [Geofabrik](http://www.geofabrik.de/data/download.html) regularly publishes smaller extracts of OpenStreetMap for specific regions.
In this example we will use a tiny extract of OpenStreetMap for [Liechtenstein](https://en.wikipedia.org/wiki/Liechtenstein), which is suitable for fast experiments.

## Importing OpenStreetMap Data

A workflow is a directed acyclic graph of steps executed by Baremaps.
To download and import the sample OSM data in Postgres, execute the following [workflow](https://raw.githubusercontent.com/apache/incubator-baremaps/main/examples/openstreetmap/workflow.json).
To download and import the sample OpenStreetMap data in Postgres, execute the following [workflow](https://raw.githubusercontent.com/apache/incubator-baremaps/main/examples/openstreetmap/workflow.json).

```bash
cd examples/openstreetmap
Expand Down Expand Up @@ -57,16 +57,16 @@ Eventually, the output produced by the command should look as follows.

What can we learn from this output?
First, we notice that Baremaps uses a connection pool to parallelize the import procedure.
Then it imports the OSM data, populating the tables previously created.
Then it imports the OpenStreetMap data, populating the tables previously created.
In our case, the input is a file provided by Geofabrik.

OSM's [conceptual model](https://wiki.openstreetmap.org/wiki/Elements) builds upon the notions of nodes, ways and relations.
OpenStreetMap's [conceptual model](https://wiki.openstreetmap.org/wiki/Elements) builds upon the notions of nodes, ways and relations.
In this normalized data model, a line (or way) is formed by a sequence of points (nodes) referenced by their id.
In order to save denormalized geometries in PostGIS (e.g. linestring, polygon, multi-polygon, etc.), Baremaps creates a cache for nodes, ways and relations.
[LMDB](https://symas.com/lmdb/) is used under the hood to achieve great performance.

After the creation of the cache, Baremaps can populate the database with geometries.
The geometries are stored in three tables named after the OSM conceptual model: `osm_nodes`, `osm_ways`, and `osm_relations`.
The geometries are stored in three tables named after the OpenStreetMap conceptual model: `osm_nodes`, `osm_ways`, and `osm_relations`.
In order to improve performances at query time, Baremaps also creates indexes for the tags and the geometries.
The following Figure displays the schema of the PostGIS database created by Baremaps.

Expand All @@ -76,5 +76,5 @@ The following Figure displays the schema of the PostGIS database created by Bare

In this tutorial, we learnt how to import OpenStreetMap data in PostGIS.

Now that you have inserted the OSM data into the PostGIS database, you can use follow the [Serve Vector Tiles from PostGIS](/documentation/examples/serve-and-export-vector-tiles/) example to serve
Now that you have inserted the OpenStreetMap data into the PostGIS database, you can use follow the [Serve Vector Tiles from PostGIS](/documentation/examples/serve-and-export-vector-tiles/) example to serve
your PostGIS data directly as Vector Tiles in a web application with live reload capabilities.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In this tutorial, we'll learn how to create vector tiles from the data imported

If you have not yet inserted data into your PostGIS database, please follow one of these three guides:

- [Import OSM data into PostGIS](/documentation/examples/import-osm-into-postgis/)
- [Import OpenStreetMap data into PostGIS](/documentation/examples/import-osm-into-postgis/)
- [Import Natural Earth data into PostGIS](/documentation/examples/import-naturalearth-into-postgis/)
- [Import Contour lines from the ASTER dataset into PostGIS](/documentation/examples/contour-lines-in-vector-tiles/)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ docker stop baremaps
docker start baremaps
```

From there you can go to the [Examples](/documentation/examples) section. The [Import OSM data into PostGIS](/documentation/examples/import-osm-into-postgis) example is the first step to produce custom high resolution vector tiles.
From there you can go to the [Examples](/documentation/examples) section. The [Import OpenStreetMap data into PostGIS](/documentation/examples/import-osm-into-postgis) example is the first step to produce custom high resolution vector tiles.
15 changes: 5 additions & 10 deletions src/pages/documentation/index.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Introduction

Apache Baremaps is an [open source](https://github.com/apache/incubator-baremaps/blob/main/LICENSE) toolkit and a set of infrastructure components for creating, publishing, and operating online maps. It provides a data pipeline enabling developers to build maps with different data sources. It offers live reload capabilities that allow cartographers to customize the content and the style of a map. It includes an attribution-free map schema and style that stimulates derived work. Finally, it provides services commonly used in online maps, such as location search and IP to location.

Apache Baremaps is inspired by [Osmosis](https://github.com/openstreetmap/osmosis), but it comes with additional features, such as the ability to:

- Process data in parallel with the [Stream API](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html) introduced in Java 8
- Import data faster with the [COPY API](https://www.postgresql.org/docs/11/sql-copy.html) of Postgresql
- Create postgis geometries on the fly with [JTS](https://github.com/locationtech/jts)
- Create and serve customized [Vector Tiles](https://docs.mapbox.com/vector-tiles/specification/)

On the longer run, the project aims to work with a variety of data sources in order to create highly specialized and customized maps.
Apache Baremaps is an [open source](https://github.com/apache/incubator-baremaps/blob/main/LICENSE) toolkit and a set of infrastructure components for creating, publishing, and operating online maps.
It provides a data pipeline enabling developers to build maps with different data sources.
It offers live reload capabilities that allow cartographers to rapidely customize the content and the style of a map.
It comes with a [default schema and style](https://baremaps.apache.org/documentation/basemap/) similar to [OpenStreetMap Carto](https://github.com/gravitystorm/openstreetmap-carto).
Finally, it aims at providing a set of services commonly used in online maps, such as location search and IP to location.

0 comments on commit 4c0f759

Please sign in to comment.