Skip to content

Instantly share code, notes, and snippets.

@bitner
Created April 5, 2012 15:34
Show Gist options
  • Save bitner/2311990 to your computer and use it in GitHub Desktop.
Save bitner/2311990 to your computer and use it in GitHub Desktop.
PostgreSQL/PostGIS PL Functions for dealing with 4D Track Data
CREATE OR REPLACE FUNCTION everynseconds(geometry, integer)
RETURNS geometry AS
$BODY$
SELECT
st_makeline(st_locate_along_measure($1,g))
FROM
generate_series(0,floor(st_m(st_endpoint($1)))::int,$2) g;
$BODY$
LANGUAGE sql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment