Lorne,

1 - If you are sure that the end=start lines exist as lines, then you can
add as an extra condition that objectlen(obj,"m") be > 0 to exclude them

2 - The implementation by MI of the notion of centroid for lines and plines
is different from that for regions. One one hand, centroids of lines and
plines are not displayed in a mapper with the option Display | Centroids,
even though they exist (centroidX gives the right answer). If one could
imagine that the centroid of a line is really the mid-point of the segment,
it is not the same for a pline because in MI terms the centroid must be "on
the line" and not floating around it. It cannot be altered graphically and
no provision is made in the various MB functions to do it.

On the other, centroids of regions can be specifically set by the user
either by interactively changing its position (show centroids, select a
region, reshape, click and drag the centroid) or via object creation (create
region...) or edition (alter object...). With both techniques, the centroid
must remain in the region.

There does not seem then to be a way to change the centroids of lines or
plines.

A possible (horrible) work around would be to transform your lines
(xs,ys,xe,ye) into "degenerated" regions (1 polygone, 3 points:
xs,ys,xe,ye,xs,ys) with center at (xs,ys). But as the tools to do it are in
the form of statements and not of functions, they cannot be used with the
update menu command or from the MapBasic window. You will have to write a
MBX just for that.

Jacques Paris

[EMAIL PROTECTED]

MapInfo Support: http://www.paris-pc-gis.com



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Lorne Ketch
Sent: July 31, 2001 7:30 AM
To: [EMAIL PROTECTED]
Subject: MI-L SQL 'Intersects" Query ... Line Centroids





I've found a number of references on Mapinfo-L to both of my questions but
not an exact answer.

1.  I have a table of line objects (2 node lines not polylines). The lines
represent the movement of a storm centre. In most cases, the lines have a
length but occasionally, the start and end points are the same... storm is
stationary.  I am doing an SQL 'intersects' query that attempts to find all
lines that touch or move into a closed region.
  Select * from LineTable, RegionTable where LineTable.Obj intersects
RegionTable.Obj into Selection
The selection works well and gives the desired results most of the time.
However, occasionally a few stray lines from outside the region are included
in the selection... in all cases, those lines are the zero length ones.  I
have tried changing those lines to points... the selection will correctly
exclude the points.  Is there a problem here with the zero-length line and
Mapinfo 5.0?

2.  Can one change the centroids of the lines above from the centre of the
line to the start?  I would like the autolabels to lie at the beginning of
the lines.

Thankyou

Lorne



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

Reply via email to