Subscribe to this thread
Home - General / All posts - split a poly with parallel line to a particular area?
Sev
462 post(s)
#29-Apr-19 05:17

Hi everyone, just curious to know if it's possible to have a rectangular poly split with a parallel line (or more) of one of the sides to a specified area?

I have had a client ask about putting in fencing in a large paddock (>4000ha) to make it a number of say 500ha paddocks. It would be important to have the internal fencing parallel with a selected side (or entered heading).

Thanks!

tjhb
10,094 post(s)
#29-Apr-19 05:21

Very possible, but you'd be lucky to get it for free.

ColinD

2,081 post(s)
#29-Apr-19 05:41

If I were to tackle this I would determine the boundary size of the 500ha paddock then create two arrays, one at 90 deg to the other with one set to the desired edge bearing. Then split the big paddock by the arrays. Could take some fiddling to avoid edge partial size paddocks.

http://www.georeference.org/forum/t54145.8#54161


Aussie Nature Shots

tjhb
10,094 post(s)
#29-Apr-19 06:57

The boundary lengths of each (say) 500ha paddock will depend on its own size and the size of the containing paddock (say 4000ha) and its shape. Also (related) which boundary should be preferred for alignment (or a bearing).

It's only maths but not necessarily trivial. A simple solution could produce gibberish.

tjhb
10,094 post(s)
#29-Apr-19 07:14

If you chose the boundary for alignment, and measured its length, you would get the width for subdividing paddocks (w = A / b). Then a rotated and repositioned grid would work OK. That's one subdivision.

tjhb
10,094 post(s)
#29-Apr-19 07:29

(Pretty much what Colin said.)

Sev
462 post(s)
#29-Apr-19 08:17

Ok, so I assume an array is a grid?

Ill have a play, thanks for the info.

Sev
462 post(s)
#06-Nov-19 07:44

Hi Colin, just having a look at this, what do you mean by array? Did a bit of a search in the help file to no avail........I was wondering about creating a (say 1ha each) grid for the poly and trying to get as close to the same number in each of the divisions...a bit clunky but close...

Dimitri


7,413 post(s)
#06-Nov-19 07:56

what do you mean by array?

I think he just means an arrangement of lines that subdivide the region into smaller rectangular regions. I don't think he means it as a technical word such as an array in some programming language.

Sev
462 post(s)
#06-Nov-19 09:42

Ok, thanks Dimitri, I'll have a play, then come back with questions and even less idea of what I'm doing....

ColinD

2,081 post(s)
#06-Nov-19 11:22

Hey Sev, I've attached the M8 query that should do the trick a bit faster than Dimitri's longhand suggestion. Yes start with a line snapped to the side of the paddock you want to start from and work from there. I hope all is well in wonderful St George despite the dry!

Attachments:
CreateArray.txt


Aussie Nature Shots

Sev
462 post(s)
#08-Nov-19 07:42

Thanks Colin, starting to sink in what to do! A couple of comments on the editing process if you have time.

  • I have got the query working, so lets say I want to split a 5000ha paddock into 6/833ha paddocks, so I create a line along the boundary I'm using as a reference (longer so it ends up outside the poly, have a stab in the dark with the offset, I know the direction and I know the copies. So when I run the query, I get 4 lines created over the paddock.
  • The next step is more difficult, because of the irregular shape of the area, I need to move the lines and measure the area of each individual parcel where it's crossing the poly.......and ideally I need to measure this before splitting the poly to measure. Is there a neat way to do this? I was looking at the format toolbar to create a point on the intersection of the line over the area edge, but doesn't seem possible...?
  • If I can accomplish the above point, then I can do a "split with" to complete the task.

Screenshot added to help explain...

Attachments:
Manifold 1.jpg

ColinD

2,081 post(s)
#08-Nov-19 22:57

Make the starting line clipped to the width of the paddock.

For later splitting you will need to snap a bit of line to each end and use the join lines transform. Use COGO tools if the added bit of line needs to be on the same bearing.

