Created
June 27, 2014 09:06
-
-
Save pnorman/5e6540705d6f1a99d090 to your computer and use it in GitHub Desktop.
Finds route relations and ways where refs disagree on usage of -
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT r.id as rid, w.id as wid, r.tags->'ref' as rref, w.tags->'ref' as wref | |
FROM relations r JOIN relation_members rm on (r.id=rm.relation_id) JOIN ways w on (rm.member_id = w.id and rm.member_type='W') | |
WHERE r.tags@>hstore('type','route') | |
AND r.tags@>hstore('route','road') | |
AND r.tags?'ref' | |
AND (r.tags->'ref') LIKE '%-%' | |
AND w.tags?'ref' | |
AND w.tags?'highway' | |
AND NOT (w.tags->'ref') LIKE '%-%' | |
LIMIT 50; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment