GIS Boundary on the Google Earth

Discussions about CSEntry
khurshid.arshad
Posts: 349
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan
Contact:

GIS Boundary on the Google Earth

Postby khurshid.arshad » September 27th, 2018, 1:19 pm

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 994 times

aaronw
Posts: 138
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: GIS Boundary on the Google Earth

Postby aaronw » September 27th, 2018, 3:15 pm

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: 349
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan
Contact:

Re: GIS Boundary on the Google Earth

Postby khurshid.arshad » September 28th, 2018, 12:05 am

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: 349
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan
Contact:

Re: GIS Boundary on the Google Earth

Postby khurshid.arshad » September 28th, 2018, 2:23 pm

Dear;

Any update in this regards.
Best
a.

aaronw
Posts: 138
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: GIS Boundary on the Google Earth

Postby aaronw » October 1st, 2018, 12:59 am

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 103 times

khurshid.arshad
Posts: 349
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan
Contact:

Re: GIS Boundary on the Google Earth

Postby khurshid.arshad » October 3rd, 2018, 7:05 am

Thank you very much. I will try and let you know.
Once again thank you.
Best.
a.

khurshid.arshad
Posts: 349
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan
Contact:

Re: GIS Boundary on the Google Earth

Postby khurshid.arshad » January 7th, 2019, 10:02 am

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: 1749
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: GIS Boundary on the Google Earth

Postby josh » January 7th, 2019, 10:55 am

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: 363
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: GIS Boundary on the Google Earth

Postby htuser » January 11th, 2019, 2:25 pm

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,

josh
Posts: 1749
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: GIS Boundary on the Google Earth

Postby josh » January 11th, 2019, 5:09 pm

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.


Return to “Entry”