Re: [OSM-dev] OSM-Carto style, ported to vector tiles!

2016-07-25 Thread Daniel Koć

W dniu 25.07.2016 16:50, Daniel Koć napisał(a):


So, I don't understand npm issues, but can work around them, but still
there are some other problems, including fonts issues, which I don't
understand. Maybe it has something to do with Ubuntu version (mine is
16.04 64-bit)?


Report after some more research:

I have removed fonts which caused the error messages and my style.mss 
file looks like this now:


***

Map {
  background-color: @water-color;
}

@book-fonts:"DejaVu Sans Book", "Padauk Regular", "Khmer OS Metal 
Chrieng Regular",

"TSCu_Paranar Regular", "Tibetan Machine Uni Regular";
@bold-fonts:"DejaVu Sans Bold", "Padauk Bold", "TSCu_Paranar Bold",
"DejaVu Sans Book", "Padauk Regular", "Khmer OS Metal 
Chrieng Regular",

"TSCu_Paranar Regular", "Tibetan Machine Uni Regular";

@oblique-fonts: "DejaVu Sans Oblique", "TSCu_Paranar Italic",
"DejaVu Sans Book", "Padauk Regular", "Khmer OS Metal 
Chrieng Regular",

"TSCu_Paranar Regular", "Tibetan Machine Uni Regular";

@water-color: #b5d0d0;
@land-color: #f2efe9;

***

Now when I visit http://localhost:8080/tiles/ it works - for example URL 
and console messages look like this:


http://localhost:8080/tiles/#5/50.008/18.875

GET /tiles/5/15/11.png 304 6.375 ms - -
GET /tiles/5/20/11.png 304 6.987 ms - -
GET /tiles/5/21/9.png 200 202.547 ms - 857
GET /tiles/5/15/8.png 304 3.789 ms - -
GET /tiles/5/20/8.png 304 5.073 ms - -
GET /tiles/5/15/12.png 304 4.106 ms - -
GET /tiles/5/20/12.png 304 1.947 ms - -
GET /tiles/5/14/8.png 304 1.745 ms - -
GET /tiles/5/14/12.png 304 3.728 ms - -
GET /pbfs/live/5/21/8.pbf 200 195.421 ms - 73
GET /tiles/5/21/8.png 200 205.010 ms - 857
GET /pbfs/live/5/21/10.pbf 200 247.592 ms - 73
GET /tiles/5/21/10.png 200 257.135 ms - 857
GET /pbfs/live/5/21/11.pbf 200 232.449 ms - 73
GET /tiles/5/21/11.png 200 239.943 ms - 857
GET /pbfs/live/5/21/12.pbf 200 292.635 ms - 73
GET /tiles/5/21/12.png 200 301.565 ms - 857

It takes some time before the result is visible, but then it works quite 
fast (comparable to viewing standard map on-line) and is quite accurate 
(only some small circles look distorted).


***

However when visiting http://localhost:8080/pbfs/live/ the URL changes 
to http://localhost:8080/pbfs/live/#4/0/0 and I still get no tiles, 
console messages look like this:


GET /pngs/live/_/5/19/16.pbf 404 0.212 ms - 36

and file http://localhost:8080/pbfs/live/index.json also has real JSON 
with the option:


"tiles":["http://localhost:8080/pbfs/live/{z}/{x}/{y}.pbf";]

--
"Low, low, low..." [M. Kempa]

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] OSM-Carto style, ported to vector tiles!

2016-07-25 Thread Daniel Koć

W dniu 25.07.2016 11:24, Rory McCann napisał(a):


I presume that is the "maxzoom is deprecated" messages? You can ignore
them. Or is it something else?


Nope, only minzoom/maxzoom warnings.

What happens if you go to http://localhost:8080/tiles/index.json what 
is

the value of the "tiles" in that json file? It should be:

"tiles":["http://localhost:8080/tiles/{z}/{x}/{y}.png";]


Both PNG and JSON files you asked me contain only this:

Error: Failed to find font face 'Mallige NormalItalic' in FontSet 
'fontset-0' in FontSet

   at Error (native)

