Created
November 2, 2011 22:48
-
-
Save booo/1335200 to your computer and use it in GitHub Desktop.
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 relation_id, ways.linestring FROM relations, relation_members, ways | |
| WHERE | |
| relation_members.member_id = ways.id | |
| AND | |
| relation_members.member_type = 'W' | |
| AND | |
| relations.tags @> hstore('admin_level','8') AND relations.tags @> hstore('boundary','administrative') | |
| AND | |
| relation_members.relation_id = relations.id | |
| AND | |
| ST_intersects(ways.linestring, (SELECT ST_envelope(geom) FROM countries_europe WHERE countries_europe.relation_id = 174737)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment