New answers tagged graph
I finally solved this using this scheme (not as simple as firstly expected): SELECT ST_X(geom) as value, ST_Y(geom) as datetime from ( select (ST_DumpPoints(simplifiedLine)).* as g1 from ( SELECT ST_Simplify(ST_MakeLine(the_geom.resulted), 15) as simplifiedLine FROM ( SELECT ST_MakePoint(value, extract(EPOCH FROM datetime)) as ...
In PostGIS a path is called line. You can use ST_MakeLine to conncat your points to a line. So extend your query with somthinge like: SELECT ST_Simplify(ST_MakeLine(POINT(value , extract(EPOCH FROM datetime)))) AS simplified_line FROM table; You should consider to define an order by clause.
Top 50 recent answers are included