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.

#21 2016-03-06 11:08:58

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

Re: OpenSeaMap symbols

Below are the settings of renderd.conf:

   [renderd]
   socketname=/var/run/renderd/renderd.sock
   num_threads=4
   tile_dir=/var/lib/mod_tile
   stats_file=/var/run/renderd/renderd.stats

   [mapnik]
   plugins_dir=/usr/local/lib/mapnik/input
   font_dir=/usr/share/fonts/truetype/ttf-dejavu
   font_dir_recurse=1
   
   [default]
   URI = /osm_tiles/
   TILEDIR = /var/lib/mod_tile
   XML = /usr/local/share/maps/style/openstreetmap-carto/osmcarto.xml
   HOST = localhost
   TILESIZE = 256
   
Our conversation motivated me to understand that the [default] section defines the base map and the xml named osmcarto.xml determines the styling (default styling of osm)  along with the data source (in my case postgis db and shape files).

Is it correct that I may define another section in this file named [seamarks] with different URI /seamark_tiles/ and a different .xml (the xml that reads the elements with tag semark:type=* from the db and styles them appropriately) in order to produce the desired overlay (/seamark_tiles/{z}/{x}/{y}.png)?

Is this a correct approach which theoretically can be accomplished?

Offline

#22 2016-03-07 05:24:33

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

Re: OpenSeaMap symbols

I am unable to help on this question as I have no knowledge of the carto tools or environment.


Malcolm Herring, Developer

Offline

#23 2016-03-10 11:39:53

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

Re: OpenSeaMap symbols

Hi malcomh,
I am trying to set up your customized renderer on my ubuntu 14.04 and I have some questions:

1. Dependencies? (java and overpass only?)

2. You have mentioned that overpass is needed for generating world.osm from original data. In case I have world.osm(from tiles.openseamap.org/seamark/world.osm) that means that there is no need to install and use overpass?

3. I have a directory in my home folder called src (in which I have tools needed for maps). So in this directory I do git clone https://github.com/OpenSeaMap/renderer.git to download it. There exists a file in searender directory named Makefile.linux with this line of code "rm -vf *.o s57toosm searender". Do I have to run it on a terminal, or do I have to run any other script in order to complete installation?

4. In work directory there is a script named upload. There exists a line of code "ftp -q -B 131072 -b tmp/sending 195.37.132.70 >/dev/null"
I resolved the 195.37.132.70 address to g70.hs-nb.de. Why is that IP needed?

Offline

#24 2016-03-10 20:54:24

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

Re: OpenSeaMap symbols

1 & 2. Only Java is needed. If you are are downloading world.osm from tiles.openseamap.org, then no OverPass is needed

3. To build searender on Ubuntu, simply type: "make -f Makefile.linux". Also, jsearch & jtile need to be built (with Apache ant). Move or link to the jar files in work/

4. You should not run "upload". That is for my system to send tiles to tiles.openseamap.org

To run the "render" script, load the new world.osm into work/next.osm and touch work/done. The script will move next.osm into world.osm when it has processed the diffs between the two files.

Last edited by malcolmh (2016-03-11 11:38:19)


Malcolm Herring, Developer

Offline

#25 2016-03-11 09:58:23

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

Re: OpenSeaMap symbols

You mentioned "jsearch & jtile need to be built (with Apache ant). Move or link to the jar files in work/".

1. build searenderer:
    cd path to/Makefile.linux
    make -f Makefile.linux

2. build jsearch & jtile with ant
    cd path to/build.xml //jsearch
    ant
    cd path to/build.xml //jtile
    ant

3. move or link (the produced files?) to the jar files in work/

I will make a try and revert to you if needed

What about these styles(see link below) of JOSM that I have found on git?

https://github.com/OpenSeaMap/josm

Do they have they same result with the sea renderer?

Can they be used for creating a mapnik .xml style?

I have also found in git:

https://github.com/plepe/pgmapcss

"pgmapcss compiles MapCSS styles into a database function. Mapnik just needs to call this database function and render the processed data."

thanks a lot for the help, a nice guide will be produced after our conversation...

Last edited by lepipasd (2016-03-12 00:02:01)

Offline

#26 2016-03-15 08:25:33

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

Re: OpenSeaMap symbols

I'm trying to render tiles just for the Baltic Sea. I've found out that I can download an OSM extract in numerous formats using http://extract.bbbike.org/ to select region that interests me. I've used the tool before to download Baltic Sea in PBF format, so importing it to PostGIS (for OpenSTREETMap tile rendering) takes a sane amount of time (importing whole Europe dump would probably take days or even weeks).

Instead of messing with osmosis to convert my PostGIS to .osm file that OSeaMap's renderer uses I find it's easier to just redownload the extract in osm.bz2 format.

Maybe it helps someone smile

Last edited by gshegosh (2016-03-15 08:26:43)

Offline

#27 2016-03-15 15:44:01

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

Re: OpenSeaMap symbols

Hi malcomh,

I have tried to build your custom renderer and have some problems.... I will describe the steps I made:

First install java, ant and libbatic-java (required dependencies)
1. cd ~/src
2. git clone  https://github.com/OpenSeaMap/renderer.git
3. cd renderer/searender
4. make -f Makefile.linux
5. cd ../jsearch
6. ant //below is the output
rnd@Archimidis:~/src/renderer/jsearch$ ant
Buildfile: /home/rnd/src/renderer/jsearch/build.xml

init:

compile:

dist:
      [jar] Building jar: /home/rnd/src/renderer/jsearch/jsearch.jar

BUILD SUCCESSFUL
Total time: 0 seconds

7. cd ../jtile
8. ant //at this point I get an error which I think I fixed

Buildfile: /home/rnd/src/renderer/jtile/build.xml

init:

