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>183 / 310Examplespostgis=# SELECT st_HausdorffDistance(’LINESTRING (0 0, 2 0)’::geometry,’MULTIPOINT (0 1, 1 0, 2 1)’::geometry);st_hausdorffdistance----------------------1(1 row)postgis=# SELECT st_hausdorffdistance(’LINESTRING (130 0, 0 0, 0 150)’::geometry, ’ ←↪LINESTRING (10 10, 10 150, 130 10)’::geometry, 0.5);st_hausdorffdistance----------------------70(1 row)7.8.14 ST_MaxDistanceST_MaxDistance — Returns the 2-dimensional largest distance between two geometries in projected units.Synopsisfloat ST_MaxDistance(geometry g1, geometry g2);DescriptionSome useful description here.NoteReturns the 2-dimensional maximum distance between two linestrings in projected units. If g1 and g2 is the samegeometry the function will return the distance between the two vertices most far from each other in that geometry.Availability: 1.5.0Examplespostgis=# SELECT ST_MaxDistance(’POINT(0 0)’::geometry, ’LINESTRING ( 2 0, 0 2 )’::geometry ←↪);st_maxdistance-----------------2(1 row)postgis=# SELECT ST_MaxDistance(’POINT(0 0)’::geometry, ’LINESTRING ( 2 2, 2 2 )’::geometry ←↪);st_maxdistance------------------2.82842712474619(1 row)

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

Saved successfully!

Ooh no, something went wrong!