Hello, I have designed a survey and I would like to share that survey amongst different users that will be collecting data in different countries. My problem now is that I want to make sure that the records for each country are correctly stored and that the data stored by one user in country A is for sure not going to overwrite data collected for country B. I have generated my plot location CSV files using QGis ineach one of the countries our projectis going to work on, then I noticed that the QGis generated IDs can bethe same in different countries. This makes me think that there could be a problem. What should I do to make sure there will be no problems? /Question asked on behalf of a user asked 18 Nov '14, 09:31 Open Foris ♦♦ |
So the answer here is quite clear YOU HAVE GOT A PROBLEM! The survey that you have designed takes an field ID as the unique identifier of a plot. If this is so then there CAN NOT BE two plots in different regions with the same ID, as this would mean that the information from one will overwrite the other. There are three ways to fix this:
Your current ID is: < text id="2" key="true" name="id" required="true" >< label xml:lang="en">Id< /label>< /text> So you need to add this : < text id="10000" name="country" key="true"> < label xml:lang="en">Country< /label>< /text> Now you need to pass this information (the name of the country) to Collect Earth when the form is submitted in Google Earth. One way to do that is to add a country column to the plot files. so in the Spain.csv file you add a column and you end up with these columns(assuming that from the beginning you have the first 7 columns) : id,latitude,longitude,elevation,slope,aspect,region,country Then you need to pass the country name from the plot file to the form: Modify the kml_template.fmt file (found in Collect Earth Project cep file) so that the countryvalue is added to the data that can be accessed by the HTML popup, add these lines to the ExtendedData block : < Data name="country">< value>${placemark.extraInfo[1]}< /value>< /Data> The extraInfo[1] refers to the 7th column o the plot file location ( the 6th column -region- is ${placemark.extraInfo[0]} ) Finally go to the HTML popup form ( file balloon.html inside the cep file ) and add these lines in the areas where the hidden input fields are defined : < input type="hidden" id="collect_text_country" name="collect_text_country" value="$[country]" /> FLOW : the country name is passed to the KML data which in its turn is accessed by the pop-up balloon and is then sent as a hidden parameter to Collect Earth when the user clicks on the submit button on the form shown by Google Earth.
Copy the original Collect Earth Project file and for each country modify the URI of the survey in the placemark.idm.xml file, s for Spain you will have : < uri>http://www.openforis.org/idm/earth/europe/spain< /uri> Also change the project name to e.g. : < project>Spain - Open Foris Collect Earth< /project> And finally but very importantly change the project name in the file called project_definition.properties so you will have a line like : survey_name=spaincollectsurvey Ensure that each country has different values here! Now Collect Earth will create different database schemes per project (country) so you don't have to worry about conflicting IDs! ATTENTION : you might need to remove spaces after the less than sign in the XML! Wow that was a painful answer :) answered 18 Nov '14, 12:31 collectearth ♦ |
Hi there, this was a good conversation. Now, do you have a file created for Ethiopia. I would like to test it by collecting some data from regions am familiar with it if there is one ready. Or, can you walk me through/throw a link how to create one if there is none yet? Thanks, Tesfay answered 26 Nov '14, 18:09 Tesfay |