you could perhaps just use contains, which would give you those segments where the centroid of roads is within the highways - assuming that if the centroid is in the highways, the majority of it is?
Or perhaps you could use the proportionoverlap function to give a table of the proportion of the road segment that is covered, and then figure out a way of filtering that to give the highest proportion for each road segment. It is supposed to wtill work with lines or at least doesn't say it doesn't.
eg select roadsegment.ID, highway.ID, proportionoverlap(roadsegment.obj,highway.obj) from roadsegment, highway where col3 > 0.5
I've often lamented that SQL doesn't have a largest function, where the record with the largest value of the field is the one that is retrieved. max() just gives the maximum of the group.
perhaps.
R
Syntax
ProportionOverlap(object1,object2)
object1 is the bottom object (not text or points) object2 is the top object (not text or points)
Return Value
A Float value equal to Area(Overlap(object1,object2) ) / Area(object1).
On Thu, 3 Jul 2003 23:25:28 -0700 (PDT), Ben Crane <[EMAIL PROTECTED]> wrote:
Hi all,
Anyone know how to do a SQL statement that looks for the majority of an object within another? I have a table of road segments, and a table of highway extents (adopted highway). I need to check whether the road segments just intersect (and therefore are not adopted highway) and those where the bulk of the road segment object is within the adopted highway table.
I can't use contain entire or contain part since even the slightest touch counts...I'm looking for a function that deems the majority of an object is within another (say 50% plus)?
Ben
__________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 7493
--
Robert Crossley Robert Crossley & Assoc 9 Short St New Brighton 2483 Far Southern Queensland AUSTRALIA
P: 02 6680 1309 F: New Connection M: 0419 718 642 E: [EMAIL PROTECTED]
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 7495
