pgRouting Manual (2.3)

pgr_textToPoints - Deprecated Function

«  pgr_pointsToDMatrix - Deprecated Function   ::   Contents   ::   pgr_apspJohnson - Deprecated function  »

pgr_textToPoints - Deprecated Function

Warning

This function is deprecated!!!

  • Is no longer supported.
  • May be removed from future versions.
  • There is no replacement.

Name

pgr_textToPoints - Converts a text string of the format “x,y;x,y;x,y;...” into and array of point geometries.

Synopsis

Given a text string of the format “x,y;x,y;x,y;...” and the srid to use, split the string and create and array point geometries.

The function returns:

integer pgr_textToPoints(pnts text, srid integer DEFAULT(4326))

Description

Parameters

pnts:text A text string of the format “x,y;x,y;x,y;...” where x is longitude and y is latitude if use values in lat-lon.
srid:integer The SRID to use when constructing the point geometry. If the paratmeter is absent it defaults to SRID:4326.

History

  • Proposed in version 2.1.0

Examples

SELECT ST_AsText(g) FROM 
    (SELECT unnest(pgr_texttopoints('2,0;2,1;3,1;2,2', 0)) AS g) AS foo;
NOTICE:  Deperecated function: pgr_textToPoints
 st_astext  
------------
 POINT(2 0)
 POINT(2 1)
 POINT(3 1)
 POINT(2 2)
(4 rows)

«  pgr_pointsToDMatrix - Deprecated Function   ::   Contents   ::   pgr_apspJohnson - Deprecated function  »