Hi Fiaz,
I've come up with the following. This could probably be done more accurately programmatically or using an alternative but see what you think.
- Rotate the polygon so that the polygon is on its side (with its straight edge running east-west). I did this by trial and error but you could calculate the angle beforehand. Use the Rotate Object that comes with the Map Cad tool.
WARNING: choose the anchor point carefully when rotating; you will use this same anchor point later when reversing the rotation.
- Use Grid Maker to create very small grid regions that cover your polygon – the smaller the more accurate.
- Delete grid regions that are outside your region.
- Perform a group by to find the min and max row value of each column:
Select Col_Name, Min(Row_Name) "MinRow", Max(Row_Name) "MaxRow" from Grid group by Col_Name into GridRowMinMax
- Perform a query that returns the middle row value:
Select Col_Name, MinRow, MaxRow, Int((MaxRow-MinRow)/2)+MinRow "MidRow" from GridRowMinMax into GridRowMinMaxMid
- Save this query and open as a new table
- Join this query to the Grid table:
Select * from Grid, GridRowMinMaxMid where Grid.Col_Name=GridRowMinMaxMid.Col_Name And Val(Grid.Row_Name)=GridRowMinMaxMid.MidRow into MiddleGrids
- Save the results and open as a new table
- You might then convert these to points perhaps (for greater accuracy)
Update MiddleGrids Set obj = CreatePoint(CentroidX(obj),CentroidY(obj))
- Then buffer the points to create your 5-foot-wide track:
- Erase Outside to straighten the end points if desired:
- Finally, return the object to the correct rotation (using the same anchor point as that used in step 1):
------------------------------
James Nolet
Dooley Mitchell & Morrison Pty Ltd
Mentone, VIC, Australia
------------------------------
Original Message:
Sent: 02-20-2020 07:18
From: Fiaz Hussain
Subject: Splitting an Irregular Shape polygon into two equal Parts
Hi
I need to Split an irregular shape polygon into exact two halves. The one of the sides of the polygon is straight however the other one is curved around an existing track as can be seen below. I need to carve a track of 5 feet wide through the middle which should split the polygon into two equal parts. Any ideas would be very much appreciated.
------------------------------
Kind Regards,
Fiaz Hussain
------------------------------