-
Notifications
You must be signed in to change notification settings - Fork 819
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
Add realistic Sports Field Marking for pitches #1126
Comments
related to #844 |
@pnorman The French rendering uses the following query: (select *, abs(a12-a23) as angle_diff, (a12+a23+90)/2 as angle
from
(select
*, st_npoints(way2) as nb,
ST_Distance(st_pointn(way2,1),st_pointn(way2,2)) as d12,
ST_Distance(st_pointn(way2,3),st_pointn(way2,2)) as d23,
ST_Distance(st_pointn(way2,1),st_pointn(way2,3)) as d13,
degrees(st_azimuth(st_pointn(way2,1),st_pointn(way2,2))) as a12,
degrees(st_azimuth(st_pointn(way2,2),st_pointn(way2,3))) as a23
from
(select *, st_area(way) as way_area, ST_ExteriorRing(ST_SimplifyPreserveTopology(way,100)) as way2
from
(select (st_dump(way)).geom as way, sport, surface, access
from planet_osm_polygon
where sport in ('tennis','soccer','basketball','rugby','rugby_union','rugby_league','american_football')
AND way && !bbox!) as dump) as simplified) as simplified2) as sports Could we use this query too in osm-carto? |
I reformatted the SQL to not be a single line mess. Where is the styling for this? I wonder if they're using mapnik 3 features. |
transform is a Mapnik 3.0 feature -> postponing this to 3.0 milestone. |
Does the french carto pitches really need mapnik 3? Because they have had it for ages since probably around the start of osm-carto. I first noticed it March 2013. Was mapnik 3 alpha or whatever around then and they used that? |
@cquest Do you know whether it would be possible to use the sport pitches icons without using Mapnik 3? |
As far as I know, we have mapnik 2.2 on our server. |
According to the documentation, point-transform is a 3.0 feature. Is the documentation wrong? |
I'm really not familiar with mapnik source code (first time I'm digging it), but 2.2.x source seems to contains point-transform support (not familiar either with C++): https://github.com/mapnik/mapnik/blob/2.2.x/src/grid/process_point_symbolizer.cpp#L72 |
I think the documentation is wrong for it. I thought it was odd that your code Christian used mapnik 3. I don't think it even existed 2 years ago. |
I think we always believed we couldn't rotate images (spring icons for example) because Mapnik wouldn't support it. Maybe we've been wrong all along? @gravitystorm @pnorman? |
I have never seen it mentioned here that we cannot support it, but maybe I missed it. older revisions (2 Dec 2011) of the mapnik documentation imply it is possible. |
Rotating symbols based on expressions requires expressions anywhere, which was added with the expr-v2 branch (mapnik/mapnik#2224 for a starting point). When we speaking of Mapnik 3 features, we mean features that are not in any released versions of Mapnik but are expected to be in Mapnik 3.0 when it is released. These are found in the master branch of the Mapnik git, as well as sometimes in development branches. The last released version of Mapnik, 2.2.0, was released in June 2013. This is about the same time as the stylesheet was created. Most features merged since then are Mapnik 3 features, although some are in the Mapnik 2.3.x development branch. Some code written before June 2013 is not in Mapnik 2.2.0, but this is fairly minor. |
ummh not sure if I understand. |
Is |
One thing to note for this issue is some fields support multiple sports. Those can be tagged with either sport=multi or sport=sport1;sport2 |
This issue should be renamed, so it is clear no icons but markings are meant. |
Done |
Actually, I do not like this proposal. This would also work for multiple sports, just use another icon for this case. This is very simple, but I think it would go easier on the eyes and be much more easy to recognize. While those markings may look nice and pretty on the map, the map should stay abstract IMO; I also doubt those markings always accurately represent the actual lines. The user will be misled into believing that those lines are an accurate representation, rather than just automatically-generated markings. |
On the other hand they would be easily visible and no more symbolic than the icons. When multiple sports are on the same pitch, the icon may be hard to draft (you can check how serious is this problem with shop=sports - I've made many sketches, yet none is clear enough to beat others). I like the idea of French pitches, however I see the problem with consistency: some sports have easily recognizable line shapes, but probably not all of them. I'm not sure we should care for it, but better to know the downsides (thanks, @Wuzzy2!). |
Just to note the problem here: osmfr bugreport is http://trac.openstreetmap.fr/ticket/589 |
I'm leaning to preferring icons. I should note that the problem with osmfr is easily solvable by taking the length of a geography, not geometry. |
2015-06-26 10:27 GMT+02:00 Paul Norman [email protected]:
I'm leaning towards field markings (subtle, less prominent than in the FR |
I like both options, and I'm not sure which is better. Maybe we do icons at lower zooms, then when we get close enough, it turns to markings? I'm not sure what zoom would be "close enough" |
Got to be markings over icons where available for me. if the area is mapped correctly the lines get represented really well. |
Quite frequently people explicitly map pitch markings with barrier=line which indicates mappers want to have these shown. As @HolgerJeromin mentioned the French style rendering of these only works correctly in a limited range of map scale, i.e. latitude. The German style has a more generic but also more complex variant: https://github.com/woodpeck/openstreetmap-carto-german/blob/master/project.yaml#L461 None of these is ideal IMO, much better would be if PostGIS/mapnik would make available the scale factor for use. |
This should perhaps also be solved in Mapnik? See also #1853 and the reason for closing that issue. |
As the Mapnik upgrade time is very close, we can get back to a discussion. I still prefer having it and not the icon, what about others? Is anybody willing to create a suitable PR, BTW? |
On Tue, Sep 6, 2016 at 10:00 AM, kocio-pl [email protected] wrote:
This gets tricky for pitches of irregular shapes like baseball, cricket, |
We could do it just for some well-known cases, not all the pitches (just like it is in French style probably). |
Updated link to the implementation in the German style: https://github.com/giggls/openstreetmap-carto-de/blob/master/project.mml#L617 This still severely lacks documentation of course - especially with regard to the various magic constants in the mss. In principle i would be in favor of this approach since it is a much more elegant way to indicate the type of sport than icons but given the significant complexity of the method used it would be fairly strange to accept this but reject #1853 on grounds of code complexity. |
Rendering pitch lines, in particular in cases where they do not exist in reality, suggests a quality of a pitch that is not true. |
sent from a phone
On 26. Jul 2018, at 12:03, polarbearing ***@***.***> wrote:
Rendering pitch lines, in particular in cases where they do not exist in reality, suggests a quality of a pitch that is not true.
+1, it would be desirable to render them only when they are there. Maybe we should propose a tag for this, like pitch_markings=yes/no/etc.?
|
I like this idea. |
Right now there have been comments about the number of icons becoming too high, and a PR to add sports icons was just closed: #3651. This issue suggests a way of rendering pitches in a more subtle way that will still show what sport is played at high zoom levels. Should we consider moving forward with this rendering in a way similar to the German style, or should it really be limited to pitches that have markings? I think of this as a way to show the use of the pitch, not a way to render the way it looks from an aerial image, therefore it should not matter if a soccer pitch is just a dirt field (Similarly, all pitches are blue-green, even if their surface is concrete or clay, because it's an abstraction). |
Rendering fictive pitch markings is kind of a big icon. However it is worse than our usual 14px icons, as it indicates lines that might not be there in reality. That contradicts with markings that are mapped according to their existence, e.g. parking_space. |
Compromise: those high tech French patterns plus icons (for we (But wait again, nobody has figured out how to label the Pacific Ocean yet, |
Cross-referencing a completely unrelated topic is counter-productive. |
I thought there was technological limitations keeping us from doing things similar to the German style and that they where doing a workaround that wouldn't work in this style for some reason (or was that rendering golf=* stuff?). Maybe it was just that it wasn't consistent enough. |
That was (Now golf= features are imported as polygons, since the database reload and schema changes in v5.0.0, so there is no problem with rendering |
I could have sworn there was another issue with sample pictures from the German style where they didn't align well with the pitch sometimes. |
The French rendering uses nice icons for sport fields:
http://tile.openstreetmap.fr/?zoom=17&lat=48.94614&lon=2.35456&layers=B0000000FFFFFFF
It would be nice to add them to the main rendering too.
The text was updated successfully, but these errors were encountered: