New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different geometry decisions (point/line/polygon) on database re-import #3611
Comments
Does it cover import issues like #3606? |
allotments=plot should imported as a polygon, so that we have the option of solving #432 "render ref numbers for allotments=plot" |
Healthcare #3639 |
In case it helps, iD's areaKeys list is published here: https://github.com/osmlab/id-area-keys The main file in there |
I just asked OWG about possible database reload on openstreetmap/chef#211. |
@kocio-pl I think this might be a bit too hasty. Wouldn't it be better to first discuss within our own repository if and when a database reload is desired, before asking externally? |
Since this is about synchronizing efforts and we're dependent on them, it's good to know both sides IMO. |
|
Cross-reference #1141 |
@bhousel Thanks! |
"Golf=*" as polygon: Possibly 'tee'? The other values should remain as lines |
The key "emergency" should probably be imported as polygons. |
For reference, here are the list of keys that the ID editor considers to be areas (polygons) when drawn as closed ways, with the exceptions. "advertising" (except "billboard") |
@jeisenbe golf:cartpath and golf:path are also lines that should be excluded. lateral_water_hazard and water_hazards are now exclusively areas and should be removed from the exceptions list. |
@chadrockey - the list is from the ID Editor, and I've posted it just for information. I agree that water hazards should be polygons. I think you can ask for this to be fixed in the ID Editor Github repository, with this link: https://github.com/openstreetmap/iD/issues/new |
@jeisenbe The changes I mentioned were already made in the iD editor and are set to be released soon. |
I've been thinking about the best way to accumulate changes we want to make for the next major release with schema changes, etc. The best route is similar to what we did before with a long-running dev branch kept up to date with the minor releases that we can merge when we feel it's done. |
According to this comment, it's possible a database reload could happen soon. Should I submit a PR that includes the new geometry decisions now? Or do we need to wait? openstreetmap/chef#211 (comment) |
I'll make a new branch to PR against after v4.21.0. I don't see any rush since we're going to need to test any changes, and part of testing is full planet imports, so we'll take longer than setting up the new server. |
part of testing is full planet imports
Why is this required? I would think that testing with an large extract
should have the same results, or is this to make sure that performance is
not too slow during the full planet import after the Lua transformations
are changed?
|
It depends on the nature of the changes, but if I were reviewing it or submitting it, I'd want to check how it works on the full dataset. There's also not that much difference between import time of a large extract like Europe or NA and the full planet. |
Re: golf; does anyone know if golf=out_of_bounds is meant to be mapped as a linestring (open way) or a polygon (closed way)? There is no wiki page. It's used <50 times, but it's mentioned on the main golf=* page - http://wiki.openstreetmap.org/wiki/Key:golf |
These are my plans so far on what keys and tags to import as polygons vs linestrings. Even if we do not end up rendering all of the features, they should be available in the database so that other map styles based off of this style can use these features. Keys to be imported as polygons:
Tags to be imported as polygon features:
Tags to be imported as linestring features:
DiscussionI reviewed the wiki pages and Taginfo for each of these keys. Craft, Club, and Healthcare are all often used to map features as an area with closed ways, and there do not appear to be any features that should be mapped as linestrings. The emergency key is a mix of access restrictions and features. I believe it would be best to only render the features that are clearly unique (ignoring duplicates like emergency=water_tank and emergency=fire_water_pond), and which are used over 100 times and documented, so I selected the list above after reviewing taginfo and the wiki pages. See http://taginfo.openstreetmap.org/keys/emer… The Golf key has a number of features that are usually mapped as areas, but golf=path, golf=cartpath and golf=hole are only used for linestrings. While it is unlikely that we will render golf=path or =cartpath, it is simplest to import all the golf features as polygons, and list these as exceptions See below for Playground. There are a few other features in the list from the ID editor (above). I don't think we need to import "area:highway" because rendering this has already been rejected (if I recall correctly?), and it's not necessary to import "industrial" or "residential" because these ought to be tagged with "landuse". I haven't reviewed these keys yet, but I think they will need separate discussions
|
The Key "playground" is a little trickier. Both JOSM and ID suggest that these should all be mapped as nodes or closed ways. I downloaded 11,035 ways (there are 11, 101 according to taginfo) and 8,642 are closed ways, 2353 are unclosed. Thus 78% are closed, 22% not. Of the unclosed ways 1,870 have exactly 2 nodes, which suggests they were intentionally mapped in this way (and not a mistake). The most common tags on unclosed ways are slide (810 features compared to 403 on closed ways), zipwire (593 vs 84), swing (223 open vs 495 closed), balancebeam (129 vs 23), structure (126 open vs 1730 closed), and climbingframe (103 vs 506 closed). So zipwires, slides and balance beams are usually tagged as open ways, but the rest are more commonly tagged on closed ways. My (limited) understanding of the lua transformations is that the unclosed ways will still be imported as linestrings, and only the closed ways will be imported as polygons. Is this correct? In this case, there should be little harm in including all values in the key as polygons, right? But we should exclude "balancebeam", "slide", and "zipwire" from the polygon transformation, as ID has done. |
I did not realize this. In that case we might want to include it, even though only 3% of the features (303 out of 11k) are mapped as an area according to taginfo. |
I'm wondering if we should have general logic for =no not matching the rules for . This would cover building=no |
That sounds good. What is the syntax for that? |
I've looked into advertising=column with more detail. The suggestion to map as an area seems to be a mistake. 98% are mapped as nodes. I checked a sample of the 222 features mapped as closed ways (another 80 or so are mapped as unclosed ways), and almost all are 1 to 2 meter diameter circles, so mapping as an area is not adding any information that could not be provided with |
It would need to go inside the loops searching through the objects tags: openstreetmap-carto/openstreetmap-carto.lua Lines 395 to 397 in 295d65d
Right now for tags that match and don't have a polygon override it's an area, a |
I also noticed that |
Any thoughts on importing attraction=, club= and emergency= as polygons when mapped as closed ways? For attraction= there are a number which are mapped as lines, so we could import just these as polygons: Club= is always an area or node, though we probably won't render it. Should it still get imported properly as a polygon? The emergency= features are all nodes and areas. There is a long list of rather rare tags, so perhaps the whole key should be imported as a polygon, even if these will not be rendered? |
It appears we can make a goal of finishing this discussion for the next release in a month. Who has a server with sufficient RAM to import the whole planet.osm.pbf with the new schema_changes, to confirm that performance is acceptable? @pnorman? |
What specifically are we looking to performance test? I don't see anything that needs it |
Perhaps I misunderstood your comment above:
(And also #3611 (comment)) My understanding was that we ought to test the full planet import prior to merging |
Declined:
Since we do not have a current plan to render these features, they will have to wait till another year. |
I tried changing the line to:
Using v4.24.0 as the basis for rendering, this still renders the hedge fill for Ideally, we would like to ignore (In practice, I think only "building=no" is very common) |
No winery huh? Bummer. |
Do you mean But I've submitted a PR to import |
Yeah, I got it confused with craft though. My bad. It makes way more sense as a craft key. |
One more thing: should Discussion on the tagging list shows that some mappers are unhappy with #3844 which removed the area rendering for In a comment, @imagico suggested the possibility of rendering See: https://github.com/imagico/osm-carto-alternative-colors/tree/hedge_polygons_as_landcover However, currently this would only render (We could also consider this for |
I'm against this. The first reason is that none of the other barrier values default to being a polygon. The second is that this adds another situation where you can't tell if something is an area or not based on tags. The third is it's against what all data consumers and editing software expects. The fourt is it doesn't reflect current usage. I sampled 32 closed ways without area tags on them, and 6% were probably intended to be areas, 84% were clearly lines, and the remainder I couldn't tell by looking at surrounding OSM data and imagery. |
In conclusion i concur with @pnorman (as indicated before - me making a branch implementing that does not mean i am in favor of it, i just want to demonstrate that this would be the way we should implement it if we decide to do so) but i disagree with reason four - you cannot just look at the features without an area tag. In terms of closed ways with a barrier=hedge tag the ones meant to be 2d representations outnumber the 1d representations probably somewhere between 3:1 and 4:1. That most of these currently have an area=yes tag is largely due to us having incentivized that in the past. But i agree on the other points and especially think we should be very careful in special casing new key/value combinations, especially if we render them both as 1d and 2d features. This makes life more complicated for all data users and mappers and the whole idea of dual use of tags for both 1d and 2d representations is bad practice we should avoid to support when not unavoidable due to extensive legacy use. |
Currently there is no database re-import planned. And apparently also no urgent need to do so. Anyway it might be useful to have a list of geometry decisions (point/line/polygon) that we might maybe change if in the future we would make a database re-import.
barrier=toll_booth
as line geometry (reference [DO NOT MERGE] Treat barrier=toll_booth as area #3249 and Render barrier=toll_booth areas #3244)The text was updated successfully, but these errors were encountered: