OpenSeaMap Forum

For new registrations: Please create and activate an account. Afterwards send an email to forum.openseamap@gmail.com including a short message and your username to get write access to this forum. Thanks!
Für neue Registrierungen: Bitte erstelle einen neuen Account und schalte ihn frei. Anschließend sende eine kurze Mail mit deinem Nutzernamen an forum.openseamap@gmail.com um Schreibzugriff für dieses Forum zu bekommen. Danke!

You are not logged in.

#51 2016-03-17 07:18:39

gshegosh
Member
From: Szczecin, Poland
Registered: 2016-03-12
Posts: 18
Website

Re: OpenSeaMap symbols

I've only used my area. I've used http://extract.bbbike.org/ to extract my area twice -- once in pbf (for mapnik) and once in bz2-ed osm (for openseamap renderer).

Offline

#52 2016-03-17 07:41:12

lepipasd
Member
Registered: 2016-02-16
Posts: 36

Re: OpenSeaMap symbols

For OpenSeaMap, did you extract the elements with seamark:type tags? Or did you use the .osm extract of your region?

I also didn't disable the creation of .send files in tmp and I also noticed that under tiles folser I have these folders:
11, ..., 18 (representing the zoom levels). Do you have the same folders under tiles?

The render process has just finished after 18h I have know all zoom levels 9-10

Last edited by lepipasd (2016-03-17 08:32:43)

Offline

#53 2016-03-17 08:35:14

gshegosh
Member
From: Szczecin, Poland
Registered: 2016-03-12
Posts: 18
Website

Re: OpenSeaMap symbols

Yeah, I did extract these elements. I've taken a look at getworld script and it lead me to OverPass, so I've installed it (see http://wiki.openstreetmap.org/wiki/Over … wheezy.29), imported the osm extract and then did:

echo "[timeout:3600];(rel['seamark:type'];>;way['seamark:type'];>;node['seamark:type'];);out meta;" | ./bin/osm3s_query --db-dir=db > next.osm

in its directory.

Folders representing zoom levels under tiles is how it should be. Tiles have URLs like something/{zoom}/{x}/{y}.png so first level is zoom smile I have directories 9-14 here.

Last edited by gshegosh (2016-03-17 08:40:07)

Offline

#54 2016-03-17 08:37:26

gshegosh
Member
From: Szczecin, Poland
Registered: 2016-03-12
Posts: 18
Website

Re: OpenSeaMap symbols

Malcolm, are there any plans to rewrite the OpenSeaMap renderer so that it uses PostGis to obtain data? I'm thinking it would be lots easier to use.

Last edited by gshegosh (2016-03-17 08:37:48)

Offline

#55 2016-03-17 08:53:41

lepipasd
Member
Registered: 2016-02-16
Posts: 36

Re: OpenSeaMap symbols

something in our case is the directory (tiles) in which the tiles are located, right? So I have to copy paste the folder in the same directory

with index.html and use them with leaflet as static tiles (as suggested in previous posts). I 'll try and revert back.

Thanks both!

Malcomh you are great!

Why not make a documentation(installation guide) about searenderer from our conversation and upload it to git, or in this forum?

Malcomh in case you like the idea I am willing to do so.

I have zoom levels 9-18 not 9-10

Last edited by lepipasd (2016-03-17 08:54:32)

Offline

#56 2016-03-17 10:47:23

malcolmh
Member
From: Hull, UK
Registered: 2012-09-05
Posts: 194

Re: OpenSeaMap symbols

You should be aware that I am working on a new renderer, written in Java, and will be launching it very soon. As this new renderer will be used to generate the seamark layer tiles, I will obsolete searender. If either of you want to claim ownership of searender & develop it further, please go ahead, otherwise it will become dead code.


Malcolm Herring, Developer

Offline

#57 2016-03-17 11:31:06

lepipasd
Member
Registered: 2016-02-16
Posts: 36

Re: OpenSeaMap symbols

After generating the OpenSeaMap tiles, I tried to add them as an overlay upon the openstreet basemap.

I copied the tiles/ folder under /var/www/html/map/ (in the same location with index.html) and added

in the section script of index.html the following:

var map = L.map('map');
map.setView([53.45 , 14.55],5);

var basemap = L.tileLayer('http://localhost/osm_tiles/{z}/{x}/{y}.png', {
    maxZoom: 18
)}.addTo(map);

var sea = L.tileLayer('tiles/{z}/{x}/{y}.png', {
    minZoom: 9,
    maxZoom: 18
)}.addTo(map);

but I see in browser only the openstreetmap layer not the seamarks layer. But no error (pink page). I may also open tiles and view as pictures. Is something wrong with the file structure (see below)? What is wrong?

For rendering the tiles I didn't use an empty world.osm but one from the previous day (compared with next.osm). Does that mean that only the diffs between the two files have been rendered and not the whole .osm file?

I also noticed that the x , y (coordinates) of the OpenSeaMap tiles are large numbers like this:

under 18/ (zoom)
I have  219132/ (x)
and then 120318.png

Instead the structure of osm tiles is a little bit different:

18/ (zoom)

under 18/ there exist 33/72/75/80/128.meta

Last edited by lepipasd (2016-03-17 12:06:26)

Offline

#58 2016-03-17 15:22:51

lepipasd
Member
Registered: 2016-02-16
Posts: 36

Re: OpenSeaMap symbols

My question as far it concerns seamarks layer:

Is it possible for L.tileLayer to read tiles from file system like this:

var sea = L.tileLayer('tiles/{z}/{x}/{y}.png', {
    minZoom: 9,
    maxZoom: 18
)}.addTo(map);

gshegosh I saw in your html that you have copy paste the folders with the tiles in the same directory with index.html and use for L.tileLayer argument the relative path. No other configuration?

Offline

#59 2016-03-18 08:17:24

gshegosh
Member
From: Szczecin, Poland
Registered: 2016-03-12
Posts: 18
Website

Re: OpenSeaMap symbols

Malcolm, does the new renderer use PostGIS? Anyway, I don't think it'd be beneficial to anyone to support two different renderers, yours should be the "canonical" one, especially since it'll always be the first one to get any new features.

Lepipasd, take a look at http://krop.pl/pliki/tiles.tar.gz -- it's an extract of my directory structure with all the tiles removed (so it doesn't weight gigabytes). No other configuration was needed than the L.tileLayer('tiles/... and it DOES read from file system.

Maybe it's a bit silly to ask, but did you try to zoom in? OpenSeaMap tiles show starting from zoom level 9 and you start Leaflet at zoom 5.

Last edited by gshegosh (2016-03-18 08:22:26)

Offline

#60 2016-03-18 08:20:43

gshegosh
Member
From: Szczecin, Poland
Registered: 2016-03-12
Posts: 18
Website

Re: OpenSeaMap symbols

Oh, and those in mod_tile named like "33/72/75/80/128.meta" is what I've mentioned before -- it seems more like a kind of cache, than tile storage to me. That's why I've downloaded them using my code.

Large x/y numbers in tile names at zoom level 18 is normal -- there's a lot of tiles. At lower zoom levels numbers are lower.

Offline

Board footer

Powered by FluxBB