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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>164 / 310Synopsisfloat ST_Azimuth(geometry pointA, geometry pointB);DescriptionReturns the azimuth of the segment defined by the given Point geometries, or NULL if the two points are coincident. Returnvalue is in radians.The Azimuth is mathematical concept defined as the angle, in this case measured in radian, between a reference plane and a pointAvailability: 1.1.0Azimuth is especially useful in conjunction with ST_Translate for shifting an object along its perpendicular axis. See upgis_lineshiftPlpgsqlfunctions <strong>PostGIS</strong> wiki section for example of this.Examples--Azimuth in degreesSELECT ST_Azimuth(ST_MakePoint(1,2), ST_MakePoint(3,4))/(2*pi())*360 as degAz,ST_Azimuth(ST_MakePoint(3,4), ST_MakePoint(1,2))/(2*pi())*360 As degAzrevdegaz degazrev------ ---------45 225See AlsoST_MakePoint, ST_Translate7.8.3 ST_CentroidST_Centroid — Returns the geometric center of a geometry.Synopsisgeometry ST_Centroid(geometry g1);DescriptionComputes the geometric center of a geometry, or equivalently, the center of mass of the geometry as a POINT. For [MULTI]P-OINTs, this is computed as the arithmetric mean of the input coordinates. For [MULTI]LINESTRINGs, this is computed as theweighted length of each line segment. For [MULTI]POLYGONs, "weight" is thought in terms of area. If an empty geometry issupplied, an empty GEOMETRYCOLLECTION is returned. If NULL is supplied, NULL is returned.The centroid is equal to the centroid of the set of component Geometries of highest dimension (since the lower-dimensiongeometries contribute zero "weight" to the centroid).NoteComputation will be more accurate if performed by the GEOS module (enabled at compile time).This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1.This method implements the SQL/MM specification. SQL-MM 3: 8.1.4, 9.5.5

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

Saved successfully!

Ooh no, something went wrong!