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>150 / 310DescriptionReturn a GeoHash representation (geohash.org) of the geometry. A GeoHash encodes a point into a text form that is sortable andsearchable based on prefixing. A shorter GeoHash is a less precise representation of a point. It can also be thought of as a box,that contains the actual point.The one-parameter variant of ST_GeoHash returns a GeoHash based on the input geometry type. Points return a GeoHash with20 characters of precision (about enough to hold the full double precision of the input). Other types return a GeoHash with avariable amount of precision, based on the size of the feature. Larger features are represented with less precision, smaller featureswith more precision. The idea is that the box implied by the GeoHash will always contain the input feature.The two-parameter variant of ST_GeoHash returns a GeoHash with a requested precision. For non-points, the starting point ofthe calculation is the center of the bounding box of the geometry.Availability: 1.4.0NoteST_GeoHash will not work with geometries that are not in geographic (lon/lat) coordinates.This method supports Circular Strings and CurvesExamplesSELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326));st_geohash----------------------c0w3hf1s70w3hf1s70w3SELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326),5);st_geohash------------c0w3hSee Also7.6.10 ST_AsTextST_AsText — Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.Synopsistext ST_AsText(geometry g1);text ST_AsText(geography g1);DescriptionReturns the Well-Known Text representation of the geometry/geography.

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

Saved successfully!

Ooh no, something went wrong!