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

Detect missing zone30, living_street by neighborhood #326

Closed
frodrigo opened this issue Aug 24, 2018 · 10 comments
Closed

Detect missing zone30, living_street by neighborhood #326

frodrigo opened this issue Aug 24, 2018 · 10 comments

Comments

@frodrigo
Copy link
Member

Use buffer/concave hull to detect missing tagging

@Phyks
Copy link
Contributor

Phyks commented Aug 25, 2018

Typical example here close to Montparnasse in Paris where it is quite easy to see that a couple of segments are (probably) missing the zone30 tag:

2018-08-25-164410

@frodrigo
Copy link
Member Author

I run some tests on Paris. It's promising.

image

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

@frodrigo
Copy link
Member Author

I improve the process to remove small holes in polygons. The computation is more complex but better.
I also compare the data OSM with the Opendata of Paris, it does not match well.

Green: OSM
Red: possible missing tag in OSM
Yellow: OpenData
image

frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Aug 25, 2018
@frodrigo frodrigo added the ready label Aug 25, 2018
frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Aug 27, 2018
@Phyks
Copy link
Contributor

Phyks commented Aug 28, 2018

I did a bit more of comparison between OSM data and Opendata. Actually, they seem to match quite well when you include maxspeed tag as well as zone:maxspeed.

kepler-gl

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!

frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Aug 28, 2018
frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Sep 2, 2018
frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Sep 2, 2018
@frodrigo
Copy link
Member Author

frodrigo commented Sep 3, 2018

After some nice maps, some nice results are comming:
http://osmose.openstreetmap.fr/fr/errors/?item=1210&class=20,30

@frodrigo
Copy link
Member Author

frodrigo commented Sep 5, 2018

We need to check results to establish if it's working well or have to false positives.

frodrigo added a commit to frodrigo/osmose-backend that referenced this issue Sep 15, 2018
jocelynj added a commit that referenced this issue Sep 16, 2018
* frodrigo/master:
  Use all highways type to get continuity in analyser_osmosis_highway_floating_islands
  Change item for analyser_osmosis_highway_zone.py 1210 -> 2150 #326
  Remove services from highway table
  Fix typo #330
@frodrigo
Copy link
Member Author

frodrigo commented Sep 24, 2018

@frodrigo
Copy link
Member Author

@Phyks
Copy link
Contributor

Phyks commented Sep 25, 2018

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants