Advertisement
Guest User

Untitled

a guest
Oct 31st, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. SELECT
  2. ST_Distance(f1.geog, f2.geog),
  3. _ST_DistanceTree(f1.geog, f2.geog),
  4. _ST_DistanceUncached(f1.geog, f2.geog)
  5. FROM
  6. LATERAL (
  7. SELECT ST_Transform(
  8. ST_SetSRID(
  9. ST_GeomFromGeoJson('{"type": "Polygon", "coordinates": [[[-5, 0], [-5, 100], [5, 100], [5, 0], [-5, 0]]]}'),
  10. 32641
  11. ),
  12. 4326
  13. )::geography AS geog
  14. ) AS f1,
  15. LATERAL (
  16. SELECT ST_Transform(
  17. ST_SetSRID(
  18. ST_GeomFromGeoJson('{"type": "Polygon", "coordinates": [[[-10, 30], [-10, 40], [-20, 40], [-20, 30], [-10, 30]]]}'),
  19. 32641
  20. ),
  21. 4326
  22. )::geography AS geog
  23. ) AS f2,
  24. generate_series(1, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement