[postgis-users] Need some help with storing line segments

Ehud Shabtai eshabtai at gmail.com
Tue Jul 19 02:25:35 PDT 2005


Hi,

I'm new to postgis and this is my first usage of it. I read the
documentation, but I could not find a way to store the data I want (in
the way I want it).

Here's the story:

I got some GPS tracks which I want to store in postgis. Before I store
them, I do some processing and build line segments from the separated
GPS points. Now, I'd like to store these lines in postgis, but I'd
also like to keep attributes for each node of the line (node id, time,
direction for next node, etc').

The only way I see it is to store each point twice, first as a point
with some attributes and then as a line. The problem with this
approach is that I'd like to be able to update the coordinates of a
specific point, which will result in searching for the line consisting
this point and then updating the line.

Is there any better approach to sore my data?
Can I update a specific point of a line in postgis, or the only way is
to get all the points of a line and create a new one?

Thanks,

Ehud.



More information about the postgis-users mailing list