Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- ST_Distance(f1.geog, f2.geog),
- _ST_DistanceTree(f1.geog, f2.geog),
- _ST_DistanceUncached(f1.geog, f2.geog)
- FROM
- LATERAL (
- SELECT ST_Transform(
- ST_SetSRID(
- ST_GeomFromGeoJson('{"type": "Polygon", "coordinates": [[[-5, 0], [-5, 100], [5, 100], [5, 0], [-5, 0]]]}'),
- 32641
- ),
- 4326
- )::geography AS geog
- ) AS f1,
- LATERAL (
- SELECT ST_Transform(
- ST_SetSRID(
- ST_GeomFromGeoJson('{"type": "Polygon", "coordinates": [[[-10, 30], [-10, 40], [-20, 40], [-20, 30], [-10, 30]]]}'),
- 32641
- ),
- 4326
- )::geography AS geog
- ) AS f2,
- generate_series(1, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement