gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.54k stars 823 forks source link

Mapnik 3.0.0-rc2 checking #1579

Closed pnorman closed 9 years ago

pnorman commented 9 years ago

With Mapnik 3.0.0 approaching release, we should check for compatbility issues. (https://github.com/mapnik/mapnik/issues/2811#issuecomment-104863887)

My method for testing was to

diff --git a/package.json b/package.json
index 4a4ac50..5784b6c 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
     "leaflet": "^0.7.3",
     "leaflet-formbuilder": "0.0.6",
     "leaflet-hash": "^0.2.1",
-    "mapnik": "^1.4.16",
+    "mapnik": "https://github.com/mapnik/node-mapnik/tarball/7b33be0",
     "nomnom": "^1.8.1",
     "npm": "^2.3.0",
     "request": "^2.51.0",
pnorman commented 9 years ago

image image

Admin labels on boundaries are on the wrong side. Could be another example of mapnik/mapnik#2851

pnorman commented 9 years ago

missing tourism=viewpoint

3.0.0-rc2 image 2.2.0 image

pnorman commented 9 years ago

Text is farther away from lines.

3.0.0-rc2 image 2.2.0 image

gravitystorm commented 9 years ago

The spacing between each character in the labels is also different, but I'm not sure whether this is a good or a bad thing :-) I've noticed it in other maps, but you can see it particularly between the u and i in "Squirrel" on the leftmost vertical (i.e. straight) label above.

matthijsmelissen commented 9 years ago

I tried installing Mapnik 3, and I have some questions about the process.

install at $HOME/mapnik

How do I choose an install location?

I get the message 'harfbuzz-min-version (HarfBuzz >= 0.9.34 (required for font-feature-settings support))' on install, how can I install this? My system can't find a libharfbuzz package.

How long is the build suppose to last? I'm running it for nearly two hours now, is this normal?

Zverik commented 9 years ago

As for character spacing, see kerning example in Nik4 doc: it seems they fixed character placement, and this is a good thing.

pnorman commented 9 years ago

install at $HOME/mapnik How do I choose an install location?

./configure PREFIX=$HOME/mapnik

I get the message 'harfbuzz-min-version (HarfBuzz >= 0.9.34 (required for font-feature-settings support))' on install, how can I install this? My system can't find a libharfbuzz package.

It depends on OS. If you're on Ubuntu you could add the Mapnik PPA with sudo add-apt-repository ppa:mapnik/nightly-trunk and then install harfbuzz from there.

As it happens, the version of Mapnik from the PPA is https://github.com/mapnik/mapnik/tree/a08d4dc, which is recent enough to test with. But it will conflict with other versions of Mapnik you have installed.

How long is the build suppose to last? I'm running it for nearly two hours now, is this normal?

Specify the number of parallel files to build with JOBS=4 make. make will still do some parts of the compile single-threaded because those parts take lots of RAM. If you have a particularly powerful machine python scons/scons.py -j8 --config=cache --implicit-cache --max-drift=1 will build in parallel all the way, but use a lot of RAM.

As for time, it varies. My machine can do a mapnik compile in under 4 minutes, but an hour isn't unheard of for a slower machine. Make sure you're specifying the number of jobs.

daganzdaanda commented 9 years ago

I like the wider letter spacing and better kerning. @pnorman, can you test if https://github.com/mapnik/mapnik/issues/2705 is fixed now?

pnorman commented 9 years ago

@pnorman, can you test if mapnik/mapnik#2705 is fixed now?

Not easily. Is it a problem observable with the standard fonts?

daganzdaanda commented 9 years ago

Is it a problem observable with the standard fonts?

It's visible in carto-style (see #1313), I don't know if the fonts we use for Arabic and Hebrew are the standard for Mapnik.

pnorman commented 9 years ago

Found a new blocker - POIs aren't getting labeled. Could be text-dy related.

pnorman commented 9 years ago

Text is farther away from lines (mapnik/mapnik#2913)

The solution to this is to set vertical-alignment:middle on anything with text offset from a line, and adjust dy as needed.

pnorman commented 9 years ago

Just to note, my FreeBSD install steps are

cd ~/osm/mapnik/src
# do something with git generally
rm -rf $HOME/mapnik
mkdir -p $HOME/mapnik
./configure HB_INCLUDES=/usr/local/include HB_LIBS=/usr/local/lib PREFIX=$HOME/mapnik
python scons/scons.py -j8 --config=cache --implicit-cache --max-drift=1 # I have lots of RAM
gmake install

cd ~/osm/mapnik/kosmtik
export PATH=$HOME/mapnik/bin:$PATH
npm install mapnik --build-from-source
npm install
LD_LIBRARY_PATH=`mapnik-config --prefix`/lib node index.js serve --host 0.0.0.0 --port 6788 ~/osm/openstreetmap-carto/repo/project.yaml
pnorman commented 9 years ago

clipping changes mean that admin lines are now only being labeled once. mapnik/mapnik#2937 is causing issues with adding text-spacing which would be the normal solution

pnorman commented 9 years ago

My testing revealed two blocker severity bugs in Mapnik, both with the "offset_converter". They show up with a combination of text-placement: line, text-dy != 0, and text-spacing > 0 (mapnik/mapnik#2937) and line-offset and line-clip (mapnik/mapnik#2942)

matthijsmelissen commented 9 years ago

Did you close this issue deliberately? I think it was quite useful.

pnorman commented 9 years ago

I believe all issues are fixed on either the style side or the mapnik side

pnorman commented 9 years ago

Also, the cartographer notes cover some of the same ground.

matthijsmelissen commented 9 years ago

That's great, thanks!

mboeringa commented 9 years ago

I believe all issues are fixed on either the style side or the mapnik side

Leaving a small comment with the reason why you closed it when you hit the "Close" button will help avoiding confusion.

matkoniecz commented 8 years ago

Also, the cartographer notes cover some of the same ground.

It seems to be gone (https://github.com/mapnik/mapnik/issues/2875#issuecomment-228178237) but it is archived at https://web.archive.org/web/20160527235459/http://mapnik.org/news/3.0-cartographer

EDIT: The working link is http://mapnik.org/news/3.0-cartographer (thanks to @springmeyer at https://github.com/mapnik/mapnik/issues/2875#issuecomment-228184430)