Advertisement
kijato

sema+hrsz-bol_linestringek.sql

Feb 12th, 2020 (edited)
1,454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.77 KB | None | 0 0
  1. SELECT st_buildarea(st_union(geom)) FROM (
  2.  
  3. SELECT p1.pont_id id1, p1.pont_y y1, p1.pont_x x1, p1.pont_h h1,
  4.        p2.pont_id id2, p2.pont_y y2, p2.pont_x x2, p2.pont_h h2,
  5.        st_geomfromtext('LINESTRING('||p1.pont_y||' '||p1.pont_x||','||p2.pont_y||' '||p2.pont_x||')',23700) geom
  6. FROM 9_1078_2018.t_hatarvonal
  7. JOIN 9_1078_2018.t_pont p1 ON p1.pont_id=pont_id_1
  8. JOIN 9_1078_2018.t_pont p2 ON p2.pont_id=pont_id_2
  9. WHERE hatarvonal_id IN (
  10. SELECT hatarvonal_id FROM 9_1078_2018.t_hatar
  11.   WHERE hatar_id IN (
  12.     SELECT hatar_id FROM 9_1078_2018.t_felulet
  13.     WHERE felulet_id IN (
  14.       SELECT felulet_id FROM 9_1078_2018.t_obj_attrbc WHERE helyr_szam='01'
  15.       UNION
  16.       SELECT felulet_id FROM 9_1078_2018.t_obj_attrbd WHERE helyr_szam='01'
  17.     )
  18.   )
  19. )
  20.  
  21. ) g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement