Calculating Land Area: How It's Done with TaroWorks
Calculating land area is one of the most important agricultural data collection and analysis tasks in developing countries.
“… Along with family labor, land is arguably the most important productive asset for rural households across developing regions, and lack of access to land is often the key constraint preventing rural households from emerging from poverty.
For the same reason land is often used as a measure of wealth. Disaggregated land ownership data are an input into analyses of agrarian structures, and yields (expressed as output over unit of cultivated land) are a favorite partial productivity measure of the performance of agricultural sectors. Several aspects of the analysis of gender differences in agriculture and the rural sector are also based on land area; two of the most pressing concerns when devising policies to address gender disparities in rural areas pertain to the lower agricultural productivity of women compared to men and, related to that, to the disparity in their asset base.” (World Bank)
Is it possible to calculate land area with TaroWorks? Yes, you can estimate land area using TaroWorks, but before diving into the solution, let’s look at two main possible sources of error so you can determine whether this solution is suitable for your use case.
Calculating Land Area: Common Errors
 Number and Location of Coordinates: The Number and location of coordinates can impact the accuracy of your area measurements. In the diagram below, the light green represents the land for which we’d like to calculate the area, the red X’s represent the GPS coordinates recorded by the mobile user and the dark green represents the area that the solution in this article would calculate. This solution will calculate the area of the shape that results from connecting consecutive coordinates with a straight line. In the first example, only 3 points are recorded and much of the land area is not accounted for. In the second, another point is added, so the estimated area is closer to the actual area. However, the position of the points matters as well. In the last example the 4 GPS coordinates are recorded at the furthest points from the center and would result in a highly accurate area calculation.
 Concave Shapes: Concave shapes are another source of area. Take the example below. The light green shape is the land for which we’d like to estimate the area. The red X’s are the coordinates from which we have to estimate. The method of calculating land area in this solution is the sum of the areas of each of the triangles formed by a single point and two other consecutive points. For the shape below, the total area that would be calculated with this method is A1+A2+A3+A4. The estimated area will be greater than the actual area of this land due to the concave nature of shape.
If the areas you’ll be calculating will be close to convex polygons, then that will significantly decrease your variance. Also the more points you can take that are furthest from the center of the shape being measured, the more accurate the resulting area calculation. For example, if I was trying to measure the area of the turquoise oval below, I could increase the accuracy of the area calculated by having the mobile user record more GPS coordinates along the perimeter of the land. Finally, the calculated area can only be as accurate as the coordinates provided, so it’s also recommended that you use GPS only if possible (and don’t allow the phone to use wireless or mobile data to triangulate a location).
Calculating Land Area: Solution with TaroWorks
The following steps for calculating land area will show you how to produce a calculated area of the polygon enclosed by 310 GPS coordinates using Heron’s formula. It will also show you how to display a map of that polygon on satellite imagery using the Google Maps API. Please be aware that Google does have a cap on complimentary queries via its maps api.
 Create at least three decimal geolocation fields. For this example, we are going to create 10 geographic coordinates: PP1 – PP10.
 Let Np = the maximum number of perimeter points you’re going to allow the mobile users to capture. Create (Np2) number formula fields. They don’t need to be displayed in the page layout, but are rather used for the calculation in the background. Each formula field represents the area of a triangle contained by the polygon created by the geolocations captured. For our example (310 GPS coordinates), we’ll need 8 formula fields, A1 – A8. The perimeter points for each formula field will consist of the first point, and two consecutive points. A1 will be calculated using the triangle defined by PP1, PP2 and PP3. If more than 3 geolocations were captured, A2 would be calculated using the triangle defined by PP1, PP3, PP4. The following formulas return the area of each triangle in hectares. To have the result calculated in miles, replace ‘km’ with ‘mi’ and remove the *100 from the end of the formula.
 A1
IF(ISNULL(PP1__c),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP2__c, ‘km’)^2)*((DISTANCE( PP2__c , PP3__c, ‘km’)^2))((DISTANCE( PP1__c , PP2__c, ‘km’)^2)+(DISTANCE( PP2__c , PP3__c, ‘km’)^2)(DISTANCE( PP3__c , PP1__c, ‘km’)^2))^2))*100
 A2
IF(ISNULL(PP4__c),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP3__c, ‘km’)^2)*((DISTANCE( PP3__c , PP4__c, ‘km’)^2))((DISTANCE( PP1__c , PP3__c, ‘km’)^2)+(DISTANCE( PP3__c , PP4__c, ‘km’)^2)(DISTANCE( PP4__c , PP1__c, ‘km’)^2))^2))*100
 A3
IF(OR(ISNULL(PP4__c),ISNULL(PP5__c)),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP4__c, ‘km’)^2)*((DISTANCE( PP4__c , PP5__c, ‘km’)^2))((DISTANCE( PP1__c , PP4__c, ‘km’)^2)+(DISTANCE( PP4__c , PP5__c, ‘km’)^2)(DISTANCE( PP5__c , PP1__c, ‘km’)^2))^2))*100
 A4
IF(OR(ISNULL(PP5__c),ISNULL(PP6__c)),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP5__c, ‘km’)^2)*((DISTANCE( PP5__c , PP6__c, ‘km’)^2))((DISTANCE( PP1__c , PP5__c, ‘km’)^2)+(DISTANCE( PP5__c , PP6__c, ‘km’)^2)(DISTANCE( PP6__c , PP1__c, ‘km’)^2))^2))*100
 A5
