OpenScienceMap vector tiles

431 views
Skip to first unread message

Emux

unread,
Sep 27, 2016, 2:48:00 AM9/27/16
to mapsforge-dev

VTM library - besides the offline Mapsforge vector maps - can process online vector tile sources, like the OpenScienceMap tiles.

But lately its server was down and the tiles were not served.
And actually we don't know for how long they can be provided.

So new vector tile sources should be found and supported by VTM.

Mapzen could be one candidate, providing vector tiles in various formats:

- GeoJSON: use the .json extension. GeoJSON is easy to get started with, human-readable, and compatible with many tools. #55
(there is an initial implementation in vtm-extras)

- TopoJSON: use the .topojson extension. TopoJSON is an optimized form of JSON that saves space by encoding topology and reducing replication of shared geometry. #56

- Mapbox-format binary tiles: use the .mvt extension. This is a compact format using protocol buffers. #57

To use any of them we need the appropriate reader, so there is some work to be done in case someone is interested to help. :)

Note: Mapzen used to provide also OpenScienceMap (protocol buffer) .vtm tiles, but now that format is considered deprecated.


BTW for anyone wanting to create a .vtm server, there are instructions here and here.
But the process is not easy and the result not always successful.

--

Andrey Novikov

unread,
Sep 27, 2016, 5:48:51 AM9/27/16
to mapsforge-dev
It's not very hard to setup a tile server (from technical point of view). But it requires significant hardware resources. I do not know where free opensource projects get them...

The other problem with new VTM tile server is:
https://github.com/opensciencemap/TileStache/blob/master/TileStache/OSciMap4/oscimap_example.sql
I've already have written you and Hannes about real database queries that produce proper opensciencemap tiles, but didn't get any positive response.

When I started playing with VTM I have considered Mapzen as a major source for map data. But the major problem with Mapzen is that they decided to rewrite many OSM tags to simplify their maps so common styles are not applicable.


Mathieu De Brito

unread,
Nov 29, 2016, 10:38:26 AM11/29/16
to mapsforge-dev
How can we have a look at the sql queries used by opensciencemap (http://opensciencemap.org/tiles/vtm) ?
It's indeed very difficult to create our own sql queries !!

Thanks

Mathieu De Brito

unread,
Dec 1, 2016, 5:05:33 AM12/1/16
to mapsforge-dev
Is the content of the getTile file copyrighted ?
Why can't we find it somewhere ?

Thanks

Emux

unread,
Dec 1, 2016, 5:08:24 AM12/1/16
to mapsfo...@googlegroups.com
Have a look here:
https://github.com/mapsforge/vtm/tree/master/vtm/src/org/oscim/tiling/source/oscimap4

It contains the proto definition (.proto) along with the TileDecoder.

--
Emux

Mathieu De Brito

unread,
Dec 1, 2016, 5:24:16 AM12/1/16
to mapsforge-dev
Thank you very much Emux, 

It helps understanding what is sent from the server, but to be honest, it does not help me construct the whole request :p
As I may have dozen of thousands of request per day and don't want to break opensciencemap server, I would like to make my own server.

I have a running server which serves tiles but I'm missing the sql functions to have a decent working server. (The sql functions given in the example gives a hint, but that's all. https://github.com/opensciencemap/TileStache/blob/master/TileStache/OSciMap4/oscimap_example.sql)

So I would like to know what if it's possible to have a look at the sql functions used by opensciencemap (http://opensciencemap.org/tiles/vtm
There is so much work (grabbing the right databases, sending the right columns, etc) that having a look at the real sql functions would help me very much making my own.

So is that possible to have a look at the sql functions used by the running opensciencemap tile server please ?

Thank you again,
Sincerely

Mathieu De Brito

unread,
Dec 5, 2016, 5:50:58 AM12/5/16
to mapsforge-dev
Hey again !

I just wanted to let you know that if you guys tell me 
"Well, it's our work (we spent hours and hours working on it) and we don't really want to share it", I will understand. 
But I need a real answer to this question in order move on :)

I just got to know that one of my clients might bring me up to 100.000 user per day. This means a lot of tile requests :p
As http://opensciencemap.org/tiles/vtm is way more efficient than what I have right now (my POC), I might need to use it in production while searching for another solution (I tried mapzen, but it seams VTM is not ready yet for this). 

So, is http://opensciencemap.org/tiles/vtm ready for that much users ?

PS: I really don't want to bother, but since there is no clear answer about this, I'm assuming that http://opensciencemap.org/tiles/vtm is free to use... nop ?

Emux

unread,
Dec 5, 2016, 6:04:50 AM12/5/16
to mapsfo...@googlegroups.com
OpenScienceMap server was down for a period and after was not working as before, i.e. more slow or empty tiles.
Also if it doesn't maintained / refreshed anymore it could have old OSM data.

Note: such servers (just like our Mapsforge) are not meant to be used in large scale or commercial apps without prior approval.
So the right thing to do is find / contact them first.

BTW I don't have the scripts, that's why I created this topic!
BTW2 if you have managed to build a VTM server that actually works, it'd be nice to provide a detailed guide so that others can benefit too!

--
Emux

Mathieu De Brito

unread,
Dec 5, 2016, 10:20:42 AM12/5/16
to mapsforge-dev
Thank you again Emux,

Short and clear as usual.
I won't be using http://opensciencemap.org/tiles/vtm in prod 
Exactly what I needed to know :)

I will try to use TileZen then, since it seems that it's a bit more up-to-date :p

Do you know if it's ok to use with VTM ?
(In their doc, they say it's VTM compliant)

Emux

unread,
Dec 5, 2016, 12:04:59 PM12/5/16
to mapsfo...@googlegroups.com
Do you mean Mapzen vector tiles?
AFAIK they have deprecated the .vtm format.

Now they offer Mapbox, GeoJSON and TopoJSON vector tiles (see their docs for the use).

We have already open issues for all 3 of them in the repository.
Mapbox format is playable in "vtm-android-example" but needs more work in the tags or theme area to become production ready.

--
Emux

Mathieu De Brito

unread,
Dec 8, 2016, 9:06:00 AM12/8/16
to mapsforge-dev
Well, MapZen/TileZen : not sure about which copied/continued the other :p

They had a working version of .vtm tiles rendering (version 0.8) :

So I will give it a try ;)

Emux

unread,
Dec 8, 2016, 3:21:59 PM12/8/16
to mapsfo...@googlegroups.com
See MapzenTest, the tile source is considered deprecated.

Unfortunately as mentioned above, Mapzen tends to modify OSM tags so even with that source, the default themes are not completely compatible.

My suggestion still is to improve Mapbox vector tiles reading, we already have a good base, need theme (or decoder) improvements.

--
Emux

Mathieu De Brito

unread,
Dec 12, 2016, 10:00:06 AM12/12/16
to mapsforge-dev
Ok, I see...
But when I tried Mapbox vector tiles (using mapzen api key), I could see only oceans, some rivers and that's pretty much of it :p

For now, I think I will postpone the production update then.
Thanks so much

Emux

unread,
Dec 12, 2016, 12:33:17 PM12/12/16
to mapsfo...@googlegroups.com
On 12/12/2016 05:00 μμ, Mathieu De Brito wrote:
But when I tried Mapbox vector tiles (using mapzen api key), I could see only oceans, some rivers and that's pretty much of it :p

MapBox parsing is not ready, needs work. :)

Partly also because of the above reason of modified OSM tags.

--
Emux
Reply all
Reply to author
Forward
0 new messages