Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to divide irregular polygon into equal areas on Google map V2

I am developing an application for sampling Glebe for agriculture purpose. In That a user can select a a Glebe by tapping on map which will create a polygon according to the number of taps. I am able to create that polygon and able to get the area of the polygon. But Now I need to divide it into equal areas.

For example, If the polygon's area is 50m^2 then it'll be divided into 50 areas of 1 m^2. Same functionality has been done in Agri Precision App. Find below image. I need to divide the polygon same as below image and show the points inside it.

The polygon

For getting Area, I am using Google Map Utilty Lib It has an algo also for Grid Clustering. I want same like above image. In above image, they have divided area per 5 Hectares. Since all area is 85 Hectares, so total points should be shown will be 17. That is what How it works.

So my question is:

How to find those points according to the area of the polygon on Map so that I can draw these points on Map?

like image 763
TheLittleNaruto Avatar asked Jan 13 '14 09:01

TheLittleNaruto


People also ask

Can you draw polygons on Google Maps?

Draw a path or polygonTo make a path or polygon into a 3D object, click Altitude. A "New Path" or "New Polygon" dialog will pop up. You may need to move it out of the way before moving on to the next step. To draw the line or shape you want, click a start point on the map and drag.

How do I calculate the area of a polygon in Google Maps?

Right-click on the map at your starting point and choose the Measure distance option. Add points around the location's boundary. Once you close the shape by clicking on the starting point, the Google Maps area calculator will automatically process the area of your shape.

How do you split a polygon into equal parts in Arcgis?

Select a feature with the Select Parcel Feature tool, right-click Parcel Division. You can divide by Equal Area or Equal Width. Please see the ESRI online help (parcel division). Save this answer.


1 Answers

No constraint has been given on the shape of the glebes, so here is a solution that will fulfill the problem statement by building a star-shaped decomposition. It assumes that the polygon is convex:

  • Arbitrarily select a main vertex.

  • Triangulate the polygon by joining the main vertex to every edge in turn, giving triangles of areas A1, A2, A3...

  • Start a trip around the polygon, from the main vertex. If the first triangle is larger than the desired area (A1 > A), find the point along the edge such that it will subdivide the triangle in a sub-triangle of the desired area. Continue the trip from here with the remaining sub-triangle (having area A1-A). Otherwise, subtract the area of the first triangle from the desired area and continue the trip (A now A-A1).

This is very similar to splitting a sequence of N intervals on the real line into K intervals of equal length.

My guess is that a star-shape decomposition will not suit you.

like image 196
Yves Daoust Avatar answered Sep 22 '22 02:09

Yves Daoust