You have the length of one side and the target area so the required spacing up to the angled drop in paddock width can be worked out.

Can't help with the angled bit. You'll need to use a bit of Pythagoras and trigonometry to work out the spacing for the next line.

Then continue as per the start for the last section.

Email me the paddock drawing if you need further help.


Aussie Nature Shots

Sev
462 post(s)
#09-Nov-19 01:18

Ok, I've got it sorted. Here's my workflow.

I didn't like the idea of having to do manual calculations. I want manifold to do that for me.

  • I created the line, which extended beyond the bounds of the paddock (poly).
  • I then used the query (although I could have done this manually as per Dimitri's post, but this was easier, and created a number of lines parallel to the side of the paddock, but instead of just doing the number of divisions I guessed I needed, I did one every say 1m.
  • I then did a "Split with" on the poly, which created a huge number of narrow polys. Then delete the lines.
  • I then created a viewbot, with the Area(i) sum/selected/autorerfresh settings
  • Then by using the select(add) or select containing to get close to the correct area, I simply kept adding slivers until I got to the required size!
  • Once that was established (I could even take the split further on a single sliver of poly if required, but not necessary as one hectare is 1m for 10km, so it's accurate enough in this case, I did a "Union" of the selection with the transform bar, and it's back to the single poly at the correct size.

Thanks for the assistance with this, hopefully others will get some benefit also (at least until the new version caters for it!)

Attachments:
Manifold 2.jpg

tjhb
10,094 post(s)
#09-Nov-19 01:33

That is a quite clever heuristic.

Aiming higher (to achieve accuracy better than 1m x area width) would require some serious coding using integral calculus. Speaking just for myself I would find that pretty hard (and it would cost significant time).

You've achieved exactly the same thing to a quite reasonable precision.

Nice job!

Sev
462 post(s)
#10-Nov-19 05:49

Thanks Tim, mind if I frame that comment??

tjhb
10,094 post(s)
#11-Nov-19 00:18

I thought about your example overnight, and it could be mainly automated:

First the manual part. Draw your starting line (more or less parallel to one side), then draw a medial line at right angles to that, roughly bisecting the area to be divided. (This could also be automated, but the result might not be quite as good as judging by eye.)

Now the automated part. Segmentize the medial line at a chosen length (e.g. at 1m as in your example). Draw points at the end of each segment. Subdivide the area into Voronoi areas for the points. Record the area of each Voronoi area as an attribute. These steps can all be done in SQL.

Next, use a script to step sequentially along the segmented medial line, adding Voronoi areas up to the required size for the first parcel, iterating for the next parcel, and so on. In other words, exactly what you did manually with a ViewBot.

That would not be too hard at all. If you had to do a lot of these, the automation could be worthwhile.

Sev
462 post(s)
#11-Nov-19 07:25

Just had a manual play with that idea, and I hadn't done anything with Voronoi's before....but it works really well, as you already knew...the only issue is how do you get the areas to extend and clip to the area extent? In my example, it seemed to create a rectangle...see screenshot....

Is there any reason the query above couldn't be added to to create the same result? For instance, it has the heading, if it were run, and the parameters could be entered for copies, and offset (distance apart), the desired area and a length to add to each end of the selected line. Then the lines created could be used to create the sliver areas (another benefit is it wouldn't have the 1/2 sliver at the start & end (Between Voronois)). Then do the step sequentially away from the line totalling areas to get to the desired size (I have no idea if this is even possible, and I assume it's why you are suggesting your method).

Probably not worth it just for me, as I won't be doing too many of these, but if you want to have a go I'd be keen to test.

Thanks for the insights...

Attachments:
2019-11-11_171327.jpg

Sev
462 post(s)
#13-Nov-19 11:01

Not sure if this should be here or in a new post, but what would be nice would be either as part of the createArray.txt above or in a separate query (or perhaps a transform tool I'm not aware of!) be able to extend the line created to do the array, so that it didn't have to be manipulated (shifted) to get it to cover the area being split. It's the only thing about the process I found difficult, as I couldn't get it to snap back onto the poly I was trying to split. I used the cogo tools to make it longer, but could only do it to one end, then had to ctrl/shift it along so it covered the area...hope that makes sense.

I didn't really like creating more than the end nodes either, as I was worried the line created may not have been perfectly straight. At least with only a node at each end, it has to be straight.

tjhb
10,094 post(s)
#13-Nov-19 22:12

I'm not sure I follow here. Sorry.

You are I think talking about (a) using the old query posted by Colin here, and then the ViewBot approach, is that right? Or are you thinking of (b) the Voronoi approach?

If it's (a), then would it help to simply scale all the copies of the line by a constant factor? That would be easy.

BTW, would you like a version of the query for Manifold 9? The code would be quite a bit cleaner, a good example of the improvements.

If it's (b), then let's talk about that. The scaling then needs a trick, but it is not difficult. I need to refresh my memory (and retest), but I think the trick is simply to scale the original object by a factor of 3 before drawing the Voronoi diagram.

ColinD

2,081 post(s)
#14-Nov-19 07:21

If I have it right, with your method Sev, it doesn't matter if the lines are much longer than the width of the area being split.


Aussie Nature Shots

Sev
462 post(s)
#14-Nov-19 22:48

Sorry Tim, I’m not explaining this particularly well. I’m looking at the query Colin posted, and using a. Manifold 8.

When you say scale, will that simply extend the length of the line. As Colin indicates below, I need to extend it to be longer than the area I’m splitting. If I can have a field to enter how much longer that would be neat.

tjhb
10,094 post(s)
#14-Nov-19 23:55

Yes, that's right. That's easy to add. Would you rather Manifold 8 or Manifold 9 (or both)?

Sev
462 post(s)
#15-Nov-19 00:10

I’m using 8....may update but from my understanding 8 is more suitable for my type of work? Happy to be corrected....

tjhb
10,094 post(s)
#15-Nov-19 00:53

No one can judge that for you but I predict that you will eventually want and need to migrate to 9, if only because data is always getting bigger, and time ever more valuable (or so we like to pretend, perhaps it is just the ageing process). Since the move to 9 is huge, you are better to start early and slowly so that the learning curve can be gentle. Viewer makes that possible with zero outlay. In sum I think anyone would be nuts not to be trying small things out in Viewer at their own pace and following development. (And helping to shape it, since that is free too.)

Sev
462 post(s)
#26-Nov-19 03:05

Hi Tim, I have just upgraded to 9 (still have my v8 copy activated), and am having a play. I opened the project, and notice that the transform "Split with" is not available...or am I missing something? Seems so different to work in. The reason I wanted to get 9 to have a go is that the split with transform in 8 seems like it was going to take a few hours at least to do the 1m split over 4000ha.

tjhb
10,094 post(s)
#26-Nov-19 06:05

Sev,

The last thing you should do with 9 is treat it like a new version of 8. It's a new and different product, a much more powerful tool, and that's the only sane way to approach it.

You should start with page one of the Manifold 9 manual, reading everything at first. If you assume you know nothing, you'll be pleasantly surprised (because there are some superficial similarities which help).

Detail though: the Split With transform in 8 does not have a direct equivalent in 9. Maybe it will come.

In the meantime you could try approaching it as a Bounded Areas problem (using only lines) or a Topology Overlay problem (using areas). Both of those things are implemented in 9, and much faster than in 8.

Sev
462 post(s)
#26-Nov-19 07:09

Thanks for the heads up, and I certainly have no delusions of adequacy, so not difficult for me to assume I know nothing!

I'll try the Bounded areas etc and see how I go....and start reading the manual.....

Thanks.

tjhb
10,094 post(s)
#26-Nov-19 07:17

Well I hope you will need help because if I pretend to know the answer I might learn something.

ColinD

2,081 post(s)
#09-Nov-19 07:42

Very neat example of manual integration.


Aussie Nature Shots

Sev
462 post(s)
#10-Nov-19 05:53

Thanks for the assistance Colin, occasionally I get an epiphany!!

Sev
462 post(s)
#08-Nov-19 07:47

All is well in St George, but it is crazy dry, we've never seen anything like this, and I've been here since 1977!

Hope all is well down your way (are you still just outside Sydney somewhere?)

adamw


10,447 post(s)
#29-Apr-19 10:11

This is not the first time we hear of such a task, so we will try to add a query function to split an area with verticals / horizontals into parts of specified proportions in the future.

In the meantime, your case seems to be much simpler than the general case - your area is rectangular, is that correct? With boundary lines aligned to the axes too, maybe? (If not, that's not a big deal, you can rotate the area to make them aligned.) If that's the case, it would be pretty simple to write a script to divide such an area with vertical (or horizontal) lines in specified proportions.

Sev
462 post(s)
#30-Apr-19 12:43

Sorry, I was just using the rectangle as an example, I'm looking for a way to do it on irregular shapes.

Dimitri


7,413 post(s)
#06-Nov-19 08:04

Scripting would be more elegant, of course, but then there's always a brute force approach with point and click editing that might be quicker.

1. The arrangement of grid lines is supposed to be parallel to some side of the paddock. OK. Pick that side and in a new layer draw a line that uses snap to duplicate that desired side (a straight line segment).

2. Calculate the spacing you want between lines in that direction.

3. Copy the line you just drew, and then shift the drawn line the desired spacing direction one step.

4. Paste the copied line. You now have two parallel lines, one desired interval apart. Copy those.

5. Shift the two lines twice the interval. Paste. You now have four parallel lines the desired interval apart.

6. Repeat that until you have enough parallel lines that extend all the way across the paddock.

7. Using copy and shift, make copies that extend those lines in the direction of the lines up and down so you have what appear to be longer parallel lines that completely cover the paddock in the direction of the lines.

8. Copy all those, rotate the lines 90 degrees, and then paste the lines previously copied. You now have a big checkerboard of lines perpendicular to each other that completely cover the paddock.

9. Make enclosed areas from that checkerboard.

10. Use the original paddock to clip those enclosed areas. You now have a checkerboard of square areas that align to the desired side of the paddock and which have been clipped to be inside the paddock.

The above is a thought experiment, not something I've tried in real life. But I've done similar things and it goes remarkably quickly, probably faster for a one-off than writing and debugging a script. :-)

Mike Pelletier

2,122 post(s)
#06-Nov-19 15:06

Glad to see your thinking this way Dimitri. I'm a fan of a CAD/Graphics/Presentation (a little GIS too) program called Canvas and often do exercises like what you described. This kind of quick gymnastics of draw, shift, align, copy, paste, group, rotate, split, combine, and repeat creates a blissful feeling of euphoric productive harmony :-)

Sev
462 post(s)
#08-Nov-19 07:45

Yep, I'm following your description ok thanks Dimitri, I actually don't need the perpendicular lines for the way I'm splitting the area. What I do need is a way to measure the areas within the lines before splitting the poly, so I can make sure the areas are correct. Hope that makes sense. I have a screenshot in a reply above if it helps...

BerndD

162 post(s)
#01-May-19 12:27

I second this.

This would be a very useful feature.


Organizations that want to adapt to CHANGE are using products that can adapt.

www.yeymaps.io

danb

2,064 post(s)
#01-May-19 19:07

This would be a very useful tool. The additional options provided by the ArcGIS tool would also be great additions.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/About_dividing_parcels_by_area_in_the_parcel_fabric/001t000003wp000000/


Landsystems Ltd ... Know your land | www.landsystems.co.nz

Sev
462 post(s)
#13-May-19 09:46

Yep, that link shows pretty much exactly what I'm after. Very useful.

dchall8
1,008 post(s)
#13-May-19 22:52

When fencing is involved with precision acreage, I send people to a surveyor. The owners want to know exactly where to put the fence posts. Doing that in GIS theory is fine, but they want to see the marker flags or pins in the ground. Surveyors do that.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.