IF(OR(ISNULL(PP6__c),ISNULL(PP7__c)),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP6__c, ‘km’)^2)*((DISTANCE( PP6__c , PP7__c, ‘km’)^2))((DISTANCE( PP1__c , PP6__c, ‘km’)^2)+(DISTANCE( PP6__c , PP7__c, ‘km’)^2)(DISTANCE( PP7__c , PP1__c, ‘km’)^2))^2))*100
 A6
IF(OR(ISNULL(PP7__c),ISNULL(PP8__c)),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP7__c, ‘km’)^2)*((DISTANCE( PP7__c , PP8__c, ‘km’)^2))((DISTANCE( PP1__c , PP7__c, ‘km’)^2)+(DISTANCE( PP7__c , PP8__c, ‘km’)^2)(DISTANCE( PP8__c , PP1__c, ‘km’)^2))^2))*100
 A7
IF(OR(ISNULL(PP8__c),ISNULL(PP9__c)),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP8__c, ‘km’)^2)*((DISTANCE( PP8__c , PP9__c, ‘km’)^2))((DISTANCE( PP1__c , PP8__c, ‘km’)^2)+(DISTANCE( PP8__c , PP9__c, ‘km’)^2)(DISTANCE( PP9__c , PP1__c, ‘km’)^2))^2))*100
 A8
IF(OR(ISNULL(PP9__c),ISNULL(PP10__c)),0,1/4* SQRT(4*(DISTANCE( PP1__c , PP9__c, ‘km’)^2)*((DISTANCE( PP8__c , PP10__c, ‘km’)^2))((DISTANCE( PP1__c , PP9__c, ‘km’)^2)+(DISTANCE( PP9__c , PP10__c, ‘km’)^2)(DISTANCE( PP10__c , PP1__c, ‘km’)^2))^2))*100
 Due to the limitation on the length of compiled formula fields, we’ll need to create a workflow to sum the area of all of the triangles. First, create a number field in which to store the sum.
 Then create a workflow that will run when there are any updates to this record that will sum the area fields. The formula value is: A1__c + A2__c + A3__c + A4__c + A5__c + A6__c + A7__c + A8__c
 Create a TaroWorks Survey that populates the geolocation fields and ensure that the first three locations are required.
 To view the coordinates that are stored in the object on a map with satellite imagery, you’ll need to create two text formula fields. Create the first called, “Map Link” using the following formula. If your maximum number of points is less than 10, you can delete the lines referencing those points. For example, if I only created 3 geolocation fields, I would omit all the lines not in bold. If I created 4 geolocation fields, I would omit all the lines that are not in bold except the line referencing the 4th field:
 “& IF(ISNULL(PP4__c),””,”%7C”&TEXT(PP4__Latitude__s)&”,”&TEXT(PP4__Longitude__s))”.
You can customize the zoom and size to your liking:

 “http://maps.google.com/maps/api/staticmap?size=400×400&zoom=17&maptype=satellite&sensor=true&path=color:0x0000ff80%7C”&TEXT(PP1__Latitude__s)&”,”&TEXT(PP1__Longitude__s)&”%7C”&TEXT(PP2__Latitude__s)&”,”&TEXT(PP2__Longitude__s)&”%7C”&TEXT(PP3__Latitude__s)&”,”&TEXT(PP3__Longitude__s)
 & IF(ISNULL(PP4__c),””,”%7C”&TEXT(PP4__Latitude__s)&”,”&TEXT(PP4__Longitude__s))
 & IF(ISNULL(PP5__c),””,”%7C”&TEXT(PP5__Latitude__s)&”,”&TEXT(PP5__Longitude__s))
 & IF(ISNULL(PP6__c),””,”%7C”&TEXT(PP6__Latitude__s)&”,”&TEXT(PP6__Longitude__s))
 & IF(ISNULL(PP7__c),””,”%7C”&TEXT(PP7__Latitude__s)&”,”&TEXT(PP7__Longitude__s))
 & IF(ISNULL(PP8__c),””,”%7C”&TEXT(PP8__Latitude__s)&”,”&TEXT(PP8__Longitude__s))
 & IF(ISNULL(PP9__c),””,”%7C”&TEXT(PP9__Latitude__s)&”,”&TEXT(PP9__Longitude__s))
 & IF(ISNULL(PP10__c),””,”%7C”&TEXT(PP10__Latitude__s)&”,”&TEXT(PP10__Longitude__s))
 & “%7C”&TEXT(PP1__Latitude__s)&”,”&TEXT(PP1__Longitude__s)
 The second text formula field can be called “Map Display” and will reference the first. You can use the following formula for this field:
 IF( OR( ISBLANK( PP1__Latitude__s ) , ISBLANK( PP1__Longitude__s ) ) , “Missing Coordinates”, IMAGE( Map_Link__c , “”, 300,300))
Calculating Land Area: Result
The result is a visual representation and calculation in hectares of the area contained by the coordinates captured. In the example below, 10 coordinates were captured around the Apple Bowl in Kelowna, and the resulting area is accurate within a one hundredth of a hectare.
Want To Demo TaroWorks?
Many TaroWorks customers previously used paper and spreadsheets to collect data, analyze metrics and run field operations. Let us show you how TaroWorks’ offline mobile field service app can help scale your business by digitizing sales and supply chain management, increasing agent network productivity and analyzing data in realtime for business insights.
TaroWorks, a Grameen Foundation company.
Site by V+V