I want to add some information obtained from external source to assessed Collect Earth plots to make those information available for analysis using SAIKU. Is it possible? If so, how can I do that? asked 22 Sep '15, 11:09 abejin |
This is a process that involves four steps.
ATTENTION: For this you will need to have imported the survey (you can use the placemark.idm.xml file inside the CEP) into you Open Foris Collect and should have it installed somewhere (possibly your computer) Adding a new attributeSo, step 1 is quite straight forward. Lets say that you have your survey already loaded in the survey designer. You need to access the survey, go to the scheme tab and there add a new attribute, use text, number or code depending on the attribute type you will be using. It is important, as this data is added after you have already have collected the data, that you mark the field as Never being relevant using the false() expression. This means that the attribute will not show up in the form and it will not be required if new data is collected. So, say that now you have added a new code attribute called soilcode. It is linked to a code-list called "soiltypes" where you have imported the codes for the possible types of codes in your region. Obviously the codes must coincide with the data you will import. If this was a text attribute then it wouldn't matter. Exporting the Survey and updating the databaseThis one is quite easy. You just need to export the Collect survey though Collect Designer and double click on the resulting CEP file! Generate the CSV with the data to load/updateSo after you modified the survey and imported it the structure of the Collect database used by Collect Earth has changed and now there is a new "column" soilcode on the plot table. The data for this soilcode is empty and you need to update the data on the plots ALREADY ON THE DATABASE (if you have not yet collected data for a plot you cannot update it) . To do this you need to generate a CSV file that links the plots (using the ID) to the value of the soilcode. If you are extracting data from a soil map shapefile you can easily process the data using QGis or similar. Please see this other answer on the forum on how to do this: LINK. So you will end up with a CSV file updatePlots.csv like this (say that 5888,5889,5890.... are the IDs of the plots for which you have collected information and that SOL and NET are codes contained in the codelist soiltypes that the soilcode attribute makes reference to )
Import the CSV dataSo now this is the final step and quite straight forward. Use the menu Tools->Data Import/Export->Update current records using CSV and select the file that you have generated updatePlots.csv . You get a dialog that shows the process running. Once that is done you can run Saiku again (choosing to update the database when you are prompted) and the new attribute should be shown on the left panel!! Easy peasy! answered 22 Sep '15, 16:36 collectearth ♦ |