Hi Dan,
When you have selected the polyline use the F7 function to determine how
many 'sections' there are to the polyline.
If this value is not 1 then turn the node display for that layer on, zoom
the map reasonably close (you will be looking for overlaps and gaps), open
the mapbasic window and enter:
'--------------- Mapbasic Code Start -------------
Dim i as integer
'Change the following number to the section number to zoom to
i = 1
'Zoom to start section
set map window frontwindow()
center(objectnodex(selection.object,i,1),objectnodey(selection.object,i,1))
'Zoom to End section
set map window frontwindow()
center(objectnodex(selection.object,i,objectinfo(selection.object,21+i)),obj
ectnodey(selection.object,i,objectinfo(selection.object,21+i)))
'--------------- Mapbasic Code End -------------
then simply change the line:
i = 1
to the section number you want to find eg
i = 4
(remembering to hit the return key while the cursor is on the line to run
the code)
then place the cursor on one of the following line and hit return to run the
code
This uses the objectinfo,objectnodex and objectnodey functions to set the
centre of the current map. Syntax is as follows
set map window frontwindow()
center(objectnodex(selection.object,<<section>>,1),objectnodey(selection.obj
ect,<<section>>,1))
where <<section>> is an integer value from 1 to the number of parts
that make up the polyline
To zoom to the end of the line section use:
set map window frontwindow() center(
objectnodex(selection.object,<<section>>,objectinfo(selection.object,21+<<se
ction>>)),
objectnodey(selection.object,<<section>>,objectinfo(selection.object,21+<<se
ction>>))
)
for example if you find that your polyline has 3 parts to zoom to the start
of the third part you would enter:
set map window frontwindow()
center(objectnodex(selection.object,3,1),objectnodey(selection.object,3,1))
and for the end enter:
set map window frontwindow() center(
objectnodex(selection.object,3,objectinfo(selection.object,24),
objectnodey(selection.object,3,24)
)
If there are many parts it may be easier to type (and run) the following
into the mapbasic window:
Hope this helps
Martin
==================================
Martin Roundill
GIS Manager
Waitakere City Council
Private Bag 93109
Henderson
Waitakere City
New Zealand
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 12 December 2001 10:47
To: [EMAIL PROTECTED]
Subject: MI-L Polylines to Regions
I have a closed polyline representing an area. When a select the polyline I
can
see that the entire polyline is selected as is one entity. However when I
try to
convert this polyline to regions strange lines appear that were not there
before
and shoot through the polygon. I'm assuming it's because the polygon is not
completely closed or that there is a break in the polyline somewhere? Has
anyone ever had this problem before? Are there any solutions that would fix
my
polylines so that I can convert to regions properly?
TIA
Dan
_______________________________________________________________________
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.