compile:
    [javac] Compiling 1 source file to /home/rnd/src/renderer/jtile/build

BUILD FAILED
/home/rnd/src/renderer/jtile/build.xml:15: /usr/local/bin/batik-1.7 does not exist.

Total time: 0 seconds

I changed in build.xml

<property name="batik.dir" value="/usr/local/batik-1.7/"/>

to

<property name="batik.dir" value="/usr/share/java/"/> (used dpkg -L libbatik-java | grep batik-1.7)

then build again with ant and get the below output:

rnd@Archimidis:~/src/renderer/jtile$ ant
Buildfile: /home/rnd/src/renderer/jtile/build.xml

init:

compile:
    [javac] Compiling 1 source file to /home/rnd/src/renderer/jtile/build

dist:
      [jar] Building jar: /home/rnd/src/renderer/jtile/jtile.jar

BUILD SUCCESSFUL
Total time: 6 seconds

9. sudo mv jtile.jar ../work/

10. cd ../jsearch and then sudo mv jsearch.jar ../work/   //"move or link the jar files to /work"

11. download world.osm and copy at /work as next.osm

12. sudo touch done (in work/ directory)

13. At this point I have an error when running "render" script: (below you may see the contents of work/ directory at this point)

rnd@Archimidis:~/src/renderer/work$ touch done
rnd@Archimidis:~/src/renderer/work$ ls -la
total 413668
drwxrwxr-x 2 rnd  rnd       4096 Μάρ  15 20:13 .
drwxrwxr-x 8 rnd  rnd       4096 Μάρ  15 14:08 ..
-rwxrwxr-x 1 rnd  rnd        756 Μάρ  15 14:08 clear
-rw-rw-r-- 1 rnd  rnd          0 Μάρ  15 18:17 diffs
-rw-rw-r-- 1 rnd  rnd          0 Μάρ  15 20:13 done
-rwxrwxr-x 1 rnd  rnd        255 Μάρ  15 14:08 getworld
-rw-rw-r-- 1 rnd  rnd       6435 Μάρ  15 15:33 jsearch.jar
-rw-rw-r-- 1 rnd  rnd   23968149 Μάρ  15 16:21 jtile.jar
-rw-rw-r-- 1 rnd  rnd       1090 Μάρ  15 18:17 log.txt
-rw-r--r-- 1 root root 199785114 Μάρ  15 20:13 next.osm //the same with next.osm as I haven't an old one
-rwxrwxr-x 1 rnd  rnd       1061 Μάρ  15 17:50 render
-rwxrwxr-x 1 rnd  rnd        805 Μάρ  15 14:08 sync
-rwxrwxr-x 1 rnd  rnd       1246 Μάρ  15 14:08 tilegen
-rwxrwxr-x 1 rnd  rnd        170 Μάρ  15 14:08 tiler
-rwxrwxr-x 1 rnd  rnd        354 Μάρ  15 14:08 upload
-rw-r--r-- 1 rnd  rnd  199785114 Μάρ  15 18:15 world.osm
rnd@Archimidis:~/src/renderer/work$ sudo chown rnd:rnd next.osm
rnd@Archimidis:~/src/renderer/work$ ./render
lost connection // after a while

from log.txt
Τρι 15 Μάρ 2016 08:14:20 μμ EET Parse world data
Τρι 15 Μάρ 2016 08:14:47 μμ EET No changes

Am I doing something wrong and I get lost connection?

What should be the output?

In "render" script there are these lines:

if [ $(echo $(date "+%H"|sed 's/^0//')) -eq 0 ]; then
          scp -q -C world.osm 195.37.132.70:~/tiles/
          echo "$(date) World uploaded" >> log.txt

Do these lines cause the problem?

In which url will the tiles be rendered? (localhost/?????/{z}/{x}/{y}.png) when the process will be completed successfully? Where are the tiles stored?

Thanks again and hope to finally manage to set up the sea renderer (think I am too close!)

Last edited by lepipasd (2016-03-15 18:44:26)

Offline

#28 2016-03-15 19:44:55

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

Re: OpenSeaMap symbols

lepipasd,

The render script takes a diff between world.osm and next.osm and works on differences only. So, I figured that I needed to put the world file in next.osm and just create an empty world.osm file (just touch world.osm will do) to get it working.

Now it renders for a while and I get some *-9.osm and *-10.osm files under tmp directory (had to manually create it, too). But after a while the render stops with "lost connection" and no other error in log.txt or console. If Malcolm doesn't help us with this, I guess I'll try debugging jsearch to see what goes wrong. I've already tried adding -Xmx to make it use more RAM, but it still stops.

Offline

#29 2016-03-15 20:30:03

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

Re: OpenSeaMap symbols

gshegosh,

the tmp directory that you created is located in work/ ?

Offline

#30 2016-03-15 21:53:43

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

Re: OpenSeaMap symbols

Yes, it is.

I've managed to do some more things.

First of all, I've imported Jsearch.java to NetBeans and I run it from there. It'd probably be the same if you just executed from work (next.osm should be your .osm and world.osm should be empty file):
1. touch done
2. touch world.osm
3. diff world.osm next.osm | grep id= | grep -v "<tag" > diffs
4. java --jar jsearch.jar ./

It generated all -9.osm, -10.osm, -11.osm and -12.osm files under work/tmp.

Next step is running tilegen from what I guessed. Just comment out lines 11-13 first:

      # while [ $(ls tmp | grep -c "\.send") -gt 30 ]; do
      #   sleep 30
      # done

(just add # as I did). Otherwise it will stop after rendering 30 or so tiles, because it waits for upload script to do its job and we're not going to run it.

Tilegen is still running here, but it IS creating PNG tiles under work/tiles and some .svg and .send files under work/tmp.

Offline

Board footer

Powered by FluxBB