-
Notifications
You must be signed in to change notification settings - Fork 822
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
Render place names on areas the same way as on nodes #103
Comments
It looks like everything is in the database to do this, just needs SQL queries. I'll have a go at it, time permitting |
This seems to work now? See http://www.openstreetmap.org/way/47227971 in issue #425. |
@Grillmannen Think that example might work because of the landuse=residential I think I have a solution for this, if bedtime goes well this evening then I should get the pull request in tonight... |
Previously name= wouldn't render on place= even if it was also tagged as landuse= though. |
Fixing this raises a slight issue: There's a lot of duplication out there between place nodes and place areas. I got a 4k duplicates on a preliminary search (identical name, place and with 0.1 degrees) |
I guess that's because people are tagging for the renderer now, or at least not noticing that it is already tagged as it doesn't show up on the tiles. 4k doesn't sound like a lot and will be fixed quite fast if duplicates show up on the map. |
Removing the nodes leads to loss of information (the center of the place) though. |
The entire area is the place if it's been tagged on the area. The issue is that some admin boundaries have been tagged with place when the administrative entity is not the same as the place, which tends to be smaller. |
2014-05-15 12:05 GMT+02:00 Paul Norman [email protected]:
these are hard to spot currently, but if we started to render place areas |
This is country-specific. For example, if I'm not mistaken, in Poland, the countryside is seen as part of a place as well. If you see a begin-of-place X sign driving in one direction, you usually see a begin-of-place Y sign in the other direction. |
2014-05-15 13:33 GMT+02:00 math1985 [email protected]:
I dispute that this is something country-specific. If the definition for I'd see places as part of settlement geography, have a look here: |
2014-05-15 18:33 GMT+02:00 math1985 [email protected]:
this is of course up to the local mapper to decide. My personal opinion on You can find similar situations in all places with few regulation or few cheers, |
This is part of gravitystorm#103, but only fixes it for place=city/town The SQL is moderately complex and difficult to document in the .mml file so it's worth documenting here ```sql (SELECT way,place,name,capital,population FROM (SELECT way,place,name,NULL AS capital,way_area, -- The polygon table doesn't have the capital information with the default style CASE WHEN population~E'^\\d{1,9}$' THEN population::integer ELSE NULL END AS population -- We need to filter out population values that might cause exceptions. This is a fairly rigerous filtering as it will remove population=1,000 FROM planet_osm_polygon UNION ALL -- Join the two together SELECT way,place,name,capital,NULL AS way_area, -- Points don't have an area CASE WHEN population~E'^\\d{1,9}$' AND length(population)<10 THEN population::integer ELSE NULL END AS population -- as above FROM planet_osm_point) AS p WHERE place IN ('city','town') -- This condition is brought inside by the query optimizer ORDER BY CASE place WHEN 'city' THEN 0 ELSE 10 END, -- We don't actually need this at moment with the current MSS CASE capital WHEN 'yes' THEN 0 ELSE 10 END, -- Nor this way_area DESC NULLS LAST, -- Put physically larger first population DESC NULLS LAST -- For points (no area) put larger population first ) AS placenames_medium ``` The ordering merits further discussion We're currently not considering area or population for ordering, so anything is an improvement here. It's hard to say if area,population or population,area is better without trying one first.
I believe the only way this could be done, compatible with both node-tagging, area-tagging and mixed-tagging, is like this: If anyone wants names on polygons rendered please get this PR un-closed by maintainers and merged. |
I just want to add a couple of points continuing the thread on #2816. @imagico still fails to understand that there are places which have defined borders and yet are not administrative units or landuses or other existing types, but just... places. I can bring my example once again: the suburbs in Turin (a 1-million-people city) were administrative units until 1985, but they were then grouped into bigger boroughs (that of course we mapped as administrative units). We cannot map the suburbs as administrative units, as they are not that any more. However, the suburbs still have well known borders from that time, and are still in use, much more than the boroughs, as place names. They are still used as the basis for civic committees, working groups and so on, so knowing exactly whether a street is in this or that suburb is useful and makes a difference. How in the hell could I map these places precisely as a node? Again, I'm fine if I am required to add a node as admin_centre as a tagging fiction, even if there is no "admin" and no "centre" in the suburb, but please stop saying that all people that want to map a place as an area are just wrong and their areas are fake and "meaningless". Maybe this is true in your surroundings, but it is not true everywhere. Also, how reasonable it is to continuously challenge the fact that there is "inconsistency" in places-as-areas because some people draw areas around built-up land while others around the entire territory or around some other geometry, while at the same time there is the same inconsistency in places-as-nodes, with some people putting the node at the centroid of the area while others put it in the main square and others on the town hall and so on, but this is not considered a problem? I really don't understand. |
@vbertola there are fundamentally three ways to map a region:
There is a narrative "area+point is a duplicate" (it is not, as point brings socioeconomic info that just plain OGC Simple Features Polygon can't store, you have to implement a complex datatype with a point and an area to maintain the eyecandy if you somewhen finally decide to show place= as a fill like many maps do). There is a narrative "we can't implement logic that will skip rendering label for area if it is rendered for point" (it is false, you can and it's implemented in #2939) There is a narrative "some other users will have to implement similar logic". (it is false, if they don't care they can skip implementing it, and if they care they may do that if they wish and have a solid example how to do so.) Right now OSM-Carto supports 2 and 3, as it only supports point mapping. You can map the neighbourhoods as point+area, and it will render a label and database will keep an area for other uses. If you wish to add support for 1, it is in #2939. |
Am Di., 8. Jan. 2019 um 10:12 Uhr schrieb Vittorio Bertola <
[email protected]>:
I just want to add a couple of points continuing the thread on #2816
<#2816>.
@imagico <https://github.com/imagico> still fails to understand that
there are places which have defined borders and yet are not administrative
units or landuses or other existing types, but just... places. I can bring
my example once again: the suburbs in Turin (a 1-million-people city) were
administrative units until 1985, but they were then grouped into bigger
boroughs (that of course we mapped as administrative units).
in Rome there are also different layers of named areas, which only
sometimes coincide with administrative subdivisions.
And you can often define neighbourhoods outside the centre core by looking
at the structure: areas developped in the same time, often as one project
(same lead architect/s, same style, etc.). Also in centres you might be
able to identify specific quarters or neighbourhoods with specific
properties, e.g. from medieval professions like tanners or dyers, jewish
ghettoes, etc., or more recently settlement parts for factory workers,
entertainment districts, ...
|
These arbitrary or unverifiable areas that may be inappropriately tagged as "place" don't really stand a comparison with non-administrative neighbourhoods that have designated or otherwise well-defined borders. Several other types of places that are valid use cases of place as an area have been mentioned previously here and in comments to related pull requests. Yesterday, I tried to provide a brief overview here. Some people seem to think that if there are no places (non-administrative, not landuse equivalent) with well-defined borders in region where they live then there are no such places in rest of the world either. Once we get over this misconception, then we'll probably be much closer to solution. |
Since both PR #2816 (render labels on settlement |
As a mapper and a data user, I have to say that I'm seriously disappointed that this is getting nowhere .. |
I too am disappointed this was closed with no guidance. My organization has local teams working in villages in Mali, and over the years we have added vilage names as we collect them in the field. It is quite important to us to be able to litterally put these villages on the map by naming them and a great complement to the incredible work done by the mapping community using satelitte imagery. So our contribution is very limited but important I think. What kind of guidance is given to people like us? Now we have a situation were some more experienced mappers are merging node information with areas. The rendering is completely different. But we are certainly in no position to give these more experienced mappers any lesson or guidance. Look at that area south of Bamako for instance. What are we supposed to do with that? Are we supposed to manually undo the work of more experienced mappers and re-add duplicate points to areas that don't have them? That doesn't make any sense since there is no guidance telling mappers NOT to put names into areas. |
I used to recommend to switch to another renderer ("Layers" on the right-hand side of the osm.org website), since they used to render area place names, but now it seems they also don't. Does anyone know if their behaviour was changed to be consistent with osm-carto, or am I missing something, or possibly going crazy? |
The OpenCycleMap and Transport map styles are proprietary, but I do not think they have changed recently. You could contact https://www.thunderforest.com/contact/ to confirm. _(EDIT: they were changed a few years ago: #103 (comment)) _ The HDM / HOT style ("Humanitarian") is at https://github.com/hotosm/HDM-CartoCSS and there have been no changes in the rendering of place names. |
Re: " re-add duplicate points to areas that don't have them" A place node is not a duplicate of an administrative area. For example, consider https://www.openstreetmap.org/node/6474240715 and https://www.openstreetmap.org/relation/112100 - the first is the node which represents the approximate center of the place called "Long Beach" in California, which is located in the southwest corner of the land are of the municipality which is represented by the relation. When you want to route to "Long Beach" from Los Angeles, you don't want to end up in the centroid of that municipality polygon: that will be about 5 kilometers northeast of Downtown Long Beach. Both the administrative boundary and the place node are valid representations of different things: one is the legal municipal borders (which exclude the suburb of Signal Hill, for example), while the other is the location of the "centre" of the place. Almost any town built near a large body of water will have this problem if there is no node to represent the centre. While the problem is less obvious with small features such as villages, it is still advisable to map these with a node at their commercial or cultural centre. Not only does this make it possible to render the name properly and to provide routing to the correct location, it also represents the named place correctly in the database. |
Or consider the municipality of New York. Since this is now mapped as an Clearly the node is needed to represent the actual center of the city, which is not located in Cypress Hills Cemeter in suburban Queens, but in downtown Manahattan. (This is one of the cases where rendering the name of the admin_level=5 feature is not very helpful, but New York City is the only municipality in the USA which is mapped in this way) |
@jeisenbe Thank you what you are saying makes a lot of sense. The examples are really good and I would encourage you to add them to the wiki where place names are discussed. Right now, for Mali, I am getting some help from a more experiece mapper that is reintroducing nodes to the villages so that the rendering will be back to normal. Right now we have the place=village tag on both aera and node. I am wondering if that's OK or if we should only have it on nodes; for the area, the boudary is not administrative (no such thing for villages there), so not sure whether we should use type=boundary or not. I will look in the wiki a bit more and also look for more examples. |
The Transport and OpenCycleMap layers both used to render place names from place polygons, but this was dropped a few years ago. The main difficulties were the surprisingly large number of places where the name on the node didn't match the name on the polygon (generally different variations e.g. Saint vs St, but often where place labels were added to admin boundaries which had a different name to the town) but also the much larger number of places where the place categorization didn't match (e.g. place=village on the node, place=city on the polygon). This led to many terrible results, particularly in the USA, where tiny villages were having their names rendered in big fonts on my maps, without any other maps showing that problem. Unfortunately there's only so long that I could swim against the tide on this topic, so I eventually dropped the polygon place labels and now just use place nodes. |
In my locality, we have named subdivisions with legally defined boundaries (decided at the time of annexation). The land uses in these subdivisions is often mixed so a single |
I came across the same problem and the solution I used was already mentioned in the beginning. Place a way with Take a look at the following examples
Conclusion, there are already perfect solution available to get around this. |
In many mexican cities neighbourhoods (colonias and fraccionamientos) have clear limits inside the city, but now we have to define them as nodes instead of areas. It would be better if place names of areas are rendered. |
Render places mapped as areas. As explained above, there are many cases where the areas are well-defined. Leave it to mappers to determine what those places are. |
Currently place names are only "correctly" rendered when mapped on nodes. Place names should be rendered in the same way when placed on closed ways and relations.
The text was updated successfully, but these errors were encountered: