12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>185 / 310Synopsisfloat ST_Distance_Spheroid(geometry geomlonlatA, geometry geomlonlatB, spheroid measurement_spheroid);DescriptionReturns minimum distance in meters between two lon/lat geometries given a particular spheroid. See the explanation of spheroidsgiven for ST_Length_Spheroid. <strong>PostGIS</strong> version prior to 1.5 only support points.NoteThis function currently does not look at the SRID of a geometry and will always assume its represented in the coordinatesof the passed in spheroid. Prior versions of this function only support points.Availability: 1.5 - support for other geometry types besides points was introduced. Prior versions only work with points.ExamplesSELECT round(CAST(ST_Distance_Spheroid(ST_Centroid(the_geom), ST_GeomFromText(’POINT(-118 38)’,4326), ’ ←↪SPHEROID["WGS 84",6378137,298.257223563]’)As numeric),2) As dist_meters_spheroid,round(CAST(ST_Distance_Sphere(ST_Centroid(the_geom), ST_GeomFromText(’POINT(-118 38) ←↪’,4326)) As numeric),2) As dist_meters_sphere,round(CAST(ST_Distance(ST_Transform(ST_Centroid(the_geom),32611),ST_Transform(ST_GeomFromText(’POINT(-118 38)’, 4326),32611)) As numeric),2) As ←↪dist_utm11_metersFROM(SELECT ST_GeomFromText(’LINESTRING(-118.584 38.374,-118.583 38.5)’, 4326) As the_geom) ←↪as foo;dist_meters_spheroid | dist_meters_sphere | dist_utm11_meters----------------------+--------------------+-------------------70454.92 | 70424.47 | 70438.00See AlsoST_Distance, ST_Distance_Sphere7.8.17 ST_DFullyWithinST_DFullyWithin — Returns true if all of the geometries are within the specified distance of one anotherSynopsisboolean ST_DFullyWithin(geometry g1, geometry g2, double precision distance);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!