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>196 / 3107.8.28 ST_LongestLineST_LongestLine — Returns the 2-dimensional longest line points of two geometries. The function will only return the firstlongest line if more than one, that the function finds. The line returned will always start in g1 and end in g2. The length of theline this function returns will always be the same as st_maxdistance returns for g1 and g2.Synopsisgeometry ST_LongestLine(geometry g1, geometry g2);DescriptionReturns the 2-dimensional longest line between the points of two geometries.Availability: 1.5.0ExamplesLongest line between point and lineSELECT ST_AsText(ST_LongestLine(’POINT(100 100)’:: ←↪geometry,’LINESTRING (20 80, 98 ←↪190, 110 180, 50 75 )’::geometry)) As lline;lline-----------------LINESTRING(100 100,98 190)longest line between polygon and polygonSELECT ST_AsText(ST_LongestLine(ST_GeomFromText(’POLYGON ←↪((175 150, 20 40,50 60, 125 100, ←↪175 150))’),ST_Buffer(ST_GeomFromText ←↪(’POINT(110 170)’), 20))) As llinewkt;lline-----------------LINESTRING(20 40,121.111404660392186.629392246051)←↪

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

Saved successfully!

Ooh no, something went wrong!