-
Notifications
You must be signed in to change notification settings - Fork 114
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
Detect missing zone30, living_street by neighborhood #326
Comments
I run some tests on Paris. It's promising. The data: 30.zip DROP TABLE IF EXISTS z30;
CREATE TEMP TABLE z30 AS
SELECT
id,
tags,
ST_Transform(linestring, 2154) AS linestring
FROM
ways
WHERE
tags != ''::hstore AND
tags?'zone:maxspeed' AND
ways.linestring && st_setsrid(st_makeline(st_makepoint(2.2057,48.9055), st_makepoint(2.409, 48.827)), 4326)
;
DROP TABLE IF EXISTS a30;
CREATE TEMP TABLE a30 AS
SELECT
1 AS a,
ST_Transform(linestring, 4326) AS linestring
FROM (
SELECT
ST_Buffer(
(ST_Dump(
ST_Union(ST_Buffer(linestring, 60))
)).geom,
-61
) AS linestring
FROM
z30
) AS t
WHERE
ST_IsValid(linestring) AND
NOT ST_IsEmpty(linestring)
;
SELECT
highways.id,
highways.tags
FROM
a30
JOIN ways AS highways ON
highways.tags != ''::hstore AND
highways.tags?'highway' AND
highways.tags->'highway' IN ('residential', 'unclassified', 'tertiary') AND
NOT highways.tags?'zone:maxspeed' AND
(NOT highways.tags?'maxspeed' OR highways.tags->'maxspeed' = '30') AND
highways.linestring && st_setsrid(st_makeline(st_makepoint(2.2057,48.9055), st_makepoint(2.409, 48.827)), 4326) AND
highways.linestring && a30.linestring AND
ST_Length(ST_Intersection(highways.linestring, a30.linestring)) / ST_Length(highways.linestring) > 0.8
; On the test area I get 78 ways: 253982929,22653485,184124924,53792389,25471929,570748422,492851440,425721608,12204109,14647716,45395928,609286173,22946771,4216669,14348628,15919440,247516249,3127178,130075302,130075305,59461540,29992089,22468100,8415026,143407393,23369311,27089069,236877988,27817543,27817544,106394299,551932769,555481948,56000349,56000401,19580381,29712377,4039916,15275486,23696477,23235939,23706674,16877242,400285512,72072067,72072068,72072072,360133450,62117003,40036977,307333243,255109304,217588511,188450862,167966628,50481178,50481558,38273578,149738191,118764518,114992310,114992315,22770936,23300771,112631446,114014398,4574366,22972089,286549,390298295,390298292,306392295,172312427,83262392,22706102,4227124,19780769,62316777 |
I did a bit more of comparison between OSM data and Opendata. Actually, they seem to match quite well when you include I guess some contributors simply add maxspeed and miss the zone part. This or the quality of the opendata file is not really good (not sure if "ZONE30" in the opendata file really means a zone:maxspeed for instance). Anyways, the analysis proposed for Osmose to guess which ways could be added as part of zone:maxspeed looks really efficient and useful! |
After some nice maps, some nice results are comming: |
We need to check results to establish if it's working well or have to false positives. |
Item is now public |
Great, thanks! |
Use buffer/concave hull to detect missing tagging
The text was updated successfully, but these errors were encountered: