Guest User

Untitled

a guest
Apr 27th, 2011
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE OR REPLACE FUNCTION dump_linestring_points(geometry)
  2. RETURNS SETOF geometry AS
  3. $BODY$SELECT
  4. (
  5. 'SRID=' ||
  6. bar ||
  7. ';POINT(' ||
  8. foo ||
  9. ')'
  10. )::geometry
  11. FROM
  12. regexp_split_to_table(
  13. rtrim(
  14. substring(asewkt($1) from 23)
  15. ,')'
  16. ),
  17. ','
  18. ) as foo , srid($1) as bar
  19. WHERE st_geometrytype($1)='ST_LineString';$BODY$
  20. LANGUAGE sql IMMUTABLE STRICT
  21. COST 1
  22. ROWS 100;
RAW Paste Data