Closed HamishB closed 14 years ago
I suppose as a general solution each layer's setup page could get a Reverse ways tick box to flag that they need it.
pond_poly, glacial lake poly, and cliff_edge polyline also need this.
so is it good practice to just export every *poly layer with clockwise orientation (and anti-clockwise for the holes)?
hmm. apparently not - coastline should be opposite. http://wiki.openstreetmap.org/wiki/Tag:natural%3Dcoastline
What's the common case, and lets make an exception for the weird ones?
If I had to choose, I would call 'land' the common case (CCW).
I was thinking about a general "tickbox" solution with the idea that much of the PostGIS->OSM online groupware framework you are building here might also be very useful to e.g. the recent/ongoing British's ordinance survey office data release and future merges of that data by other people, and so try to avoid introducing local hacks...
also, I think it is probably bad to force a direction on things needlessly. Layers like river_cl, boatramp_cl, and cliff_edge seem designed with direction already, it would be a shame to clobber that information with a uniformity-scrubber.
Tickbox solution is sweet - will figure something out. This all only applies to polygons (whether they're relations or circular ways).
Use polygon winding option from layer in exports. closed by 72c117467cd96560c583e5698bc73c3a63adb4e8
This all only applies to polygons (whether they're relations or circular ways).
for cliff_edge
, polylines need to be reversible somehow as well.
I`m not sure if LINZ provides a layer for it or not but line direction can also have meaning for causeways.
cheers, Hamish
Tricky to know what way things are though, would need some manual testing before setting the flag, and I doubt it would work properly for all layers...
[cliff_edge is the only linestring this affects AFAIK; maybe we should just find/write a way reversing script for that?]
I'd suggest to have the default behaviour be to leave it in its natural order (whichever way that might be), and for the tick box flag to simply reverse that. there wouldn't be a way to know which order things were in (unless you talked to linz), you'd just have to download it and test it to find out. it would be hard to account for both linz and osm's direction-conventions without manual testing+confirmation. shrug
hmmm. Looking at lake_poly for the Chathams, Lake Te Rangatapu (southern most big lake on Chatham Island) continues to be wrapped CCW ... ?? An old download of the data shows it to be in the same direction (CCW) as everything else which sorta indicates it isn't a mistake in LINZ's original data...??
The JOSM Validator plugin picks these up, it turns out there were four lakes going CCW.
Upon re-reading the natural=water wiki page, I see that it says: "It doesn't matter which way around the way goes. (JOSMs validator plugin actually (still) complains about anti-clockwise ways.)" http://wiki.openstreetmap.org/wiki/Tag:natural%3Dwater#Simple_Lake
(but the coastline does care). I suppose as a favour to those who follow it would be nice to have the data all going in a consistent way, and likely some other/older OSM parsing software may well still care. It also means that this is not a blocker & so I've gone ahead and reversed the 4 by hand in the extract-download and just now uploaded the lakes_poly layer for the Chathams to the OSM server.
ok, after my dodgy maths the ccw thing should be fixed.
There's an option in the layer screen to reverse line coordinates, so that should allow you to deal with cliff_edge :)
Hi,
For correct rendering OSM wants land/water polygons to be directional so that water is found on the right side of the way and land on the left.
see http://wiki.openstreetmap.org/wiki/Tag:natural%3Dland http://wiki.openstreetmap.org/wiki/Tag:waterway%3Driverbank http://wiki.openstreetmap.org/wiki/Tag:natural%3Dcoastline#Direction
Thus we need a way to earmark some _poly layers in order to tell osm.py to reverse the [inner &] outer polygon directions: river_poly, lagoon_poly, and lake_poly (maybe more?). For the Chatham Lagoon upload I just reversed them all by hand (70+, PITA, hope I got 'em all). The island_poly layer is "positive" so currently in the right direction.
cheers, Hamish