Created
October 5, 2016 14:40
-
-
Save jozo/067658fa7ee420e9f1c53b532bcc66a3 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
select * from planet_osm_point where amenity = 'restaurant'; | |
select st_asgeojson(way) from planet_osm_point where amenity = 'restaurant'; | |
select st_asgeojson(st_transform(way, 3857)) from planet_osm_point where amenity = 'restaurant'; | |
select o2.name, st_asgeojson(o2.way) from okresy o1 | |
join okresy o2 on st_touches(o1.way, o2.way) | |
where o1.name = 'Bratislavsky'; | |
select * from planet_osm_point where amenity = 'university'; | |
select st_distance( | |
(select way::geography from planet_osm_point where name = 'Fakulta manažmentu UK'), | |
(select way::geography from planet_osm_point where name = 'Farmaceutická fakulta UK') | |
); | |
select * from planet_osm_polygon where name = 'Karlova Ves'; | |
(select way from planet_osm_polygon where "natural" = 'water') | |
select st_touches( | |
(select way from planet_osm_polygon where ref = '805211'), | |
); | |
select p1.name, p2.* from planet_osm_polygon p1 | |
join planet_osm_polygon p2 on st_touches(p1.way, p2.way) | |
where p1.ref = '805211'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment