I thought you could probably you could do it in the following way.
1. select the polygon (easy)
2. programatically select the adjacent polygons (intersect select)
3. load these into an array of objects
4. convert these objects to polylines (ConvertToPline)
5. erase each of the polylines outside of the original one (OverlayNodes,
Objects Intersect)
6. measure each of resulting objects ObjectLen()
7. the longest would identify the one to merge
8. merge that object with the original (easy)
interesting bug though, the object erase command may erases the last common
node along the side it intersects with, making it a short. I'm sure that a
workaround could be done with narrow buffers.
Good luck
R
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Stokes
Jonathan
Sent: Thursday, November 30, 2000 3:18 AM
To: MapInfo-L (E-mail)
Subject: MI-L Replicating ArcInof Eliminate Function
hello
does anyone (or has anyone done this) know a method of replicating the PC
Arc/Info eliminate function in MapInfo/Mapbasic. The function basically does
this.
The user selects a set of polygons from a coverage. These polygons are then
merged with adjacent polygons. This is done by looking at the length of
boundaries with adjacent polys selecting the longest one and removing it to
merge those two polygons.
so what i would need to do is the following
1) Select a polygon to merge (Easy)
2) Find out which Polys Are adajcent to this Poly(Again Pretty Easy)
3) Find out which poly it shares the longest boundary (can't work out how to
do this)
4) Merge those two polygons (easy).
I can do this in PC ArcInfo at the moment but it involves a lot of format
translation hassle and i am curious to see if it can be done in mapbasic.
cheers
Jonathan
Jonathan Stokes
GIS Analyst
Mail: [EMAIL PROTECTED]
Web: www.geoplan.com
Phone: +44 (0) 1423 722715
Fax: +44 (0) 1423 819494
Yellow: Marketing Information Limited.
Bilton Court,
Harrogate,
North Yorkshire.
HG3 1GP
UK
Confidentiality: This e-mail and its attachments are intended for the
above named only and may be confidential. If they have come to you in error
you must take no action based on them, nor must you copy or show them to
anyone; please contact the sender immediately and delete the email.
Security: Please note that Internet e-mail is not a 100% secure
communications medium. We advise that you understand and observe this lack
of security when e-mailing us.
Viruses: We have taken steps to ensure that this e-mail and attachments
are free from any virus, we advise that in keeping with good practice the
recipient should make a further virus check.
The Company: Neither Yellow: Marketing Information Limited, nor any of the
associated divisions accepts responsibility for the contents of this
message. Any views or opinions contained in this email are solely those of
the author unless expressly stated otherwise.
_______________________________________________________________________
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.