Sid,
MapInfo 7.5 and later allows you to do this:
1. Draw 1 line horizontally, long enough to intersect your region at all points
when rotated.
2. Open MapBasic window:
dim nrows as integer
3. Copy/paste line. You need something like:
nrows = tableinfo(yourtab,8)
'no. rows in tab
Select * from yourtab where rowid=nrows into lastrow 'selects
last row
insert into yourtab (obj) select obj from lastrow
close table lastrow
Select * from yourtab where rowid=nrows+1 into lastrow 'rselect
new last row
4. Right click > Edit Objects > Rotate > pick anchor from map; lock anchor; 1
deg.
You might have to play with this a bit to get it right.
THis will paste the correct code into the MB window.
5. Close table lastrow
6. Select the lines in steps 3-5 from mb window and hit ENTER 359 times ;-)
7. When finished, select all your lines and SET TARGET. Select your region and
Erase Outside.
8. Add a column to your Lines table as "RadialLength" say.
Update yourtab set RadialLength = ObjectLen(obj,"units")
There may be an eaasier way to copy/paste line repeatedly, but cant think of
one right now. (edit Objects > Offset has an option to copy but not sure if you
can set the anchor at the desired end). You could try selecting, say 10 deg
worth of lines in step 3. If you want each radial identified properly, add and
id variable and an id column to the INSERT at step 3.
Only problem is you may need to do some editing if any line intersects the
region in more than 2 places (or that might be what you want).
If you dont have 7.5, it is still possible with the CreateLine( x1 , y1, x2 ,
y2 ) at step 4. and some trig to calculate x2,y2 each iteration..
Phil Waight.
_______________________________________
SPATIAL PROJECTS
Email : [EMAIL PROTECTED]
Web: www.spatialprojects.com.au
----- Original Message -----
From: Sid C
To: [email protected]
Sent: Thursday, May 05, 2005 1:56 AM
Subject: MI-L Draw Radials
Hi,
How do I draw radials at each degree from any given point in a region,
and calculate the distance between the point and region boundry.
Thanks in advance
Sid
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16357