When I needed to do automatic well-spotting in a PLSS section, I first got the MBR of the section. Then I checked each node in the section polygon to find the closest one to each corner. These I'd put into a four element array where I would ensure that the node id in corners(1) was the closest to the SW corner, corners(2) was SE, corners(3) was NE, and corners(4) was NW. Except for the side where node 1 might be an endpoint, the problem is otherwise pretty easy to solve.
On Thu, 29 Jul 2004, Cummings, Mike wrote: > Using mapbasic, I need to find the midpoint of a side of a region. I > thought I had a solution; but, I run into a problem when the node I need > to use have numbers like 7-8-1-2. Where the region, for example has 9 > nodes & where nodes 1 & 9 are the same point. Points 2 & 7 are corners. > I have been able to find the endpoints/corners and had thought I could > use the for..next and Alter object XX node add to create a polyline. > Then just find the centroid of the polyline. > > Well, it does work for three sides because the node numbers are in > "order". It's that fourth side that I don't know how to code, since the > number of nodes and the starting location varies. If I knew that the > last/first node would always be a endpoint, I could test for it and > replace the node/number to get the correct order; but they may not be. > > Does someone know the way to do this? > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Message number: 12803 > > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12804
