[Talk-GB] Multipolygon relation rendering issues - Peebleshire, Glentress Forest. Any ideas please?

Andy Townsend ajt1047 at gmail.com
Thu Nov 25 23:31:29 UTC 2021


On 25/11/2021 18:14, James Derrick wrote:
> Hi,
>
> On 25/11/2021 17:35, James Derrick wrote:
>> After some edits, Glentress Forest relation 7911616 now has all 
>> members with contiguous role=outer areas (JOSM relation editor 
>> appears clean to me), however the stands of trees only render if the 
>> parent landuse=forest tag is (wrongly) duplicated on the child areas 
>> (e.g. SW areas).

It's a valid polygon:

gis=> SELECT count(*) FROM planet_osm_polygon WHERE (osm_id = -7911616);
  count
-------
     95
(1 row)

(that's from the database behind https://map.atownsend.org.uk *, which 
should be up to date to within 5 minutes)

>
>
> I say some as some _don't_:
>
> https://www.openstreetmap.org/way/106623843/history - 50:50 blank 
> (zoom out to level 12/13 to see the disappearing areas)
> https://www.openstreetmap.org/relation/7911616       - parent relation 
> which used to show only duplicate tagged areas in green.
>
You can't rely on the default style to give you an up-to-date picture at 
lower zoom levels.  It looks fine at 
https://map.atownsend.org.uk/maps/map/map.html#zoom=15&lat=55.67026&lon=-3.17001 
- that way is part of the valid multipolygon 7911616, so I'm sure the 
rendering on the main site will catch up.

The way that multipolygon handling works on servers that use osm2pgsql 
is generally that all constituents of a multipolygon are processed, and 
the thing as a whole either is valid or it isn't. If it isn't, none of 
the constituents are shown. 
https://www.openstreetmap.org/user/SomeoneElse/diary/395232 explains how 
you can use that to find errors.

The caching infrastructure on the "standard" layer at osm.org now means 
that it's not as straightforward as it used to be to "just dirty a tile 
and wait for it to appear" (a small downside compared to the upside of 
being able to serve many more tiles to many more people).  If I want to 
see the effect of something that I've just changed I tend to use 
map.atownsend.org.uk instead and zoom in enough so that tiles are 
definitely not coming from cache.  The relevant code links if you want 
to borrow for another site are 
https://github.com/SomeoneElseOSM/mod_tile/blob/zoom/rerender_low.sh , 
which runs daily and rerenders low zoom tiles every 4 days, and 
https://github.com/SomeoneElseOSM/mod_tile/blob/zoom/openstreetmap-tiles-update-expire#L50 
which explains how "dirty" tiles are handled**.

Best Regards,

Andy

* disclaimer - my site.

** and for completeness, see 
https://help.openstreetmap.org/questions/78817/keep-in-sync-local-database-with-osm-latest-changes-to-region/78822 
for how one of the authors of osm2pgsql would suggest that you did this 
instead.





More information about the Talk-GB mailing list