Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Tom Browder
On Sun, May 24, 2020 at 19:37 Paul Norman via dev 
wrote:
...

out. Mapbox GL styles are written in JSON and most of the tools
> overwrite any formatting. This means there's no way to add comments to


Have you investigated HJSON? See:

  https://hjson.github.io/

The Raku language (https://raku.org) has a module that handles it.

Blessings,

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


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Christoph Hormann
On Tuesday 26 May 2020, nd...@redhazel.co.uk wrote:
>
> Rasterization is a data generalization technique too.

No it isn't.  Generalization is the most frequently abused term in 
cartography.  Calling ST_Simplify and way_area filtering on OSM 
landcover polygon data generalization is a bit like calling JPEG 
compression noise reduction.

But we are drifting off topic here.

> Yes, in some 
> cases it leaves no artifacts at all 

Who would say that?  In fact sampling artefacts (a.k.a. aliasing) are 
the mother of all artefacts in computer graphics.

The point is that sampling artefacts are very well understood and it is 
known how to minimize them.

> I've been looking into the code and I couldn't find anything related
> to polygon generalization. Where is it done?

Lossy geometry compression is happening in ST_AsMVTGeom - which is not 
just the inevitable coordinate rounding to the vector tile coordinate 
grid but also the subjective choice of per feature Douglas-Peucker line 
compression.  See

https://github.com/postgis/postgis/pull/463

for the well argued suggestion not to do that.  The way_area filtering 
is explicit in the SQL code.

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

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


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread ndrw6

On 26/05/2020 13:26, Christoph Hormann wrote:

As Joseph has hinted when it comes to accurate rendering for precise
mapper feedback without unintentional incentives at the lower zoom
levels there are other options based on pre-rasterizing the data which
would still allow using the benefits of client side styling.  I have
demonstrated that in the past.


Rasterization is a data generalization technique too. Yes, in some cases 
it leaves no artifacts at all but that's not true in a general case and 
almost never true on mobile platforms. It is a viable solution but to 
make it work well the style should not use borders or bake in 
antialiasing (i.e. leave that to the client code).


I am concerned about something else - even with polygon generalization 
in place, the performance is not great. Zooming/panning is rather slow 
on my not so weak PC - the map would be unusable on a mobile device or 
at best it would be draining the battery quickly.


I've been looking into the code and I couldn't find anything related to 
polygon generalization. Where is it done? If it happens automatically in 
the Mapbox GL renderer that's too late - all the cost of preparing 
tiles, transmitting them, processing them in the client has already been 
incurred. Displaying data via WebGL is probably the cheapest part of the 
processing chain.


ndrw



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


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Christoph Hormann
On Tuesday 26 May 2020, Tom Hughes via dev wrote:
> More specifically what you are seeing is that it will let you zoom in
> beyond zoom 8 but you are seeing data that was simplified on the
> basis that it would be shown at zoom 8 where those artefacts would
> not be visible.

As said that is not quite true - but of course attributing artefacts, 
noise and rendering distortions that are visible to specific data 
processing steps is not easy.

As Joseph has hinted when it comes to accurate rendering for precise 
mapper feedback without unintentional incentives at the lower zoom 
levels there are other options based on pre-rasterizing the data which 
would still allow using the benefits of client side styling.  I have 
demonstrated that in the past.

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

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


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Maarten Deen

On 2020-05-26 10:59, Simon Poole wrote:

I think you are missing

"Only zoom 0 to 8 has been implemented so far. I started at zoom 0 and
am working my way down."


Oh zoom 8 is way further out than I was, my bad. The simplifications are 
not visible at that zoomlevel.


Maarten




Simon

Am 26.05.2020 um 10:42 schrieb Maarten Deen:

On 2020-05-26 10:15, Paul Norman via dev wrote:

On 2020-05-25 1:15 a.m., Maarten Deen wrote:

Still, it looks to be a very simplified subset of the complete data.
So I'd be interested to see how this works on a full dataset.


No, it has the full data except for admin boundaries and bay/straight
names on zoom 7 and 8. When you compare it to OpenStreetMap Carto
they're pretty similar. There are some labeling differences with 
sizes
of labels and when labels come in, but those don't have anything to 
do

with performance or size.


No, that's not what I'm seeing. I am seeing very basic and rectangular
landuses, obviously simplified, along with waterways, railways,
motorways, trunk, primary secondary roads and they too have been
simplified, to the extent that parallel ways on motorways are now
crossing eachother.

This is in my area:
https://pnorman.dev.openstreetmap.org/cartographic/mapbox-gl.html#12.14/51.36196/6.08322
https://imgur.com/a/WcYlVUc

Regards,
Maarten

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



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


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


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Tom Hughes via dev

More specifically what you are seeing is that it will let you zoom in
beyond zoom 8 but you are seeing data that was simplified on the basis
that it would be shown at zoom 8 where those artefacts would not be
visible.

Tom

On 26/05/2020 09:59, Simon Poole wrote:

I think you are missing

"Only zoom 0 to 8 has been implemented so far. I started at zoom 0 and
am working my way down."

Simon

Am 26.05.2020 um 10:42 schrieb Maarten Deen:

On 2020-05-26 10:15, Paul Norman via dev wrote:

On 2020-05-25 1:15 a.m., Maarten Deen wrote:

Still, it looks to be a very simplified subset of the complete data.
So I'd be interested to see how this works on a full dataset.


No, it has the full data except for admin boundaries and bay/straight
names on zoom 7 and 8. When you compare it to OpenStreetMap Carto
they're pretty similar. There are some labeling differences with sizes
of labels and when labels come in, but those don't have anything to do
with performance or size.


No, that's not what I'm seeing. I am seeing very basic and rectangular
landuses, obviously simplified, along with waterways, railways,
motorways, trunk, primary secondary roads and they too have been
simplified, to the extent that parallel ways on motorways are now
crossing eachother.

This is in my area:
https://pnorman.dev.openstreetmap.org/cartographic/mapbox-gl.html#12.14/51.36196/6.08322
https://imgur.com/a/WcYlVUc

Regards,
Maarten

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



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




--
Tom Hughes (t...@compton.nu)
http://compton.nu/

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


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Simon Poole
I think you are missing

"Only zoom 0 to 8 has been implemented so far. I started at zoom 0 and
am working my way down."

Simon

Am 26.05.2020 um 10:42 schrieb Maarten Deen:
> On 2020-05-26 10:15, Paul Norman via dev wrote:
>> On 2020-05-25 1:15 a.m., Maarten Deen wrote:
>>> Still, it looks to be a very simplified subset of the complete data.
>>> So I'd be interested to see how this works on a full dataset.
>>
>> No, it has the full data except for admin boundaries and bay/straight
>> names on zoom 7 and 8. When you compare it to OpenStreetMap Carto
>> they're pretty similar. There are some labeling differences with sizes
>> of labels and when labels come in, but those don't have anything to do
>> with performance or size.
>
> No, that's not what I'm seeing. I am seeing very basic and rectangular
> landuses, obviously simplified, along with waterways, railways,
> motorways, trunk, primary secondary roads and they too have been
> simplified, to the extent that parallel ways on motorways are now
> crossing eachother.
>
> This is in my area:
> https://pnorman.dev.openstreetmap.org/cartographic/mapbox-gl.html#12.14/51.36196/6.08322
> https://imgur.com/a/WcYlVUc
>
> Regards,
> Maarten
>
> ___
> dev mailing list
> dev@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev



signature.asc
Description: OpenPGP digital signature
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Maarten Deen

On 2020-05-26 10:15, Paul Norman via dev wrote:

On 2020-05-25 1:15 a.m., Maarten Deen wrote:
Still, it looks to be a very simplified subset of the complete data. 
So I'd be interested to see how this works on a full dataset.


No, it has the full data except for admin boundaries and bay/straight
names on zoom 7 and 8. When you compare it to OpenStreetMap Carto
they're pretty similar. There are some labeling differences with sizes
of labels and when labels come in, but those don't have anything to do
with performance or size.


No, that's not what I'm seeing. I am seeing very basic and rectangular 
landuses, obviously simplified, along with waterways, railways, 
motorways, trunk, primary secondary roads and they too have been 
simplified, to the extent that parallel ways on motorways are now 
crossing eachother.


This is in my area: 
https://pnorman.dev.openstreetmap.org/cartographic/mapbox-gl.html#12.14/51.36196/6.08322

https://imgur.com/a/WcYlVUc

Regards,
Maarten

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


Re: [OSM-dev] OpenStreetMap Cartographic: A client-side rendered OpenStreetMap Carto

2020-05-26 Thread Paul Norman via dev

On 2020-05-25 1:15 a.m., Maarten Deen wrote:
Still, it looks to be a very simplified subset of the complete data. 
So I'd be interested to see how this works on a full dataset.


No, it has the full data except for admin boundaries and bay/straight 
names on zoom 7 and 8. When you compare it to OpenStreetMap Carto 
they're pretty similar. There are some labeling differences with sizes 
of labels and when labels come in, but those don't have anything to do 
with performance or size.



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