Dear CSPro developer Team,
Since i read that the map object implemented in CSPro logic is based on offline maps that are served by a local tile server running on the Android device (localhost:8084). The server is implemented using NanoHttpd. So i'm thinking about using polygon javascript api : https://developers.google.com/maps/docu ... gon-simple for agricultural parcel delineation. Since i know that javascript function must be wrapped in CSPro logic, does it's a realistic idea?
I think about since you already implement Webview in CSEntry (so it can run Javascript)and also, right now, it would not be so difficult to run javascript directly in the CSPro logic engine (based on C/C++) using Emscripten librairies: https://emscripten.org/docs/porting/con ... -code.html
Thanks in advance for your support.
Agricultural parcel delineation with Map Object
Agricultural parcel delineation with Map Object
G.VOLNY, a CSProuser from Haiti, since 2004
Re: Agricultural parcel delineation with Map Object
You're are not going to be able to wrap the JS in CSPro logic. Your best bet is to create basemaps that include the boundaries.
Re: Agricultural parcel delineation with Map Object
Thanks for your support.
The way you advise me is for static AOI. And is heavy since when you change AOI, you must upload tiles files again. However, my demand concern more transforming coordinates (points) collected by the map object to visible polygon on the map. Polygon class already exist in the same api used for the map object: https://developers.google.com/maps/docu ... ce/polygon , but until now, we can't have them in CSPro logic.
Years ago, Greg mentioned a possibility that "the Census Bureau will write wrapper libraries that expose much of CSPro to people using other programming languages" viewtopic.php?f=7&t=400&p=456&hilit=java#p456
I think that could be a solution for the future.
Best,
The way you advise me is for static AOI. And is heavy since when you change AOI, you must upload tiles files again. However, my demand concern more transforming coordinates (points) collected by the map object to visible polygon on the map. Polygon class already exist in the same api used for the map object: https://developers.google.com/maps/docu ... ce/polygon , but until now, we can't have them in CSPro logic.
Years ago, Greg mentioned a possibility that "the Census Bureau will write wrapper libraries that expose much of CSPro to people using other programming languages" viewtopic.php?f=7&t=400&p=456&hilit=java#p456
I think that could be a solution for the future.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Re: Agricultural parcel delineation with Map Object
Users have requested support for parcel delineation so we know about the request. It is not planned for next release but it is on our radar for the future. In the meantime your best bet is to use an external app (possibly one that you write yourself in Javascript) and link it to CSPro using the SystemApp object.
Wrapper libraries to expose CSPro to other languages are NOT in any of our future plans despite what Greg said years ago.
Wrapper libraries to expose CSPro to other languages are NOT in any of our future plans despite what Greg said years ago.
Re: Agricultural parcel delineation with Map Object
Thanks Josh for Precision.
With Apache Cordova, we can create Apk with HTML/CSS and Javascript more easily that we can do with Android Java or Kotlin.
However, my first idea is to see how i can add some components who can natively interact with CSPro Logic.
a) Display polygon to map object; I was thinking of transforming coordinates (points) collected by the map object to polygon using the Google Map Javascript API and display as a layer of the map object local NanoHttpd server. But i don't think if the map object accepts displaying several layers on a Map.
Another way would be:
1. To transform points in KML vector polygon using codes that Aaron and you posted;
2. Transform KML to geojson using https://mapbox.github.io/togeojson/ (I think it's possible to output geojson directly from points collected with the Map object with CSPro logic user defined functions)
3. Transform geojson to mbtiles vector using this https://github.com/mapbox/geojson-vt and finally dispelay these mbtiles on the CSEntry's map.
Best Regards,
With Apache Cordova, we can create Apk with HTML/CSS and Javascript more easily that we can do with Android Java or Kotlin.
However, my first idea is to see how i can add some components who can natively interact with CSPro Logic.
a) Display polygon to map object; I was thinking of transforming coordinates (points) collected by the map object to polygon using the Google Map Javascript API and display as a layer of the map object local NanoHttpd server. But i don't think if the map object accepts displaying several layers on a Map.
Another way would be:
1. To transform points in KML vector polygon using codes that Aaron and you posted;
2. Transform KML to geojson using https://mapbox.github.io/togeojson/ (I think it's possible to output geojson directly from points collected with the Map object with CSPro logic user defined functions)
3. Transform geojson to mbtiles vector using this https://github.com/mapbox/geojson-vt and finally dispelay these mbtiles on the CSEntry's map.
In the long run, if Websurvey is implemented using Webassembly, we can have package (CSEntry Engine and logic librairies, Javascript, HTML)that we'll be able to import in Apache Cordova for add-on and output standalone questionnaire/data collection Applications able to be deployed on IOS, Windows and Android. This is the ultimate dream for each CSProuser, much more important than Wrapper libraries to expose CSPro to other languages !Wrapper libraries to expose CSPro to other languages are NOT in any of our future plans despite what Greg said years ago.
Best Regards,
G.VOLNY, a CSProuser from Haiti, since 2004