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.

#61 2016-03-18 09:42:35

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

Re: OpenSeaMap symbols

The new renderer's input is world.osm as before.


Malcolm Herring, Developer

Offline

#62 2016-03-18 09:42:44

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

Re: OpenSeaMap symbols

Yes I have zoomed in, the seamarks layer shows only a light blue.

What is the purpose of this function? function getGeoJson()

It surprises me that you mentioned that leaflet is able to read the tiles directly from the directory.

I believe that I have to serve sea tiles as static files with apache (you mentioned gninx in another post).

I followed this tutorial http://askubuntu.com/questions/580780/i … untu-14-04 in order to set up gninx along with apache

and then this is the conf file of nginx.

server {
  root path to/tiles/;

  # Make site accessible from http://localhost/
  server_name localhost;

  # Add 1 day expires header for static assets
  location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires 1d;
  }

  location ~ ^/tiles/(?<tile_path>.*)$ {
          add_header X-Static super;
          try_files $http_host/$tile_path default.png;
  }
}

I open tiles in browser like this http://nginx.localhost/18/90569/132446.png but when put on L.tileLayer nginx.localhost/{z}/{x}/{y}.png only light blue.

I haven't create a blank default.png tile (used for holes).

I don't understand why this is complicated... I want just to serve to the client .png files

I tried your code when I see only light blue colour and the rectangle that you have drawn...

Last edited by lepipasd (2016-03-18 09:59:28)

Offline

#63 2016-03-18 22:59:04

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

Re: OpenSeaMap symbols

Thanks for the help I managed with local directive to apache to view the seamarks layer. I view Greece area. I will view the posts for the depth layer.

Offline

#64 2016-03-19 08:37:40

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

Re: OpenSeaMap symbols

Malcolm, it's too bad it doesn't use PostGIS, it seems it's currently the recommended source for rendering OpenStreetMap tiles. It would be convenient to use the same source (which is a pain to set up) to also render OpenSeaMap tiles. When you publish new renderer's code, I think I'll try to abstract away the data access layer so it is possible to connect it to PostGIS (using JDBC drivers it shouldn't be too hard to send queries to PostGIS). If it would be ok with you, when (if) I do it, I can prepeare a pull request so others can benefit from my solution.


Lepipasd, please give me some private contact information and I will send you link to a 2GB zip with my map that DOES work even when open from file:// URL

When I deployed it to the web, I just put it in /var/www folder of default nginx installation and it works -- it's just a bunch of static files, after all.

getGeoJson() function is not needed by you. It returns an example GPS track in GeoJSON format that Leaflet draws on top of the map -- that's just one of experiments in my use case smile

Offline

#65 2016-03-20 01:14:56

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

Re: OpenSeaMap symbols

thanks gshegosh,

"I just put it in /var/www folder of default nginx installation and it works"

I did something similar with apache2, the problem was that I had rendered only the diffs the first time. After I rendered the whole wolrd.osm (I used an empty file along with world.osm) and set the local directive I view the tiles,

email: lepipasd@gmail.com , feel free to contact, now I am looking to add a bathymetry layer. I read in another post in the forum that malcomh is working on a niew renderer that consists of two parts, one of which is a base layer...

Offline

#66 2016-03-20 08:03:18

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

Re: OpenSeaMap symbols

gshegosh wrote:

Malcolm, it's too bad it doesn't use PostGIS, it seems it's currently the recommended source for rendering OpenStreetMap tiles. It would be convenient to use the same source (which is a pain to set up) to also render OpenSeaMap tiles. When you publish new renderer's code, I think I'll try to abstract away the data access layer so it is possible to connect it to PostGIS (using JDBC drivers it shouldn't be too hard to send queries to PostGIS). If it would be ok with you, when (if) I do it, I can prepeare a pull request so others can benefit from my solution.

Such a modification could not be merged, it would have to be a fork. You can look at my work here: https://wiki.opennauticalchart.org/inde … Java_Suite


Malcolm Herring, Developer

Offline

#67 2016-03-21 15:39:35

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

Re: OpenSeaMap symbols

gshegosh,

I opened a new topic regarding water depth, read it to sea if you may help!

thanks!

malcolmh if there is another way of implementing it (the depth contours) besides the way I describe, let me know

Offline

#68 2016-09-28 08:45:00

Bibi
Member
Registered: 2016-09-28
Posts: 3

Re: OpenSeaMap symbols

gshegosh wrote:

Malcolm, it's too bad it doesn't use PostGIS, it seems it's currently the recommended source for rendering OpenStreetMap tiles.

On top of that, OsmAND already offers OpenSeaMap rendering on Java using their own vector tile format (producing WebGL/OpenGL I guess), see this thread. on the forum. WorldWide data is an OSM extract just 86 MB in size.
If you could do it using CartoCSS and Mapnik, it would be compatible with most OSM rendering engines.
Each stack has its own tricks and being able to produce tiles using imposm3/CartoCSS/Mapnik would really great.
It would help to diffuse the great work done in OpenSeaMap. Here if we want to create OpenStreetMap with OpenSeaMap we have to download in 2 different formats or convert from one to the other.
And merge the result (except if we accept to duplicates the calls from the client).

Last edited by Bibi (2016-09-28 09:09:00)

Offline

Board footer

Powered by FluxBB