Created
January 16, 2015 11:49
-
-
Save talaj/2b0d866b750aec41edad to your computer and use it in GitHub Desktop.
Kontrola křižovatek
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 count(*) from import.pm_junction_pt j | |
where (select 1 from import.pm_road_ln r | |
where routing is not null and | |
r.geometrie && j.geometrie and | |
(j.geometrie && ST_StartPoint(r.geometrie) or | |
j.geometrie && ST_EndPoint(r.geometrie)) limit 1) is not null; |
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 count(*) from import.pm_junction_pt j | |
where (select 1 from import.pm_road_ln r | |
where routing is not null and | |
r.geometrie && j.geometrie and | |
(j.geometrie && ST_StartPoint(r.geometrie) or | |
j.geometrie && ST_EndPoint(r.geometrie)) limit 1) is null | |
and (select 1 from import.pm_road_ln r | |
where not (ST_Buffer(j.geometrie, 5) && r.geometrie) limit 1) is null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment