Hello Keith,
Open your MapBasic window with "Options > Show MapBasic Window..." and enter
the following diabolic incantation:
insert into windowinfo(frontwindow(), 10) (obj) values
(MBR(createline(tableinfo("YourTab", 20), tableinfo("YourTab", 21),
tableinfo("YourTab", 22), tableinfo("YourTab", 23))))
This will create a rectangle in the cosmetic later for the raster table
"YourTab".
If you have MapBasic, you can write a program to neaten this code and use
definitions instead of numbers for the calls to windowinfo() and
tableinfo().
If you want to know what's happening, the call to windowinfo() is getting
the name of the cosmetic layer for the active mapper window. The code is
then performing an SQL INSERT into this table, with the only field being a
map object. The map object itself is a bit complicated because MB does not
have a createrect() function. So, I am creating a line from the bottom-left
to top-right corners of the table coverage (and your raster) extent and then
asking Pro to give a minimum bounding rectangle for this line - effectively
making the rectangle required. The four calls to tableinfo() retrieve the
MinX (20), MinY (21), MaxX (22) and MaxY (23) extents of the raster table.
Regards,
Warren Vick
Europa Technologies Ltd.
http://www.europa-tech.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Keith
Holswich
Sent: Friday, March 01, 2002 7:57 PM
To: [EMAIL PROTECTED]
Subject: MI-L Raster Outlines
Good morning to you all
Is there any guru out there who can tell me how to automatically
obtain the extents of a raster image and show as a polygon outline.
We have many layers of overlapping raster images of various dates,
series, resolutions etc. I would like to be able to see pictorially on
the screen the extents of these without displaying the actual raster
image.
At the moment, I can manually create a polygon around each image
and load up with metadata, but there must be an easier way.
Replies directly to me please and I will summarise
Thanks for your help
Keith Holswich
New Plymouth
New Zealand
[EMAIL PROTECTED]
_______________________________________________________________________
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.
_______________________________________________________________________
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.