GIS Boundary on the Google Earth

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

GIS Boundary on the Google Earth

Post by khurshid.arshad »

Dear CSPro Team

I hope you are doing well.
I have marked one block on the google earth and I want to restrict enumerator so that he can works within the marked boundary.
For reference please see attached picture.
Best.
a.
Attachments
block.jpg
block.jpg (668.07 KiB) Viewed 8293 times
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: GIS Boundary on the Google Earth

Post by aaronw »

You would define your block in KLM. Then you could write the enumerator's position to the KLM file and display the block and location using Google Earth. This wouldn't allow you to restrict the enumerator's work, but would allow you to give them a tool to identify whether they were inside the block or not. If you are interested we can attach some sample code.
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: GIS Boundary on the Google Earth

Post by khurshid.arshad »

Dear;

Thank you for the prompt reply. I will be very great full, if you can share some code or example.

Best Regrds.
Arshad
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: GIS Boundary on the Google Earth

Post by khurshid.arshad »

Dear;

Any update in this regards.
Best
a.
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: GIS Boundary on the Google Earth

Post by aaronw »

I've attached an external logic file. It will read in a KML file and then write it out without the closing tag. This will allow you to insert the GPS coordinate before writing out the closing tag. The map is then displayed by calling execsystem.
Mapping.zip
(1.31 KiB) Downloaded 447 times
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: GIS Boundary on the Google Earth

Post by khurshid.arshad »

Thank you very much. I will try and let you know.
Once again thank you.
Best.
a.
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: GIS Boundary on the Google Earth

Post by khurshid.arshad »

I have added .apc file (which you have attached earlier) through the file menu. But i have no experience how to use this code in my application.
Please advise.
Thanks.
a.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: GIS Boundary on the Google Earth

Post by josh »

Once you have added the .apc file to your application you can now call any of the functions in that file in your logic.

What Aaron provided is just some sample code. You will need to modify it a bit to suit your needs.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: GIS Boundary on the Google Earth

Post by htuser »

Hi Arshad,

Hopefully The Cspro Developer Team, the Best Smart Team that we know, is thinking for Csprousers, so we'll have a geographic data collection/display feature in Cspro in the future.

So, we'll be able to manage and display geospatial data in Csentry.
And, one of the most important functionality we would like to see in this improvement, is a function able to calculate distance between points and polygon.
https://gis.stackexchange.com/questions ... -of-type-x
https://stackoverflow.com/questions/109 ... -a-polygon
https://www.ian-ko.com/ET_GeoWizards/Us ... stance.htm
It's very important because, when we assign area to an enumerator, we'll be able to detect and avoid this enumerator to work outside of his area.

Actually, we have point/point distance calculator function in Cspro who's very useful when we use lookup file with geographic coordinates.

Best Regards,
G.VOLNY, a CSProuser from Haiti, since 2004
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: GIS Boundary on the Google Earth

Post by josh »

The algorithm from the second link you posted (stackoverflow) could be ported to CSPro logic. It is just basic math. It should be fairly accurate for small areas like the area assigned to an enumerator although since it doesn't take into account the curvature of the earth it wouldn't work for very large areas.
Post Reply