Ben,

am doing something v similar at the moment (but with mineral veins and ore
bodies rather than highways.)

You can use the  'buffer then proportion overlap' methods already suggested
but you could also try teh following...

extent  is the highwayextent table, road is teh unadopted road table. ID is
an identifying column.


Select road.ID, ObjectLen(intersectnodes(extent.obj,road.obj, 7),
"m")"Roadoverlap", ObjectLen(road.obj, "m")"Roadlength" from extent, road
where extent.Obj intersects road.Obj into myresults

now run a simple select on the result

select Road.ID from myresults where roadlength/roadoverlap > 0.5 into
adoptnow

(save the sql template if you are doing this kind of thing a lot...it makes
life easier..)

hth

R





-----Original Message-----
From: Ben Crane [mailto:[EMAIL PROTECTED]
Sent: Friday, July 04, 2003 7:25 AM
To: [EMAIL PROTECTED]
Subject: MI-L Re: Majority contain SQL?


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


*********************************************************************
This e-mail message, and any files transmitted with it, are 
confidential and intended solely for the use of the addressee.
If this message was not addressed to you, you have received
it in error and any copying, distribution or other use of any
part of it is strictly prohibited. Any views or opinions presented
are solely those of the sender and do not necessarily represent
those of the British Geological Survey. The security of e-mail
communication cannot be guaranteed and the BGS accepts
no liability for claims arising as a result of the use of this medium
to transmit from or to the BGS. The BGS cannot accept any
responsibility for viruses, so please scan all attachments.
http://www.bgs.ac.uk
*********************************************************************


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7498

Reply via email to