Guide ruby PostGIS Manual stdistance ----------------- -- Geography example -- same but note units in meters - use sphere for slightly faster less accurate SELECT STDistance gg gg As spheroiddist STDistance gg gg false As spheredist FROM SELECT STGeograph
PostGIS Manual stdistance ----------------- -- Geography example -- same but note units in meters - use sphere for slightly faster less accurate SELECT STDistance gg gg As spheroiddist STDistance gg gg false As spheredist FROM SELECT STGeographyFromText ? SRID POINT - ? As gg STGeographyFromText ? SRID LINESTRING - - ? As gg As foo spheroiddist spheredist ------------------ ------------------ See Also STDWithin STDistanceSphere STDistanceSpheroid STMaxDistance STTransform STHausdor ?Distance Name STHausdor ?Distance ?? Returns the Hausdor ? distance between two geometries Basically a measure of how similar or dissimilar geometries are Units are in the units of the spatial reference system of the geometries Synopsis oat STHausdor ?Distance geometry g geometry g oat STHausdor ?Distance geometry g geometry g oat densifyFrac Description Implements algorithm for computing a distance metric which can be thought of as the Discrete Hausdor ? Distance This is the Hausdor ? distance restricted to discrete points for one of the geometries Wikipedia article on Hausdor ? distance Martin Davis note on how Hausdor ? Distance calculation was used to prove correctness of the CascadePolygonUnion approach When densifyFrac is speci ?ed this function performs a segment densi ?cation before computing the discrete hausdor ? distance The densifyFrac parameter sets the fraction by which to densify each segment Each segment will be split into a number of equal-length subsegments whose fraction of the total length is closest to the given fraction Note The current implementation supports only vertices as the discrete locations This could be extended to allow an arbitrary density of points to be used Note This algorithm is NOT equivalent to the standard Hausdor ? distance However it computes an approximation that is correct for a large subset of useful cases One important part of this subset is Linestrings that are roughly parallel to each other and roughly equal in length This is a useful metric for line matching Availability - requires GEOS CPostGIS Manual Examples postgis SELECT stHausdor ?Distance ? LINESTRING ? geometry ? MULTIPOINT ? geometry sthausdor ?distance ---------------------- row postgis SELECT sthausdor ?distance ? LINESTRING ? geometry ? LINESTRING ? geometry sthausdor ?distance ---------------------- row STMaxDistance Name STMaxDistance ?? Returns the -dimensional largest distance between two geometries in projected units Synopsis oat STMaxDistance geometry g geometry g Description Some useful description here Note Returns the -dimensional maximum distance between two linestrings in projected units If g and g is the same geometry the function will return the distance between the two vertices most far from each other in that geometry Availability Examples postgis SELECT STMaxDistance ? POINT ? geometry ? LINESTRING ? geometry stmaxdistance ---------------- row postgis SELECT STMaxDistance ? POINT ? geometry ? LINESTRING ? geometry st maxdistance ------------------ row C
Documents similaires









-
34
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Mar 11, 2021
- Catégorie Business / Finance
- Langue French
- Taille du fichier 37.5kB