But PBF file has 24935 bytes and contains strings "world", "FID", 
"admin-low-zoom" and "admin_level".


***

After the fresh installation:

I had to remove explicit "mapnik" string from npm install, since it also 
left me with empty node_modules directory and this error:


mapnik@3.5.13 preinstall 
/media/hdd/home/kocio/devel/openstreetmap-carto-vector-tiles/node_modules/.staging/mapnik-ac377f4c

npm install node-pre-gyp


npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-pre-gyp"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2

npm ERR! Cannot read property 'target' of null

After removing it ("mapnik" implied probably by some dependency), when I 
did "make tessera" I got this message instead of suggested PNG and JSON:


Error: Failed to find font face 'Arundina Sans Italic' in FontSet 
'fontset-0' in FontSet

   at Error (native)

However file:

http://localhost:8080/pbfs/live/index.json

Contains real JSON data with:

"tiles":["http://localhost:8080/pbfs/live/{z}/{x}/{y}.pbf";]

visiting http://localhost:8080/pbfs/live results in such messages on 
console:


GET /pngs/live/_/4/7/7...@2x.pbf 404 0.403 ms - 37

***

So, I don't understand npm issues, but can work around them, but still 
there are some other problems, including fonts issues, which I don't 
understand. Maybe it has something to do with Ubuntu version (mine is 
16.04 64-bit)?


--
"Low, low, low..." [M. Kempa]

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] OSM-Carto style, ported to vector tiles!

2016-07-25 Thread Christoph Hormann
On Monday 25 July 2016, Rory McCann wrote:
>
> > That however would also mean you would need to remove all the
> >
> > way_area > 0.01*!pixel_width!::real*!pixel_height!::real
> >
> > filters from SQL for z14 - otherwise you get missing geometries at
> > the higher zooms (not a real lot - that limit is about one Mercator
> > square meter at z14 - but when this occurs it would be visible and
> > possibly surprising).
>
> Oops. I will fix that. Do you know of an example of where this
> filtering applies in the normal OSM tileserver? It's helpful to have
> something to compare to?

That filter is primarily for the lower zooms for performance reasons, in 
particular z6-z9.  You should be able to simply remove it for z14 
without negative effects.

> Yes, you can't use SQL to filter different things after z14. You have
> to use CartoCSS filters. A z14 tile needs to have all the data a z19
> tile needs to render.

The problem is not really filtering - this would be simple using 
additional attributes generated from SQL.  The real difficulty is 
geometry processing.

-- 
Christoph Hormann
http://www.imagico.de/

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] OSM-Carto style, ported to vector tiles!

2016-07-25 Thread Rory McCann
On 24/07/16 18:26, Christoph Hormann wrote:
> Ok - so you essentially say that use of !pixel_width! and !pixel_height! 
> is - in the vector tiles system used - limited to the lower zoom 
> levels.

Yes, you can't use *pixel* for z15+. You can hack around it, like I
do[1], with "zoom dependent way_pixel filters". Just divide by 4 each
zoom level.

> That however would also mean you would need to remove all the 
> 
> way_area > 0.01*!pixel_width!::real*!pixel_height!::real
> 
> filters from SQL for z14 - otherwise you get missing geometries at the 
> higher zooms (not a real lot - that limit is about one Mercator square 
> meter at z14 - but when this occurs it would be visible and possibly 
> surprising).

Oops. I will fix that. Do you know of an example of where this filtering
applies in the normal OSM tileserver? It's helpful to have something to
compare to?

> And if i understand you correctly this also means you cannot render any 
> features differently on z14 and any higher zoom level based on 
> processing done in SQL - unless you duplicate them into different 
> separate layers for different zoom levels.

Yes, you can't use SQL to filter different things after z14. You have to
use CartoCSS filters. A z14 tile needs to have all the data a z19 tile
needs to render.

You don't have to use z14. You can use another level, or have all vector
tiles generated live (with no "overzooming"). Not sure why you'd want to
do that.

Rory

[1]
https://github.com/geofabrik/openstreetmap-carto-vector-tiles/blob/21590cc3e693a242f9c85392cf1635317d45b8c0/roads.mss#L2573


___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev