Created
February 23, 2014 13:04
-
-
Save vallettea/9171122 to your computer and use it in GitHub Desktop.
This file contains 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
# connect to the db | |
psql -d idf -U postgres | |
# get first few nodes having tags | |
select * from nodes where array_length(akeys(tags),1) >0 limit 5; | |
# get nodes having tag key "highway" | |
select * from nodes where tags ? 'highway' limit 10; | |
# select amenity fuel | |
select * from nodes where tags @> 'amenity=>fuel' limit 10; | |
# render as you like | |
select st_x(geom),st_y(geom), tags from nodes where tags @> 'amenity=>fuel' limit 10; | |
# dump all of them to a csv | |
\copy (select st_x(geom),st_y(geom), tags from nodes where tags @> 'amenity=>fuel') To 'fuels.csv' With Delimiter ';' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment