Subdividing a polygon around a point in R or ArcPro - r

I am trying to create a 5ha plot around a point within a permissions layer. The permissions layer doesn't always extend 5ha around the point in a square so I cannot clip it. I would like to automate this process.
My current approach is to clip 5ha around the points and then use those where it creates a full square.
Then Use the subdivide polygon tool in Arcpro and use the polygons where the point is mostly in the centre.
Then draw the 5ha manually for the rest of the polygons.
Is there a way to automate this process in R? I've only found how to subdivide the polygon into equal areas.
Thanks

Related

Calculating area without overlap of polygon

I have a question. I am trying to calculate the area of the following layer (see picture)
intersect area
I used the intersection tool to find the intersection between the layer of 4 overlapping buffers with another polygon (transformed from raster and therefore consists of many other polygons). This layers now consists of more than 200 polygons and most of them on top of each other. I actually want to calculate the 2D area of this layer, so I actually want to transform this layer of many polygons into one polygon so that you are able to calculate the area of this one polygon. My question is therefore, is there a possibility to transform this layer into polygons that are adjacent of each other and that there are no overlapping polygons anymore so I can calculate the area? Maybe there is another way to do this?
If understand your question correctly, you should be able to use the Dissolve Boundaries tool in ArcGIS; dissolve into one polygon; then calculate the area of that polygon.

If i already know the Voronoi vertices points, how can i create a polygon from the list?

I'm trying to create this in Gamemaker. I already know the Voronoi vertices but i'm stuck with how to create polygons for each seed object. I need them to be independent so i can split it up later to apply texture mapping to them.
I've tried delaunay already but it doesn't seem as accurate as my voronoi generation. But being that the cicrumradius is the voronoi vertices anyways i feel like i don't need it. The problem with the Delaunay is that it only returns the points near the center of the diagram and doesn't return any points towards the Borders of the Box. The only good thing is that delaunay did skip an extra step and made it easier to return if the the seeds x and y are within the circumradius then just add them to the list of vertices
Is there any way to make a polygon from a plot of points from a data structure?
Pick the midpoint of each edge and the distance to each site then sort the result and pick the first and second (when they are equal) and save them into polygons. For the borders there is of course only 1 edge.
Duplicate:Getting polygons from voronoi edges

make polygons from points extracted by concave hull

I would like to make a file including polygon or lines from boundary points extracted from point cloud by concave hull method as shown in below page.
http://ait-survey.com/wp-content/uploads/2015/08/concave_hull_polygon1.png
Boundary points are 3D coordinates.
Also I would like to make polygon file import in AutoCAD.
Let me know how to make it.
That's a interesting problem. I would start with:
Identify the outer circle around the points, as shown here: http://through-the-interface.typepad.com/through_the_interface/2011/02/creating-the-smallest-possible-circle-around-2d-autocad-geometry-using-net.html
Run through the circle degrees (0 to 2PI), find the closest point. That should give you the order of the points, counter-clockwise.
Draw the polyline
I do not have a code 'ready-to-use'... may have some time late this week. But what do you think about the approach?

checking intersection of many (small) polygons against one (large) polygon by filling with rectangles?

I have a 2D computational geometry / GIS problem that I think should be common and I'm hoping to find some existing code/library to use.
The problem is to check which subset of a big set (thousands) of small polygons intersect with a single large polygon. (By "small" and "large" I'm referring to the amount of space the polygons cover, not the number of points that define them, although in general suppose that the number of points defining a polygon is roughly proportional to its geometric size. And to give a sense of proportion, think of "large" as the polygon for a state in the United States, and "small" as the polygon for a town.)
Suppose the naive solution using a standard CheckIfPolygonsIntersect( P, p ) function, called for each small polygon p against the one large polygon P, is too slow. It seems that there are ways to pre-process the large polygon to make the intersection checks for the majority of the small polygons trivial. In particular, it seems like you could create a small set of rectangles that partially/almost fill the large polygon. And similarly you could create a small set of rectangles that partially/almost fill the area of the bounding box of the large polygon that is not actually within the large polygon. Then the vast majority of your small polygons could be trivially included or excluded: if they are fully outside the bounding rect of the large polygon, they are excluded. If they are fully inside the boundary of one of the inside-bounding-rect-but-outside-polygon rects, they are excluded. If any of their points are within any of the internal rects, they are included. And only if none of the above apply do you have to call the CheckIfPolygonsIntersect( P, p ) function.
Is that a well-known algorithm? Do you know of existing code to compute a reasonable set of interior/exterior rectangles for arbitrary (convex or concave) polygons? The rectangles don't have to be perfect in all cases; they just have to fill much of the polygon, and much of the inside-bounding-rect-but-outside-polygon area.
Here's a simple plan for how I might compute these rectangles:
take the bounding box of the large polygon and construct a, say, 10x10 grid of points over it
for each point, determine if it's inside or outside the polygon
"grow" each point into a rectangle by iteratively expanding it in each of the four directions until one of the rect edges crosses one of the polygon edges, in which case you've gone too far (this would actually be done in a "binary search" kind of iteration so with just a few iterations you could find the correct amount to expand in each direction; and of course there is some question of whether to maximize the edges one at a time or in concert with one another)
any not-yet-expanded grid point that get covered by another point's expansion just disappears
when all points have been expanded (or have disappeared), you have your set of interior and exterior rectangles
Of course, certain crazy concave shapes for the large polygon could lead to some poor/small rectangles. But assuming the polygons are mostly reasonable (e.g., say they were the shapes of the states of the United States), it seems like you'd get a good set of rectangles and could greatly optimize those thousands of intersection checks you'd subsequently do.
Is there a name (and code) for that algorithm?
Edit: I am already using a quad-tree to determine the small polygons that are likely to intersect with the bounding rect of the large polygon. So the problem is about checking which of those polygons actually do intersect with the large polygon.
Thanks for any help.
In your plan you described something very similar to the signed distance map method. Google 'distance map algorithm' for details. I hope it will be what you're looking for.

Vector GIS Data line-of-sight?

I have a situation where I'm only concerned with a few vector layers and two-dimensional line-of-sight. I know that line-of-sight is usually performed on raster data because the typical use is topography. Because that wording is vague and close to useless here's my situation:
I have a polygon shoreline vector shapefile, a "source" point placed in the water somewhere, and a "buffer" polygon layer that represents a large radius circle around the "source" point. I'm only interested in the parts of the buffer polygon that are "within sight" of the source point. In the image below the red dot is the source, the orange polygon is the buffer clipped with the shoreline, and the yellow polygon is what I'm interested in. Even this isn't as fine as I'd like.
Image: http://i.stack.imgur.com/IKBLv.png
I want to automate the process I use now (fairly time-consuming) and would prefer to use python/numpy/scipy/OGR/GRASS instead of ESRI's stuff.
Any idea how to trace along the line and check for "visibility"? I could rasterize everything and use a traditional radial line-of-sight script within GRASS but that seems like way dealing with too much data held in memory and running checks for pixels we know wouldn't produce a collision for the intersection of a few vectors. I want to be as light as possible while maintaining the highest accuracy possible.
How about considering (iteratively) the line between your point and each point in the shoreline shapefile? If it intersects the "land" polygon (crosses over land), then that point on shore is not visible. Take all the points that are visible, and use them to form a new polygon of the visible area.

Resources