Page 1 of 1

Calculate Area using gps

Posted: March 12th, 2023, 6:41 pm
by lmoriba
Dear CSPro family,

I need urgent help on how to capture of a field using gps. My first questions is that can cspro capture area using gps? If it is not is it possible to use exec function to capture area using gps. if so how? I will very grateful if i can shown how.

I urently need this help.

Thanks family.

Re: Calculate Area using gps

Posted: March 12th, 2023, 8:57 pm
by htuser
It's very easy using map and geometry objects. https://www.csprousers.org/help/CSPro/map.html , https://www.csprousers.org/help/CSPro/geometry.html
I specially designed this function
Function traceAndSavePolygon()
listingMap.clearButtons();
listingMap.clearGeometry();
    geometry myCluster;
    myCluster.clear();
    myCluster.tracePolygon(listingMap);
    maketext ("%s",invoke ("habillageMap")) ;
    myCluster.setProperty("GRAPPE",sysdate("yyyymmdd"){CLUSTER});
    {myCluster.setProperty("REGION", REGIONN);
    myCluster.setProperty("VILLE", REGIONN);}
   
string polygonFilename=maketext("Grappe-%d.geojson", systime("hhMMss"));
    myCluster.save(path.concat(mapStore(),polygonFilename));
end;
for manual tracing on a map. But, if you want to trace with GPS, you'll have to use the function walkPolygon It Allow user to draw polygon by walking the perimeter and saving the locations using the GPS.
If you can implement a small demo and post it on the forum, maybe, I'll be able to help you more about.
Best

Re: Calculate Area using gps

Posted: March 13th, 2023, 9:30 am
by aaronw
To see an example take a look at the examples that gets installed with CSPro. There is one called geometry under data entry that I think you will find helpful.

Re: Calculate Area using gps

Posted: March 14th, 2023, 12:16 am
by lmoriba
Thanks a lot, especialy Htuser and Aaronw for your timely and wonderful interventions. I will use your demos and suggestions. If there is anything i will need I will come back to you.

Essentially, I want my enumerators to capture the area of a fish pond using gps in an agric survey. So, I will come back should i have further difficulty.