Quantcast

Re: Modeling a Route (LineString) with attributes for the segments.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modeling a Route (LineString) with attributes for the segments.

Alexandre Pretyman
Thanks Bryce and Martin.

I've been looking into this solution and I guess a SequencedCoverage would only need to check if the end Coordinate of curve N1 equals the start point Coordinate of cuve N2, right? Is it as simple as that or is there any catch that I'm missing?

These Curves would be a class containing a LineString with the set of attributes that I want store about them.

Alex.

----- Original Message ----
From: Bryce L Nordgren <[hidden email]>
To: JTS Topology Suite Development <[hidden email]>
Cc: JTS Topology Suite Development <[hidden email]>
Sent: Tuesday, June 17, 2008 5:57:32 PM
Subject: Re: [jts-devel] Modeling a Route (LineString) with attributes for the segments.

Short answer, yes your solution is probably the shortest path to working
code.

Conceptually, you're describing a discrete curve coverage with a rangeType
containing whatever your attributes are.  Your "little
LineSegments"+attributes would be the associated set of CurveValuePairs,
and yes they could be implemented naturally as a table.

Unfortunately:
      1] The coverage type does not require that its CurveValuePairs be
contiguous, and so would not assemble your big LineString from the pieces.
      2] The coverage type is not part of the Simple Feature Access set of
specifications, which is what JTS/PostGIS is based on.

If, however, you're interested in modeling your way out of this mess, what
you would need to do is to create a specialization of a discrete curve
coverage which forces its CurveValuePairs to be contiguous, and which does
assemble all the pieces into one big curve.  You'd then need to implement
the curve coverage and your specialization in whatever platform you're
using.

And when you're done, you'd have a nice generic solution which would
automatically do what you just suggested to do manually. :)

Interesting timing.  I'm pondering how to add simplistic coverage
functionality to the SFA specs.

Bryce

[hidden email] wrote on 06/17/2008 01:02:36 PM:

> 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
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/jts-devel

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel


_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Loading...