MagnusArias

SBO | Spatial 2 geography

Oct 12th, 2019
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.81 KB | None | 0 0
  1. -- potrzebne poligony f,g,h z poprzedniego pliku
  2.  
  3. SELECT @f.STBuffer(1).ToString(), @g.STBuffer(1).ToString(), @h.STBuffer(1).ToString()
  4.  
  5. SELECT @f.STBuffer(1)
  6. UNION ALL
  7. SELECT @g.STBuffer(1)
  8. UNION ALL
  9. SELECT @h.STBuffer(1)
  10.  
  11.  
  12.  
  13. SELECT @f.STIntersection(@g)
  14. UNION ALL
  15. SELECT @f.STIntersection(@h)
  16. UNION ALL
  17. SELECT @h.STIntersection(@h)
  18.  
  19. SET @g = geometry::STGeomFromText('POINT(2 2)',  0)
  20. SET @h = geometry::STGeomFromText('LINESTRING(0 0, 0 10, 10 10, 10 0, 0 0)', 0)
  21.  
  22.  
  23. SELECT @g.STBuffer(1)
  24. UNION ALL
  25. SELECT @h
  26.  
  27.  
  28.  
  29.  
  30.  
  31. DECLARE @g geography;
  32. DECLARE @poland geography;
  33. SET @poland = (SELECT geom FROM DEU_Adm2 WHERE ID=243)
  34. SET @g = geography::STGeomFromText('POINT(20 51.5)', 4326);
  35.  
  36. SELECT @poland
  37. UNION ALL
  38. SELECT @g.STBuffer(1000)
  39.  
  40. SELECT geom FROM DEU_adm0
  41. UNION ALL
  42. SELECT geom FROM POL_adm0
Add Comment
Please, Sign In to add comment