Hello everyone,

I received some good replies.  I'm not sure if people want
their names published since they sent the replies directly
to me but I am very thankful to them!

1)  You can use an SQL query:
>From tables: Layer1, Layer2
Columns: proportionoverlap(Layer1.obj, Layer2.obj)

Here's more on the ProportionOverlap function:
Purpose: Returns a number that indicates what percentage of
one object
is covered by another object.

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).

2) The ProportionOverlap function will do just this.
Just proceed as follows:
1. Query SQL Select
2. Select Columns : ...,
ProportionOverlap(YourLayer1.obj,YourLayer2.obj)
3. From Tables YourLayer1, YourLayer2
4. Where YourLayer1.obj Intersects YourLayer2.obj
And the results will be a percentage.

3)  I've cut and paste a bit of code below.  Its not too
helpful at first,
but it may point you in the right direction.

Basically you calculate the percentage overlap using the
formula
proportion * 100.

The code is cut and paste from a program, "table1ColAlias"
just means
the name of field I want from my "table 1".

I have a small MapBasic script here if you don't work it
out.


   Select table1ColAlias, table2ColAlias,

Sum(ProportionOverlap(table1ObjAlias,table2ObjAlias)*100),

Sum(ProportionOverlap(table2ObjAlias,table1ObjAlias)*100)
   From table1Name,table2Name
   Where table1ObjAlias Intersects table2ObjAlias
   Into qryResult
   Group by table1ColAlias, table2ColAlias


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Darrin
Clement
Sent: Monday, February 25, 2002 9:30 PM
To: Mapinfo-L@lists. directionsmag. com
Subject: MI-L area of overlap


Hello,

I have two sets (layers) of polygons.  For each polygon in
Layer1, I want to calculate how much of its area - as a
percentage - lies within any polygon in Layer2.  (Layer1
polygons are very small, Layer2 polygons are very big and
spread out.)

Does anyone have advice for how to accomplish this without
the MapBasic compiler?

Thank you in advance.

Darrin

----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97



____________________________________________________________
___________
List hosting provided by Directions Magazine |
www.directionsmag.com |
To unsubscribe, send e-mail to
[EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.


----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to