If you're using PostgreSQL, it supports have array-valued columns. So
you could store your segment attributes in one (or more) arrays in the
same row as the base LineString.
Or, as you suggest you could also have a related segment attribute
table, and store a row for each segment of each LineString feature.
(You wouldn't necessarily have to store the segment geometry - you could
recover this easily from the parent LineString).
Alexandre Pretyman wrote:
Hello All,
I need a little insight modeling a problem. I have route wich is an
instance of the LineString class. I use this LineString instance to
project points against it to see how far inside the LineString the
point is. However, I need to have attributes associated with the
LineSegments of this LineString, but, as far as I understand, I can't
have attributes for line segments stored in a DB.
Is my only solution to break up the LineString into segments and
create separate LineString's on out of them with the respective
attributes (storing them in a separare PostGIS table, and use the big
LineString to do the point projection and the small ones to lookup the
attributes for the segment that the point is in?
Thank you,
Alexandre Pretyman
------------------------------------------------------------------------
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel