[postgis-tickets] r14792 - upport ST_AsEncodedPolyLine google example, alphabetize entries

Regina Obe lr at pcorp.us
Sat Mar 19 23:33:10 PDT 2016


Author: robe
Date: 2016-03-19 23:33:10 -0700 (Sat, 19 Mar 2016)
New Revision: 14792

Modified:
   trunk/doc/reference_output.xml
Log:
upport ST_AsEncodedPolyLine google example, alphabetize entries

Modified: trunk/doc/reference_output.xml
===================================================================
--- trunk/doc/reference_output.xml	2016-03-20 05:07:57 UTC (rev 14791)
+++ trunk/doc/reference_output.xml	2016-03-20 06:33:10 UTC (rev 14792)
@@ -106,6 +106,69 @@
 			</para>
 		  </refsection>
 	</refentry>
+	
+	<refentry id="ST_AsEncodedPolyline">
+		<refnamediv>
+		<refname>ST_AsEncodedPolyline</refname>
+		<refpurpose>Returns an Encoded Polyline from a LineString geometry.</refpurpose>
+		</refnamediv>
+	
+		<refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+		  <funcdef>text <function>ST_AsEncodedPolyline</function></funcdef>
+		  <paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
+		  <paramdef choice="opt"><type>integer </type> <parameter>precision=5</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+		</refsynopsisdiv>
+	
+		<refsection>
+		<title>Description</title>
+	
+		<para>Returns the geometry as an Encoded Polyline.  This is a format very useful if you are using google maps</para>
+	
+	
+		<para>Availability: 2.2.0</para>
+		</refsection>
+	
+		<refsection>
+		<title>Examples</title>
+	<para>Basic </para>
+	<programlisting>
+	SELECT ST_AsEncodedPolyline(GeomFromEWKT('SRID=4326;LINESTRING(-120.2 38.5,-120.95 40.7,-126.453 43.252)'));
+	--result--
+	|_p~iF~ps|U_ulLnnqC_mqNvxq`@
+	</programlisting>
+	
+	<para>Use in conjunction with geography linestring and geography segmentize, and put on google maps</para>
+	<programlisting>-- the SQL for Boston to San Francisco, segments every 100 KM
+	SELECT ST_AsEncodedPolyline(
+		ST_Segmentize(
+			ST_GeogFromText('LINESTRING(-71.0519 42.4935,-122.4483 37.64)'), 
+				100000)::geometry) As encodedFlightPath;</programlisting>
+	
+	
+	<para>javascript will look something like this where $ variable you replace with query result</para>
+	<programlisting><![CDATA[<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=geometry"></script>
+<script type="text/javascript">
+	 flightPath = new google.maps.Polyline({
+			path:  google.maps.geometry.encoding.decodePath("$encodedFlightPath"),
+			map: map,
+			strokeColor: '#0000CC',
+			strokeOpacity: 1.0,
+			strokeWeight: 4
+		});
+</script>
+	]]></programlisting>
+	</refsection>
+		<!-- Optionally add a "See Also" section -->
+		<refsection>
+		<title>See Also</title>
+		<para><xref linkend="ST_LineFromEncodedPolyline" />, <xref linkend="ST_Segmentize" /></para>
+		</refsection>
+	</refentry>
+
 	<refentry id="ST_AsEWKB">
 		  <refnamediv>
 			<refname>ST_AsEWKB</refname>
@@ -705,6 +768,101 @@
 		<para><xref linkend="ST_AsSVG" />, <xref linkend="ST_AsGML" /></para>
 	  </refsection>
 	</refentry>
+	
+		<refentry id="ST_AsLatLonText">
+		  <refnamediv>
+			<refname>ST_AsLatLonText</refname>
+			<refpurpose>Return the Degrees, Minutes, Seconds representation of the given point.</refpurpose>
+		  </refnamediv>
+
+		  <refsynopsisdiv>
+			<funcsynopsis>
+			  <funcprototype>
+				<funcdef>text <function>ST_AsLatLonText</function></funcdef>
+				<paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
+				<paramdef><type>text </type> <parameter>format=''</parameter></paramdef>
+			  </funcprototype>
+			</funcsynopsis>
+		  </refsynopsisdiv>
+
+		  <refsection>
+			<title>Description</title>
+
+			<para>Returns the Degrees, Minutes, Seconds representation of the point.</para>
+
+			<note>
+			  <para>It is assumed the point is in a lat/lon projection.  The X (lon) and Y (lat) coordinates are normalized in the output
+				to the "normal" range (-180 to +180 for lon, -90 to +90 for lat).</para>
+			</note>
+				<para>
+					The text parameter is a format string containing the format for the resulting text, similar to a date format string.  Valid tokens
+					are "D" for degrees, "M" for minutes, "S" for seconds, and "C" for cardinal direction (NSEW).  DMS tokens may be repeated to indicate
+					desired width and precision ("SSS.SSSS" means "  1.0023").
+				</para>
+				<para>
+					"M", "S", and "C" are optional.  If "C" is omitted, degrees are
+					shown with a "-" sign if south or west.  If "S" is omitted, minutes will be shown as decimal with as many digits of precision
+					as you specify.  If "M" is also omitted, degrees are shown as decimal with as many digits precision as you specify.
+				</para>
+				<para>
+					If the format string is omitted (or zero-length) a default format will be used.
+				</para>
+				<para>
+			</para>
+
+			<para>Availability: 2.0</para>
+		  </refsection>
+
+
+		  <refsection>
+			<title>Examples</title>
+<para>Default format.</para>
+<programlisting>
+SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)'));
+      st_aslatlontext       
+----------------------------
+ 2°19'29.928"S 3°14'3.243"W
+</programlisting>
+<para>Providing a format (same as the default).</para>
+<programlisting>
+SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D°M''S.SSS"C'));
+      st_aslatlontext       
+----------------------------
+ 2°19'29.928"S 3°14'3.243"W
+</programlisting>
+<para>Characters other than D, M, S, C and . are just passed through.</para>
+<programlisting>
+SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D degrees, M minutes, S seconds to the C'));
+                                   st_aslatlontext                                    
+--------------------------------------------------------------------------------------
+ 2 degrees, 19 minutes, 30 seconds to the S 3 degrees, 14 minutes, 3 seconds to the W
+</programlisting>
+<para>Signed degrees instead of cardinal directions.</para>
+<programlisting>
+SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D°M''S.SSS"'));
+      st_aslatlontext       
+----------------------------
+ -2°19'29.928" -3°14'3.243"
+</programlisting>
+<para>Decimal degrees.</para>
+<programlisting>
+SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D.DDDD degrees C'));
+          st_aslatlontext          
+-----------------------------------
+ 2.3250 degrees S 3.2342 degrees W
+</programlisting>
+<para>Excessively large values are normalized.</para>
+<programlisting>
+SELECT (ST_AsLatLonText('POINT (-302.2342342 -792.32498)'));
+        st_aslatlontext        
+-------------------------------
+ 72°19'29.928"S 57°45'56.757"E
+</programlisting>
+		  </refsection>
+
+		  <!-- Optionally add a "See Also" section -->
+	</refentry>
+	
 	<refentry id="ST_AsSVG">
 	  <refnamediv>
 		<refname>ST_AsSVG</refname>
@@ -758,6 +916,139 @@
 	  </refsection>
 	</refentry>
 	
+		<refentry id="ST_AsText">
+		  <refnamediv>
+			<refname>ST_AsText</refname>
+			<refpurpose>Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.</refpurpose>
+		  </refnamediv>
+
+		  <refsynopsisdiv>
+			<funcsynopsis>
+			  <funcprototype>
+				<funcdef>text <function>ST_AsText</function></funcdef>
+				<paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+			  </funcprototype>
+			  <funcprototype>
+				<funcdef>text <function>ST_AsText</function></funcdef>
+				<paramdef><type>geography </type> <parameter>g1</parameter></paramdef>
+			  </funcprototype>
+			</funcsynopsis>
+		  </refsynopsisdiv>
+
+		  <refsection>
+			<title>Description</title>
+
+			<para>Returns the Well-Known Text representation of the geometry/geography.</para>
+
+			<note>
+			  <para>The WKT spec does not include the SRID.  To get the SRID as part of the data, use the non-standard
+				PostGIS <xref linkend="ST_AsEWKT" /></para>
+			</note>
+			<para><inlinegraphic fileref="images/warning.png" />
+				WKT format does not maintain precision so to prevent floating truncation, use ST_AsBinary or ST_AsEWKB format for transport.
+			</para>
+			<note>
+			  <para>ST_AsText is the reverse of <xref linkend="ST_GeomFromText" />.  Use <xref linkend="ST_GeomFromText" /> to convert to a postgis geometry from ST_AsText representation.</para>
+			</note>
+
+			<para>Availability: 1.5 - support for geography was introduced.</para>
+			<para>&sfs_compliant; s2.1.1.1</para>
+			<para>&sqlmm_compliant; SQL-MM 3: 5.1.25</para>
+			<para>&curve_support;</para>
+		  </refsection>
+
+
+		  <refsection>
+			<title>Examples</title>
+
+			<programlisting>SELECT ST_AsText('01030000000100000005000000000000000000
+000000000000000000000000000000000000000000000000
+F03F000000000000F03F000000000000F03F000000000000F03
+F000000000000000000000000000000000000000000000000');
+
+		   st_astext
+--------------------------------
+ POLYGON((0 0,0 1,1 1,1 0,0 0))
+(1 row)</programlisting>
+		  </refsection>
+
+		  <!-- Optionally add a "See Also" section -->
+		  <refsection>
+			<title>See Also</title>
+
+			<para><xref linkend="ST_AsBinary" />, <xref linkend="ST_AsEWKB" />, <xref linkend="ST_AsEWKT" />, <xref linkend="ST_GeomFromText" /></para>
+		  </refsection>
+	</refentry>
+	
+		<refentry id="ST_AsTWKB">
+		  <refnamediv>
+			<refname>ST_AsTWKB</refname>
+			<refpurpose>Returns the geometry as TWKB, aka "Tiny Well-Known Binary"</refpurpose>
+		  </refnamediv>
+
+		  <refsynopsisdiv>
+			<funcsynopsis>
+			  <funcprototype>
+				<funcdef>bytea <function>ST_AsTWKB</function></funcdef>
+				<paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+				<paramdef><type>integer </type> <parameter>decimaldigits_xy=0</parameter></paramdef>
+				<paramdef><type>integer </type> <parameter>decimaldigits_z=0</parameter></paramdef>
+				<paramdef><type>integer </type> <parameter>decimaldigits_m=0</parameter></paramdef>
+				<paramdef><type>boolean </type> <parameter>include_sizes=false</parameter></paramdef>
+				<paramdef><type>boolean </type> <parameter>include_bounding boxes=false</parameter></paramdef>
+			  </funcprototype>
+			  <funcprototype>
+				<funcdef>bytea <function>ST_AsTWKB</function></funcdef>
+				<paramdef><type>geometry[] </type> <parameter>geometries</parameter></paramdef>
+				<paramdef><type>bigint[] </type> <parameter>unique_ids</parameter></paramdef>
+				<paramdef><type>integer </type> <parameter>decimaldigits_xy=0</parameter></paramdef>
+				<paramdef><type>integer </type> <parameter>decimaldigits_z=0</parameter></paramdef>
+				<paramdef><type>integer </type> <parameter>decimaldigits_m=0</parameter></paramdef>
+				<paramdef><type>boolean </type> <parameter>include_sizes=false</parameter></paramdef>
+				<paramdef><type>boolean </type> <parameter>include_bounding_boxes=false</parameter></paramdef>
+			  </funcprototype>
+			</funcsynopsis>
+		  </refsynopsisdiv>
+		  <refsection>
+			<title>Description</title>
+			<para>Returns the geometry in TWKB (Tiny Well-Known Binary) format. TWKB is a <ulink url="https://github.com/TWKB/Specification/blob/master/twkb.md">compressed binary format</ulink> with a focus on minimizing the size of the output. </para>
+			<para>The decimal digits parameters control how much precision is stored in the output. By default, values are rounded to the nearest unit before encoding. If you want to transfer more precision, increase the number. For example, a value of 1 implies that the first digit to the right of the decimal point will be preserved.</para>
+			<para>The sizes and bounding boxes parameters control whether optional information about the encoded length of the object and the bounds of the object are included in the output. By default they are not. Do not turn them on unless your client software has a use for them, as they just use up space (and saving space is the point of TWKB).</para>
+			<para>The array-input form of the function is used to convert a collection of geometries and unique identifiers into a TWKB collection that preserves the identifiers. This is useful for clients that expect to unpack a collection and then access further information about the objects inside. You can create the arrays using the <ulink url="http://www.postgresql.org/docs/9.4/static/functions-aggregate.html">array_agg</ulink> function. The other parameters operate the same as for the simple form of the function.</para>
+			<note>
+			  <para>The format specification is available online at <ulink url="https://github.com/TWKB/Specification">https://github.com/TWKB/Specification</ulink>, and code for building a JavaScript client can be found at <ulink url="https://github.com/TWKB/twkb.js">https://github.com/TWKB/twkb.js</ulink>.</para>
+			</note>		
+
+			<para>Availability: 2.2.0</para>
+		  </refsection>
+
+
+		  <refsection>
+			<title>Examples</title>
+<programlisting>
+SELECT ST_AsTWKB('LINESTRING(1 1,5 5)'::geometry);
+                 st_astwkb                  
+--------------------------------------------
+\x02000202020808
+
+</programlisting>
+<para>To create an aggregate TWKB object including identifiers aggregate the desired geometries and objects first, using "array_agg()", then call the appropriate TWKB function.
+</para>
+<programlisting>
+SELECT ST_AsTWKB(array_agg(geom), array_agg(gid)) FROM mytable;
+                 st_astwkb                  
+--------------------------------------------
+\x040402020400000202
+</programlisting>
+
+		  </refsection>
+
+		  <refsection>
+			<title>See Also</title>
+			<para><xref linkend="ST_AsBinary" />, <xref linkend="ST_AsEWKB" />, <xref linkend="ST_AsEWKT" />, <xref linkend="ST_GeomFromText" /></para>
+		  </refsection>
+	</refentry>
+	
 	<refentry id="ST_AsX3D">
 	  <refnamediv>
 		<refname>ST_AsX3D</refname>
@@ -1009,273 +1300,4 @@
 	  </refsection>
 	</refentry>
 
-	<refentry id="ST_AsText">
-		  <refnamediv>
-			<refname>ST_AsText</refname>
-			<refpurpose>Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.</refpurpose>
-		  </refnamediv>
-
-		  <refsynopsisdiv>
-			<funcsynopsis>
-			  <funcprototype>
-				<funcdef>text <function>ST_AsText</function></funcdef>
-				<paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
-			  </funcprototype>
-			  <funcprototype>
-				<funcdef>text <function>ST_AsText</function></funcdef>
-				<paramdef><type>geography </type> <parameter>g1</parameter></paramdef>
-			  </funcprototype>
-			</funcsynopsis>
-		  </refsynopsisdiv>
-
-		  <refsection>
-			<title>Description</title>
-
-			<para>Returns the Well-Known Text representation of the geometry/geography.</para>
-
-			<note>
-			  <para>The WKT spec does not include the SRID.  To get the SRID as part of the data, use the non-standard
-				PostGIS <xref linkend="ST_AsEWKT" /></para>
-			</note>
-			<para><inlinegraphic fileref="images/warning.png" />
-				WKT format does not maintain precision so to prevent floating truncation, use ST_AsBinary or ST_AsEWKB format for transport.
-			</para>
-			<note>
-			  <para>ST_AsText is the reverse of <xref linkend="ST_GeomFromText" />.  Use <xref linkend="ST_GeomFromText" /> to convert to a postgis geometry from ST_AsText representation.</para>
-			</note>
-
-			<para>Availability: 1.5 - support for geography was introduced.</para>
-			<para>&sfs_compliant; s2.1.1.1</para>
-			<para>&sqlmm_compliant; SQL-MM 3: 5.1.25</para>
-			<para>&curve_support;</para>
-		  </refsection>
-
-
-		  <refsection>
-			<title>Examples</title>
-
-			<programlisting>SELECT ST_AsText('01030000000100000005000000000000000000
-000000000000000000000000000000000000000000000000
-F03F000000000000F03F000000000000F03F000000000000F03
-F000000000000000000000000000000000000000000000000');
-
-		   st_astext
---------------------------------
- POLYGON((0 0,0 1,1 1,1 0,0 0))
-(1 row)</programlisting>
-		  </refsection>
-
-		  <!-- Optionally add a "See Also" section -->
-		  <refsection>
-			<title>See Also</title>
-
-			<para><xref linkend="ST_AsBinary" />, <xref linkend="ST_AsEWKB" />, <xref linkend="ST_AsEWKT" />, <xref linkend="ST_GeomFromText" /></para>
-		  </refsection>
-	</refentry>
-
-
-	<refentry id="ST_AsLatLonText">
-		  <refnamediv>
-			<refname>ST_AsLatLonText</refname>
-			<refpurpose>Return the Degrees, Minutes, Seconds representation of the given point.</refpurpose>
-		  </refnamediv>
-
-		  <refsynopsisdiv>
-			<funcsynopsis>
-			  <funcprototype>
-				<funcdef>text <function>ST_AsLatLonText</function></funcdef>
-				<paramdef><type>geometry </type> <parameter>pt</parameter></paramdef>
-				<paramdef><type>text </type> <parameter>format=''</parameter></paramdef>
-			  </funcprototype>
-			</funcsynopsis>
-		  </refsynopsisdiv>
-
-		  <refsection>
-			<title>Description</title>
-
-			<para>Returns the Degrees, Minutes, Seconds representation of the point.</para>
-
-			<note>
-			  <para>It is assumed the point is in a lat/lon projection.  The X (lon) and Y (lat) coordinates are normalized in the output
-				to the "normal" range (-180 to +180 for lon, -90 to +90 for lat).</para>
-			</note>
-				<para>
-					The text parameter is a format string containing the format for the resulting text, similar to a date format string.  Valid tokens
-					are "D" for degrees, "M" for minutes, "S" for seconds, and "C" for cardinal direction (NSEW).  DMS tokens may be repeated to indicate
-					desired width and precision ("SSS.SSSS" means "  1.0023").
-				</para>
-				<para>
-					"M", "S", and "C" are optional.  If "C" is omitted, degrees are
-					shown with a "-" sign if south or west.  If "S" is omitted, minutes will be shown as decimal with as many digits of precision
-					as you specify.  If "M" is also omitted, degrees are shown as decimal with as many digits precision as you specify.
-				</para>
-				<para>
-					If the format string is omitted (or zero-length) a default format will be used.
-				</para>
-				<para>
-			</para>
-
-			<para>Availability: 2.0</para>
-		  </refsection>
-
-
-		  <refsection>
-			<title>Examples</title>
-<para>Default format.</para>
-<programlisting>
-SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)'));
-      st_aslatlontext       
-----------------------------
- 2°19'29.928"S 3°14'3.243"W
-</programlisting>
-<para>Providing a format (same as the default).</para>
-<programlisting>
-SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D°M''S.SSS"C'));
-      st_aslatlontext       
-----------------------------
- 2°19'29.928"S 3°14'3.243"W
-</programlisting>
-<para>Characters other than D, M, S, C and . are just passed through.</para>
-<programlisting>
-SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D degrees, M minutes, S seconds to the C'));
-                                   st_aslatlontext                                    
---------------------------------------------------------------------------------------
- 2 degrees, 19 minutes, 30 seconds to the S 3 degrees, 14 minutes, 3 seconds to the W
-</programlisting>
-<para>Signed degrees instead of cardinal directions.</para>
-<programlisting>
-SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D°M''S.SSS"'));
-      st_aslatlontext       
-----------------------------
- -2°19'29.928" -3°14'3.243"
-</programlisting>
-<para>Decimal degrees.</para>
-<programlisting>
-SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D.DDDD degrees C'));
-          st_aslatlontext          
------------------------------------
- 2.3250 degrees S 3.2342 degrees W
-</programlisting>
-<para>Excessively large values are normalized.</para>
-<programlisting>
-SELECT (ST_AsLatLonText('POINT (-302.2342342 -792.32498)'));
-        st_aslatlontext        
--------------------------------
- 72°19'29.928"S 57°45'56.757"E
-</programlisting>
-		  </refsection>
-
-		  <!-- Optionally add a "See Also" section -->
-	</refentry>
-
-	<refentry id="ST_AsTWKB">
-		  <refnamediv>
-			<refname>ST_AsTWKB</refname>
-			<refpurpose>Returns the geometry as TWKB, aka "Tiny Well-Known Binary"</refpurpose>
-		  </refnamediv>
-
-		  <refsynopsisdiv>
-			<funcsynopsis>
-			  <funcprototype>
-				<funcdef>bytea <function>ST_AsTWKB</function></funcdef>
-				<paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
-				<paramdef><type>integer </type> <parameter>decimaldigits_xy=0</parameter></paramdef>
-				<paramdef><type>integer </type> <parameter>decimaldigits_z=0</parameter></paramdef>
-				<paramdef><type>integer </type> <parameter>decimaldigits_m=0</parameter></paramdef>
-				<paramdef><type>boolean </type> <parameter>include_sizes=false</parameter></paramdef>
-				<paramdef><type>boolean </type> <parameter>include_bounding boxes=false</parameter></paramdef>
-			  </funcprototype>
-			  <funcprototype>
-				<funcdef>bytea <function>ST_AsTWKB</function></funcdef>
-				<paramdef><type>geometry[] </type> <parameter>geometries</parameter></paramdef>
-				<paramdef><type>bigint[] </type> <parameter>unique_ids</parameter></paramdef>
-				<paramdef><type>integer </type> <parameter>decimaldigits_xy=0</parameter></paramdef>
-				<paramdef><type>integer </type> <parameter>decimaldigits_z=0</parameter></paramdef>
-				<paramdef><type>integer </type> <parameter>decimaldigits_m=0</parameter></paramdef>
-				<paramdef><type>boolean </type> <parameter>include_sizes=false</parameter></paramdef>
-				<paramdef><type>boolean </type> <parameter>include_bounding_boxes=false</parameter></paramdef>
-			  </funcprototype>
-			</funcsynopsis>
-		  </refsynopsisdiv>
-		  <refsection>
-			<title>Description</title>
-			<para>Returns the geometry in TWKB (Tiny Well-Known Binary) format. TWKB is a <ulink url="https://github.com/TWKB/Specification/blob/master/twkb.md">compressed binary format</ulink> with a focus on minimizing the size of the output. </para>
-			<para>The decimal digits parameters control how much precision is stored in the output. By default, values are rounded to the nearest unit before encoding. If you want to transfer more precision, increase the number. For example, a value of 1 implies that the first digit to the right of the decimal point will be preserved.</para>
-			<para>The sizes and bounding boxes parameters control whether optional information about the encoded length of the object and the bounds of the object are included in the output. By default they are not. Do not turn them on unless your client software has a use for them, as they just use up space (and saving space is the point of TWKB).</para>
-			<para>The array-input form of the function is used to convert a collection of geometries and unique identifiers into a TWKB collection that preserves the identifiers. This is useful for clients that expect to unpack a collection and then access further information about the objects inside. You can create the arrays using the <ulink url="http://www.postgresql.org/docs/9.4/static/functions-aggregate.html">array_agg</ulink> function. The other parameters operate the same as for the simple form of the function.</para>
-			<note>
-			  <para>The format specification is available online at <ulink url="https://github.com/TWKB/Specification">https://github.com/TWKB/Specification</ulink>, and code for building a JavaScript client can be found at <ulink url="https://github.com/TWKB/twkb.js">https://github.com/TWKB/twkb.js</ulink>.</para>
-			</note>		
-
-			<para>Availability: 2.2.0</para>
-		  </refsection>
-
-
-		  <refsection>
-			<title>Examples</title>
-<programlisting>
-SELECT ST_AsTWKB('LINESTRING(1 1,5 5)'::geometry);
-                 st_astwkb                  
---------------------------------------------
-\x02000202020808
-
-</programlisting>
-<para>To create an aggregate TWKB object including identifiers aggregate the desired geometries and objects first, using "array_agg()", then call the appropriate TWKB function.
-</para>
-<programlisting>
-SELECT ST_AsTWKB(array_agg(geom), array_agg(gid)) FROM mytable;
-                 st_astwkb                  
---------------------------------------------
-\x040402020400000202
-</programlisting>
-
-		  </refsection>
-
-		  <refsection>
-			<title>See Also</title>
-			<para><xref linkend="ST_AsBinary" />, <xref linkend="ST_AsEWKB" />, <xref linkend="ST_AsEWKT" />, <xref linkend="ST_GeomFromText" /></para>
-		  </refsection>
-	</refentry>
-
-
-
-<refentry id="ST_AsEncodedPolyline">
-    <refnamediv>
-    <refname>ST_AsEncodedPolyline</refname>
-    <refpurpose>Returns an Encoded Polyline from a LineString geometry.</refpurpose>
-    </refnamediv>
-
-    <refsynopsisdiv>
-    <funcsynopsis>
-      <funcprototype>
-      <funcdef>text <function>ST_AsEncodedPolyline</function></funcdef>
-      <paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
-      <paramdef choice="opt"><type>integer </type> <parameter>precision=5</parameter></paramdef>
-      </funcprototype>
-    </funcsynopsis>
-    </refsynopsisdiv>
-
-    <refsection>
-    <title>Description</title>
-
-    <para>Returns the geometry as an Encoded Polyline.</para>
-
-
-    <para>Availability: 2.2.0</para>
-    </refsection>
-
-    <refsection>
-    <title>Examples</title>
-<programlisting>
-ST_AsEncodedPolyline(GeomFromEWKT('SRID=4326;LINESTRING(-120.2 38.5,-120.95 40.7,-126.453 43.252)'));
---result--
-|_p~iF~ps|U_ulLnnqC_mqNvxq`@
-</programlisting>
-</refsection>
-    <!-- Optionally add a "See Also" section -->
-    <refsection>
-    <title>See Also</title>
-    <para><xref linkend="ST_LineFromEncodedPolyline" /></para>
-    </refsection>
-</refentry>
   </sect1>



More information about the postgis-tickets mailing list