Skip to content
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

Layer: Existing Infrastructure #23

Open
mem48 opened this issue Jan 19, 2018 · 18 comments
Open

Layer: Existing Infrastructure #23

mem48 opened this issue Jan 19, 2018 · 18 comments
Labels

Comments

@mem48
Copy link
Contributor

mem48 commented Jan 19, 2018

Variables in the DB

Table: roads

osmid INT NULL, - OSM ID number (non unique due to segment splitting)
name VARCHAR(255) NULL, - road name (truncated to 255 characters)
ref VARCHAR(20) NULL, - road reference e.g. M25 (truncated to 20 character)
highway VARCHAR(20) NULL, - road type
junction VARCHAR(20) NULL, - junction (mostly roundabout or no)
elevation VARCHAR(8) NULL, - bridge / tunnel / no
maxspeed SMALLINT NULL, - in mph as number (note different to OSM where kph is default)
segregated VARCHAR(3) NULL, - yes / no
rtid INT NULL, - ID to link to road type table

Table: roadtypes (see https://github.com/cyipt/cyipt-bigdata/blob/master/forDB/roadtypes.csv )

rtid INT PRIMARY KEY, - unique ID
roadtype VARCHAR(100) NULL, - description of road, and cycling permissions
onewaysummary VARCHAR(40) NULL, summary of one way rules
sidewalk VARCHAR(20) NULL, - left / right / both / no / not applicable
cyclewayleft VARCHAR(20) NULL, - lane / track / share_busway / no
lanespsvforward SMALLINT NULL, - number of bus (public service vehicles) lanes
lanesforward SMALLINT NULL, - number of general use lanes
lanesbackward SMALLINT NULL, - number of general use lanes
lanespsvbackward SMALLINT NULL, - number of bus (public service vehicles) lanes
cyclewayright VARCHAR(20) NULL - lane / track / share_busway / no

@mem48
Copy link
Contributor Author

mem48 commented Jan 19, 2018

Suggested UI

  1. Cycle Infrastructure map, filtered for: cyclewayleft or cyclewayright is not no OR certain types of highway e.g. roadtype == Segregated Cycleway | Segregated Shared Path | Cycleway | Living Street

this is basically the current view except it removed roadtype == Shared Paths, which is basically all the blue paths that show up all over the place.

I'd suggest a colour scheme with a dashed line based on cyclewayleft and cyclewayright right so that "lane no" looks the same as "no lane" then solid colours for the roadtypes

  1. Road speed map, when no speed is provided in the OSM CyIPT guesses the speed, so it would be useful to see what CyIPT is using and would tie in well wit the edit the osm button

  2. Footways Layer - using the sidewalk tag, again CyIPT guesses when no data is provided so would be useful to see what CyIPT is using, also relevant to road width calcualtions

@jf1
Copy link

jf1 commented Jan 29, 2018

This layer has great potential to enable people to comprehend and improve OSM. I considered it over the weekend, before reading @mem48's comments here. My proposal below could be used to combine your suggestions for 1. Cycle Infrastructure map and 2. Footways Layer, or the proposed categories and colours below could be displayed on two different map views (or three: road-only; footway-only; combined).

I'm not sure what "solid colours for the roadtypes" means exactly. Please note that my proposal expands the spec to introduce two (red, orange) or more (+grey, black) colours for roads without infra, which would result in all roads being drawn.

I agree dashed lines would be useful and wonder if two-colour dashed lines are possible by drawing two lines with complimentary dashOffset values. This would enable eg track lane to be shown accurately. Once two-colour dashed lines are possible then this key scheme could be implemented:
image

My braindump of types and proposed colours is in this google sheet.
15 existing types would use 3 colours instead of the current 8, then the two other existing types (no infra) would show road category using one of the 4 colours mentioned above. I believe all of my Type values can be linked to your roadtypes.csv.
Screenshot from this spreadsheet below - you're welcome to insert a table into this issue or elsewhere on github if either are possible.

If thick and thin lines can be displayed on the same map then I'd prefer to see roads and off-highway provision together. Additionally, I think circles would be a good way to highlight access points and crossings.

image

nb. I'm very keen for CyIPT to use a Red-Yellow-Blue scale beyond this proposal for the existing infra layer, even if you prefer different shades. Adam Reynolds and I trialled various options, considering colour-blindness and user-friendliness, before settling on this. "Blue is best, red is bad" seems intuitive. We then added black for 'worse than red' and I think it's practical to also use a shade of grey, eg for 'no value specified' items.
We found the following sites useful:
http://colorbrewer2.org/#type=diverging&scheme=RdYlBu&n=7
http://www.color-blindness.com/coblis-color-blindness-simulator/

ps. The CycleStreets Cycleability ratings layer has similar potential to enable better comprehension of and contributions to OSM data, and I feel it would similarly benefit from an intuitive set of buckets and colours. I'll create an issue there that links to this one.

@mvl22
Copy link
Contributor

mvl22 commented Mar 15, 2018

Popups now dependent on the value of the layer parameter; implemented in 13225d9 and new upstream library support in cyclestreets/Leaflet.LayerViewer@378fc2c.

mvl22 added a commit that referenced this issue Mar 16, 2018
@mvl22
Copy link
Contributor

mvl22 commented Mar 16, 2018

Once two-colour dashed lines are possible then this key scheme could be implemented

This is mostly in place now (the simplified version with 7 values).

The dashOffset concept will need quite a bit more work, and I've not fully checked feasibility yet.

@mem48
Copy link
Contributor Author

mem48 commented Mar 16, 2018

Great work, the cycle infrastructure is good enough for the workshop, the speed limits and footways still need work. I've noticed that CyIPT is overly pessimistic about the presence of footways, which is fixable but not before the workshop

@mem48
Copy link
Contributor Author

mem48 commented Mar 16, 2018

Also, I think the API filters remove the possibility of Minor/Major roads every showing up on the map. So you could remove them from the legend

@jf1
Copy link

jf1 commented Mar 16, 2018

Thanks @mvl22 for the work and notification.

I think the API filters remove the possibility of Minor/Major roads every showing up on the map. So you could remove them from the legend

If they are suppressed for now then I hope they'll be easy to reinstate later. Seeing how tools like PCT, CyIPT and cyclestreets understand our local highways network is crucial if we're to have confidence in their output, and to enable us to fix OSM errors or raise issues about any strange behaviour by the tools.

I agree this layer is good enough for the workshop, however you may wish to address the below before or after it...

Straight lines (which to me look very strange) at zoom 15 or lower:
image

Accurate geometries at zoom levels 16 or higher:
image

@mvl22
Copy link
Contributor

mvl22 commented Mar 17, 2018

Also, I think the API filters remove the possibility of Minor/Major roads every showing up on the map.

Yes, my understanding is that this is a map of anything with cycle infrastructure, so those don't show.

So you could remove them from the legend

OK.

@mvl22
Copy link
Contributor

mvl22 commented Mar 17, 2018

Straight lines (which to me look very strange) at zoom 15 or lower:

@mem48 Can you look at that? Pretty sure this is not the API mechanics, as that's just relaying what's been put in the database.

Looking at the example I suspect the curvature of that path means it's going outside a matching buffer.

@mvl22
Copy link
Contributor

mvl22 commented Mar 17, 2018

the speed limits and footways still need work

Can anyone suggest a colour scheme for both of these?

@mvl22
Copy link
Contributor

mvl22 commented Mar 18, 2018

Can anyone suggest a colour scheme for both of these?

I've put one in - this stuff is now in place.

@mem48
Copy link
Contributor Author

mem48 commented Mar 19, 2018

Straight lines (which to me look very strange) at zoom 15 or lower:

This is the SQL calls to st_simplify reducing the amount of data returned when making large requests. So it is a feature, not a bug. However, it is causing some confusion so perhaps needs revising. I will look a producing a table of zoom level to simplification which produces more pleasing results.

@mem48
Copy link
Contributor Author

mem48 commented Mar 19, 2018

Can anyone suggest a colour scheme for both of these?

Speed limits seem to be missing colours for 10, 50, 60 mph
Perhaps blue for 10 mph (as probably an of road area) and shades of red for the 50/60 mph

@mem48
Copy link
Contributor Author

mem48 commented Mar 19, 2018

For footways, missing the right option (uncommon but possible) I'd suggest using the same colour as left as the key concept is only on one side of the road and the OSM left/right side concept is not immediately intuitive.

@jf1
Copy link

jf1 commented Mar 19, 2018

Shared-use footways are being displayed as 'Track' which wasn't the intention in my suggestion. Not sure if this is deliberate or not but I feel these are two very different types of provision that CyIPT should be clearly differentiating.

FWIW I think it's a shame the major/minor road classification isn't shown anymore as it was a useful way to help comprehend why CyIPT/PCT etc produce certain results, potentially highlighting issues to address with OSM data, the tools or the LA's road categorisation.

ps. For now I'd suggest footways on one side are displayed in the same way as when both are present. Once the dashOffset technique can be implemented then any single-sided footway could be represented as a dashed line. This would be consistent with displaying any single-sided infrastructure as a dashed line.

@mvl22
Copy link
Contributor

mvl22 commented Mar 19, 2018

Speed limits seem to be missing colours for 10, 50, 60 mph

I took the view that this gradation is more than is needed for cycling. Max speeds 0-20 are good, 30 verging on problematic, and more than that too fast.

More inflection points can easily be added at:
https://github.com/cyipt/cyipt-website/blob/master/js/cyipt.js#L207-L212

@mvl22
Copy link
Contributor

mvl22 commented Mar 19, 2018

Shared-use footways are being displayed as 'Track'

OSM has no concept of shared-use footways, unfortunately. We only know that something is a footway or a cycleway, each of which may have foot/bicycle=yes/no, and the issue of what is a cycleway vs a footway that can be cycled on is disputed.

@jf1
Copy link

jf1 commented Mar 19, 2018

Thanks for that clarification @mvl22 - perhaps something to touch on on Friday and consider thereafter.

@mvl22 mvl22 mentioned this issue Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants