This question already has an answer here:
I have a bunch of points in a text file that are represented using lat long (116.3158516 39.9748016). I import them into my GIS enabled database and create trajectories using st_makeline() as geometries projected in EPSG:4326. I'm using geometry here because all the GPS data falls into an area that is 50km^2: correct me if this is my first mistake.
Now I'm doing things like calculating trajectory length (st_length) and simplifying the geometry using st_simplifypreservetopology() but according to the documentation the results for the length and the tolerance for the simplification are in the coordinate system of the data; which in my case is degrees. This obviously doesn't make sense. I need it to be in meters.
Do I need to change the way I'm storing my data or do I need to convert my trajectories and points into something else before feeding them into the st_length() and st_simplifypreservetopology() functions?
Thanks in advance.
Screenshot for Mike T.