0

I have a lot of points with a GPS tracker and I need to simplify them.

I create view (location_view) in PostgreSQL (with PostGIS):

 SELECT location.id,
    location.added,
    location.latitude,
    location.longitude,
    location.pulse,
    location.speed,
    location.device_id,
    st_makepointm(location.latitude, location.longitude, (location.id)::double precision) AS point
   FROM location;

I used SQL:

SELECT st_simplify(st_makeline(d.point), 0.0001) from location_view d 

And next I got LineString value and brought line to the map. But LineString сontains only coordinates. I need date in point.

How to add date to Point/LineString?

4
  • do you have a date in the location table?
    – Ian Turton
    Dec 10, 2018 at 10:05
  • yes, column location.added
    – lampa
    Dec 10, 2018 at 10:11
  • do you want to add the date to each individual point of your GPS track, or for the whole track one date?
    – Michael
    Dec 10, 2018 at 12:01
  • to each individual point of my GPS track
    – lampa
    Dec 10, 2018 at 12:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.