<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.e-ecology.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lyklev</id>
		<title>ecology - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.e-ecology.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lyklev"/>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php/Special:Contributions/Lyklev"/>
		<updated>2026-05-06T17:47:54Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=900</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=900"/>
				<updated>2013-05-17T06:13:27Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* ToDo List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
Note: the actions in this page have been moved to the [https://services.e-ecology.sara.nl/redmine Redmine] tracker.&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Urgent issues ===&lt;br /&gt;
&lt;br /&gt;
* There is missing data for device 211, for February 2012.&lt;br /&gt;
** Find out why this data is missing, re-import the data&lt;br /&gt;
** Find out why no error was reported and fix the failed mechanism&lt;br /&gt;
&lt;br /&gt;
* Matlab script wrapper fail for firmware versions 1.0.3.4 and 1.0.3.5&lt;br /&gt;
** Adjust matlab script wrapper to accept these firmware versions.&lt;br /&gt;
&lt;br /&gt;
=== Medium priority ===&lt;br /&gt;
&lt;br /&gt;
* Get the &amp;quot;projects&amp;quot; table working&lt;br /&gt;
** Make it work so that is causes ''fewer'' issues, not more. If this is not possible, streamline the old-fashioned way of creating users and granting access&lt;br /&gt;
** Give WB access to the projects table.&lt;br /&gt;
&lt;br /&gt;
* Extension of the table &amp;quot;gps.uva_devices&amp;quot;&lt;br /&gt;
** JS will specify which new columns need to be added.&lt;br /&gt;
&lt;br /&gt;
* New hardware specification&lt;br /&gt;
** Coen will write down a first draft specification of the new hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lower priority issues ===&lt;br /&gt;
&lt;br /&gt;
* Userflag application&lt;br /&gt;
** There appears to be an application for flagging invalid GPS data. What is the status of this application? Who has access?&lt;br /&gt;
&lt;br /&gt;
=== Change requests ===&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
(empty)&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If there is an error during the processing of a GPS file, move that file to a &amp;quot;failed&amp;quot; subdirectory.&lt;br /&gt;
** ''Failed files are moved to a &amp;quot;failed&amp;quot; subdirectory in the same place as the failed file.''&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the UvA-bits web site.&lt;br /&gt;
** ''Scripts and urls have been provided to Aart-Jan for the UvA-bits web site''&lt;br /&gt;
&lt;br /&gt;
* Automatically and periodically generate power graphs for the GPS loggers; take the graph generating program from the Matlab script wrapper.&lt;br /&gt;
** ''Script is run periodically; plots are placed in a directory where the UvA-bits web site can read them from. Graphs are generated for all loggers. To protect the generated images so only authorized users can see them, only the UvA-bits machine can access these graphs. Access must be controlled by the UvA-bits machine.''&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices.''&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=OLD:_Description_of_the_Data_upload_and_Annotation_Service&amp;diff=715</id>
		<title>OLD: Description of the Data upload and Annotation Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=OLD:_Description_of_the_Data_upload_and_Annotation_Service&amp;diff=715"/>
				<updated>2012-10-09T10:14:57Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data upload and annotation service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has been moved to [[Annotation tables]].&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=OLD:_Description_of_the_Data_upload_and_Annotation_Service&amp;diff=713</id>
		<title>OLD: Description of the Data upload and Annotation Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=OLD:_Description_of_the_Data_upload_and_Annotation_Service&amp;diff=713"/>
				<updated>2012-10-09T10:14:07Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: moved Description of the Data upload and Annotation Service to OLD: Description of the Data upload and Annotation Service&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Data upload and annotation service=&lt;br /&gt;
 &lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database. &lt;br /&gt;
&lt;br /&gt;
With such a facility the file-based data, for example a comma-separated value file, could be easily uploaded via a web form and all data would automatically be inserted into a new database table without further user interaction.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users. &lt;br /&gt;
 &lt;br /&gt;
For such a system, users must be able to create new and view existing templates, and use these templates to upload file-based data. Such a system requires 3 modules: &lt;br /&gt;
 &lt;br /&gt;
1. Template viewer&lt;br /&gt;
 &lt;br /&gt;
The template viewer providesan overview of available templates, and shows details such as: &lt;br /&gt;
* the user who created the template&lt;br /&gt;
* the name of the template&lt;br /&gt;
* a description of the template&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
2. Template creator&lt;br /&gt;
&lt;br /&gt;
The template editor allows a user to create new (edit existing) templates, defining all relevant aspects such as:  &lt;br /&gt;
&lt;br /&gt;
* a template name&lt;br /&gt;
* a list of columns, where each column has a name and a database type&lt;br /&gt;
* a description of the template and its purpose&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Upload service&lt;br /&gt;
&lt;br /&gt;
Once a template has been created, a flat file with corresponding data columns can easily be uploaded to the services. The user does not need any prior knowledge of the database and the contents of the file will be inserted into the database automatically. &lt;br /&gt;
&lt;br /&gt;
Once a new table has been uploaded, it may be shared with other users and used to annotate existing data in the database. Such functionality requires access to and intermediate knowledge about database usage. &lt;br /&gt;
&lt;br /&gt;
As a first step we will create and integrate the three modules described above, and provide documentation about typical usage schemes (i.e. creating a template, uploading a table to the database, sharing it with other users, editing the contents of a table, and  annotating data.&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Description_of_the_Data_upload_and_Annotation_Service&amp;diff=714</id>
		<title>Description of the Data upload and Annotation Service</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Description_of_the_Data_upload_and_Annotation_Service&amp;diff=714"/>
				<updated>2012-10-09T10:14:07Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: moved Description of the Data upload and Annotation Service to OLD: Description of the Data upload and Annotation Service&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[OLD: Description of the Data upload and Annotation Service]]&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=712</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=712"/>
				<updated>2012-10-09T10:12:00Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Urgent issues ===&lt;br /&gt;
&lt;br /&gt;
* There is missing data for device 211, for February 2012.&lt;br /&gt;
** Find out why this data is missing, re-import the data&lt;br /&gt;
** Find out why no error was reported and fix the failed mechanism&lt;br /&gt;
&lt;br /&gt;
* Matlab script wrapper fail for firmware versions 1.0.3.4 and 1.0.3.5&lt;br /&gt;
** Adjust matlab script wrapper to accept these firmware versions.&lt;br /&gt;
&lt;br /&gt;
=== Medium priority ===&lt;br /&gt;
&lt;br /&gt;
* Get the &amp;quot;projects&amp;quot; table working&lt;br /&gt;
** Make it work so that is causes ''fewer'' issues, not more. If this is not possible, streamline the old-fashioned way of creating users and granting access&lt;br /&gt;
** Give WB access to the projects table.&lt;br /&gt;
&lt;br /&gt;
* Extension of the table &amp;quot;gps.uva_devices&amp;quot;&lt;br /&gt;
** JS will specify which new columns need to be added.&lt;br /&gt;
&lt;br /&gt;
* New hardware specification&lt;br /&gt;
** Coen will write down a first draft specification of the new hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lower priority issues ===&lt;br /&gt;
&lt;br /&gt;
* Userflag application&lt;br /&gt;
** There appears to be an application for flagging invalid GPS data. What is the status of this application? Who has access?&lt;br /&gt;
&lt;br /&gt;
=== Change requests ===&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
(empty)&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If there is an error during the processing of a GPS file, move that file to a &amp;quot;failed&amp;quot; subdirectory.&lt;br /&gt;
** ''Failed files are moved to a &amp;quot;failed&amp;quot; subdirectory in the same place as the failed file.''&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the UvA-bits web site.&lt;br /&gt;
** ''Scripts and urls have been provided to Aart-Jan for the UvA-bits web site''&lt;br /&gt;
&lt;br /&gt;
* Automatically and periodically generate power graphs for the GPS loggers; take the graph generating program from the Matlab script wrapper.&lt;br /&gt;
** ''Script is run periodically; plots are placed in a directory where the UvA-bits web site can read them from. Graphs are generated for all loggers. To protect the generated images so only authorized users can see them, only the UvA-bits machine can access these graphs. Access must be controlled by the UvA-bits machine.''&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices.''&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=711</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=711"/>
				<updated>2012-08-14T14:50:11Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Giving access to your schema */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. Due to an inconsistency in PgAdminIII, changing this in PgAdminIII requires administrator privileges, although this should not be required. As a workaround, you must use SQL to give others access to your schema.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are not a database administator for the flysafe database, the menus do not show the possibility to modify the schema rights, even if you can. In this case, you have to modify the schema rights by using SQL.&lt;br /&gt;
&lt;br /&gt;
Open the sql interface by clicking on the &amp;quot;SQL&amp;quot; button as shown in the figure. This will open the SQL interface.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SQL shown will be to create the object that is hightlighted. You can safely remove the code and type your own code.&lt;br /&gt;
To grant another user access to this schema, type&lt;br /&gt;
 &lt;br /&gt;
  GRANT USAGE ON SCHEMA &amp;lt;your schema name&amp;gt; TO &amp;lt;user name&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
This is shown in the following figure, where user &amp;quot;judy&amp;quot; gets access to the schema &amp;quot;lyklev&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql_2.png]]&lt;br /&gt;
&lt;br /&gt;
Fill in your schema name and the user you want to give access to. Next, hit the &amp;quot;execute&amp;quot; button, as highlighted in the figure.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=710</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=710"/>
				<updated>2012-08-14T14:48:21Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Using SQL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. Note that in the PgAdminIII menus, this can only be done by a database administrator. If you are not a database administrator, you must use SQL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are not a database administator for the flysafe database, the menus do not show the possibility to modify the schema rights, even if you can. In this case, you have to modify the schema rights by using SQL.&lt;br /&gt;
&lt;br /&gt;
Open the sql interface by clicking on the &amp;quot;SQL&amp;quot; button as shown in the figure. This will open the SQL interface.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SQL shown will be to create the object that is hightlighted. You can safely remove the code and type your own code.&lt;br /&gt;
To grant another user access to this schema, type&lt;br /&gt;
 &lt;br /&gt;
  GRANT USAGE ON SCHEMA &amp;lt;your schema name&amp;gt; TO &amp;lt;user name&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
This is shown in the following figure, where user &amp;quot;judy&amp;quot; gets access to the schema &amp;quot;lyklev&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql_2.png]]&lt;br /&gt;
&lt;br /&gt;
Fill in your schema name and the user you want to give access to. Next, hit the &amp;quot;execute&amp;quot; button, as highlighted in the figure.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=709</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=709"/>
				<updated>2012-08-14T14:48:04Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Using the menus in PgAdminIII */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. Note that in the PgAdminIII menus, this can only be done by a database administrator. If you are not a database administrator, you must use SQL.&lt;br /&gt;
&lt;br /&gt;
==== Using SQL ====&lt;br /&gt;
&lt;br /&gt;
If you are not a database administator for the flysafe database, the menus do not show the possibility to modify the schema rights, even if you can. In this case, you have to modify the schema rights by using SQL.&lt;br /&gt;
&lt;br /&gt;
Open the sql interface by clicking on the &amp;quot;SQL&amp;quot; button as shown in the figure. This will open the SQL interface.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SQL shown will be to create the object that is hightlighted. You can safely remove the code and type your own code.&lt;br /&gt;
To grant another user access to this schema, type&lt;br /&gt;
 &lt;br /&gt;
  GRANT USAGE ON SCHEMA &amp;lt;your schema name&amp;gt; TO &amp;lt;user name&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
This is shown in the following figure, where user &amp;quot;judy&amp;quot; gets access to the schema &amp;quot;lyklev&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql_2.png]]&lt;br /&gt;
&lt;br /&gt;
Fill in your schema name and the user you want to give access to. Next, hit the &amp;quot;execute&amp;quot; button, as highlighted in the figure.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=697</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=697"/>
				<updated>2012-07-11T09:57:40Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. Note that in the PgAdminIII menus, this can only be done by a database administrator. If you are not a database administrator, you must use SQL.&lt;br /&gt;
&lt;br /&gt;
==== Using the menus in PgAdminIII ====&lt;br /&gt;
&lt;br /&gt;
# In PgAdminIII look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name, &amp;quot;lyklev&amp;quot; in this example.&lt;br /&gt;
# Right-click the schema; a menu will appear, as shown.&lt;br /&gt;
# Click &amp;quot;Properties&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
After you click &amp;quot;Properties&amp;quot;, a dialog window will appear.&lt;br /&gt;
&lt;br /&gt;
# Click the privileges tab (highlighted in the figure below).&lt;br /&gt;
# Select the user you want to give access to at the &amp;quot;Role&amp;quot; option. In this example, this is user &amp;quot;tijs&amp;quot;.&lt;br /&gt;
# Select &amp;quot;usage&amp;quot;, as highlighted.&lt;br /&gt;
# Click on &amp;quot;Add/Change&amp;quot; to give user &amp;quot;tijs&amp;quot; the &amp;quot;usage&amp;quot; right to your schema. A new line will appear in the list.&lt;br /&gt;
# Finally, click on &amp;quot;Ok&amp;quot; to store the new rights.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
==== Using SQL ====&lt;br /&gt;
&lt;br /&gt;
If you are not a database administator for the flysafe database, the menus do not show the possibility to modify the schema rights, even if you can. In this case, you have to modify the schema rights by using SQL.&lt;br /&gt;
&lt;br /&gt;
Open the sql interface by clicking on the &amp;quot;SQL&amp;quot; button as shown in the figure. This will open the SQL interface.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SQL shown will be to create the object that is hightlighted. You can safely remove the code and type your own code.&lt;br /&gt;
To grant another user access to this schema, type&lt;br /&gt;
 &lt;br /&gt;
  GRANT USAGE ON SCHEMA &amp;lt;your schema name&amp;gt; TO &amp;lt;user name&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
This is shown in the following figure, where user &amp;quot;judy&amp;quot; gets access to the schema &amp;quot;lyklev&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql_2.png]]&lt;br /&gt;
&lt;br /&gt;
Fill in your schema name and the user you want to give access to. Next, hit the &amp;quot;execute&amp;quot; button, as highlighted in the figure.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=696</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=696"/>
				<updated>2012-07-11T09:56:07Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
The upload service is located at:&lt;br /&gt;
&lt;br /&gt;
  https://services.flysafe.sara.nl/cgi-bin/flysafe/uva_admin/templates.cgi&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. Note that in the PgAdminIII menus, this can only be done by a database administrator. If you are not a database administrator, you must use SQL.&lt;br /&gt;
&lt;br /&gt;
==== Using the menus in PgAdminIII ====&lt;br /&gt;
&lt;br /&gt;
# In PgAdminIII look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name, &amp;quot;lyklev&amp;quot; in this example.&lt;br /&gt;
# Right-click the schema; a menu will appear, as shown.&lt;br /&gt;
# Click &amp;quot;Properties&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
After you click &amp;quot;Properties&amp;quot;, a dialog window will appear.&lt;br /&gt;
&lt;br /&gt;
# Click the privileges tab (highlighted in the figure below).&lt;br /&gt;
# Select the user you want to give access to at the &amp;quot;Role&amp;quot; option. In this example, this is user &amp;quot;tijs&amp;quot;.&lt;br /&gt;
# Select &amp;quot;usage&amp;quot;, as highlighted.&lt;br /&gt;
# Click on &amp;quot;Add/Change&amp;quot; to give user &amp;quot;tijs&amp;quot; the &amp;quot;usage&amp;quot; right to your schema. A new line will appear in the list.&lt;br /&gt;
# Finally, click on &amp;quot;Ok&amp;quot; to store the new rights.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
==== Using SQL ====&lt;br /&gt;
&lt;br /&gt;
If you are not a database administator for the flysafe database, the menus do not show the possibility to modify the schema rights, even if you can. In this case, you have to modify the schema rights by using SQL.&lt;br /&gt;
&lt;br /&gt;
Open the sql interface by clicking on the &amp;quot;SQL&amp;quot; button as shown in the figure. This will open the SQL interface.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SQL shown will be to create the object that is hightlighted. You can safely remove the code and type your own code.&lt;br /&gt;
To grant another user access to this schema, type&lt;br /&gt;
 &lt;br /&gt;
  GRANT USAGE ON SCHEMA &amp;lt;your schema name&amp;gt; TO &amp;lt;user name&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
This is shown in the following figure, where user &amp;quot;judy&amp;quot; gets access to the schema &amp;quot;lyklev&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql_2.png]]&lt;br /&gt;
&lt;br /&gt;
Fill in your schema name and the user you want to give access to. Next, hit the &amp;quot;execute&amp;quot; button, as highlighted in the figure.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=695</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=695"/>
				<updated>2012-07-11T09:53:15Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Using SQL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. Note that in the PgAdminIII menus, this can only be done by a database administrator. If you are not a database administrator, you must use SQL.&lt;br /&gt;
&lt;br /&gt;
==== Using the menus in PgAdminIII ====&lt;br /&gt;
&lt;br /&gt;
# In PgAdminIII look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name, &amp;quot;lyklev&amp;quot; in this example.&lt;br /&gt;
# Right-click the schema; a menu will appear, as shown.&lt;br /&gt;
# Click &amp;quot;Properties&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
After you click &amp;quot;Properties&amp;quot;, a dialog window will appear.&lt;br /&gt;
&lt;br /&gt;
# Click the privileges tab (highlighted in the figure below).&lt;br /&gt;
# Select the user you want to give access to at the &amp;quot;Role&amp;quot; option. In this example, this is user &amp;quot;tijs&amp;quot;.&lt;br /&gt;
# Select &amp;quot;usage&amp;quot;, as highlighted.&lt;br /&gt;
# Click on &amp;quot;Add/Change&amp;quot; to give user &amp;quot;tijs&amp;quot; the &amp;quot;usage&amp;quot; right to your schema. A new line will appear in the list.&lt;br /&gt;
# Finally, click on &amp;quot;Ok&amp;quot; to store the new rights.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
==== Using SQL ====&lt;br /&gt;
&lt;br /&gt;
If you are not a database administator for the flysafe database, the menus do not show the possibility to modify the schema rights, even if you can. In this case, you have to modify the schema rights by using SQL.&lt;br /&gt;
&lt;br /&gt;
Open the sql interface by clicking on the &amp;quot;SQL&amp;quot; button as shown in the figure. This will open the SQL interface.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SQL shown will be to create the object that is hightlighted. You can safely remove the code and type your own code.&lt;br /&gt;
To grant another user access to this schema, type&lt;br /&gt;
 &lt;br /&gt;
  GRANT USAGE ON SCHEMA &amp;lt;your schema name&amp;gt; TO &amp;lt;user name&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
This is shown in the following figure, where user &amp;quot;judy&amp;quot; gets access to the schema &amp;quot;lyklev&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:annotation_sql_2.png]]&lt;br /&gt;
&lt;br /&gt;
Fill in your schema name and the user you want to give access to. Next, hit the &amp;quot;execute&amp;quot; button, as highlighted in the figure.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=File:Annotation_sql_2.png&amp;diff=694</id>
		<title>File:Annotation sql 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=File:Annotation_sql_2.png&amp;diff=694"/>
				<updated>2012-07-11T09:48:30Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=File:Annotation_sql.png&amp;diff=693</id>
		<title>File:Annotation sql.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=File:Annotation_sql.png&amp;diff=693"/>
				<updated>2012-07-11T09:48:06Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=687</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=687"/>
				<updated>2012-07-01T22:38:13Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Giving access to your schema */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. Note that in the PgAdminIII menus, this can only be done by a database administrator. If you are not a database administrator, you must use SQL.&lt;br /&gt;
&lt;br /&gt;
==== Using the menus in PgAdminIII ====&lt;br /&gt;
&lt;br /&gt;
# In PgAdminIII look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name, &amp;quot;lyklev&amp;quot; in this example.&lt;br /&gt;
# Right-click the schema; a menu will appear, as shown.&lt;br /&gt;
# Click &amp;quot;Properties&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
After you click &amp;quot;Properties&amp;quot;, a dialog window will appear.&lt;br /&gt;
&lt;br /&gt;
# Click the privileges tab (highlighted in the figure below).&lt;br /&gt;
# Select the user you want to give access to at the &amp;quot;Role&amp;quot; option. In this example, this is user &amp;quot;tijs&amp;quot;.&lt;br /&gt;
# Select &amp;quot;usage&amp;quot;, as highlighted.&lt;br /&gt;
# Click on &amp;quot;Add/Change&amp;quot; to give user &amp;quot;tijs&amp;quot; the &amp;quot;usage&amp;quot; right to your schema. A new line will appear in the list.&lt;br /&gt;
# Finally, click on &amp;quot;Ok&amp;quot; to store the new rights.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
==== Using SQL ====&lt;br /&gt;
&lt;br /&gt;
If you are not a database administator for the flysafe database, the menus do not show the possibility to modify the schema rights, even if you can. In this case, you have to modify the schema rights by using SQL.&lt;br /&gt;
&lt;br /&gt;
Open the sql interface by clicking on the &amp;quot;SQL&amp;quot; button. This will open the SQL interface.&lt;br /&gt;
&lt;br /&gt;
The SQL shown will be to create the object that is hightlighted. You can safely remove the code and type your own code.&lt;br /&gt;
 &lt;br /&gt;
The SQL query for granting access to your schema is:&lt;br /&gt;
&lt;br /&gt;
  GRANT USAGE ON &amp;lt;your schema name&amp;gt; TO &amp;lt;user name&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
Fill in your schema name and the user you want to give access to and select &amp;quot;execute&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Usage&amp;diff=685</id>
		<title>Usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Usage&amp;diff=685"/>
				<updated>2012-06-29T13:15:29Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Uploading UvAGPS log files using the Irods interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Working with the database directly == &lt;br /&gt;
&lt;br /&gt;
Users who have direct access to the database can retrieve retrieve data directly using Psql or PgadminIII, or from programming environments such as Matlab or R. The data in the database is stored in different tables to reduce redundancy. To get useful information, tables can be combined ('joined' in database terms) in queries. This section contains information of how to connect to the database, and when connected, how to combine tables in queries.&lt;br /&gt;
&lt;br /&gt;
* [[ Connecting to the UvA-BiTS database ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Connecting to the Flysafe database ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Useful Queries ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Queries for linking bird tracks to wind and flow data ]]&lt;br /&gt;
&lt;br /&gt;
* [[ Annotation tables ]] for uploading GPS anntotation data into your own schema&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=663</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=663"/>
				<updated>2012-03-08T09:02:04Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Sharing tables with other users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* give other users access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. &lt;br /&gt;
&lt;br /&gt;
# In PgAdminIII look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name, &amp;quot;lyklev&amp;quot; in this example.&lt;br /&gt;
# Right-click the schema; a menu will appear, as shown.&lt;br /&gt;
# Click &amp;quot;Properties&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
After you click &amp;quot;Properties&amp;quot;, a dialog window will appear.&lt;br /&gt;
&lt;br /&gt;
# Click the privileges tab (highlighted in the figure below).&lt;br /&gt;
# Select the user you want to give access to at the &amp;quot;Role&amp;quot; option. In this example, this is user &amp;quot;tijs&amp;quot;.&lt;br /&gt;
# Select &amp;quot;usage&amp;quot;, as highlighted.&lt;br /&gt;
# Click on &amp;quot;Add/Change&amp;quot; to give user &amp;quot;tijs&amp;quot; the &amp;quot;usage&amp;quot; right to your schema. A new line will appear in the list.&lt;br /&gt;
# Finally, click on &amp;quot;Ok&amp;quot; to store the new rights.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=662</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=662"/>
				<updated>2012-03-08T08:57:22Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Sharing tables with other users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your schema ===&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. &lt;br /&gt;
&lt;br /&gt;
# In PgAdminIII look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name, &amp;quot;lyklev&amp;quot; in this example.&lt;br /&gt;
# Right-click the schema; a menu will appear, as shown.&lt;br /&gt;
# Click &amp;quot;Properties&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
After you click &amp;quot;Properties&amp;quot;, a dialog window will appear.&lt;br /&gt;
&lt;br /&gt;
# Click the privileges tab (highlighted in the figure below).&lt;br /&gt;
# Select the user you want to give access to at the &amp;quot;Role&amp;quot; option. In this example, this is user &amp;quot;tijs&amp;quot;.&lt;br /&gt;
# Select &amp;quot;usage&amp;quot;, as highlighted.&lt;br /&gt;
# Click on &amp;quot;Add/Change&amp;quot; to give user &amp;quot;tijs&amp;quot; the &amp;quot;usage&amp;quot; right to your schema. A new line will appear in the list.&lt;br /&gt;
# Finally, click on &amp;quot;Ok&amp;quot; to store the new rights.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Giving access to your tables ===&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=File:Schema_user_rights_2.png&amp;diff=661</id>
		<title>File:Schema user rights 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=File:Schema_user_rights_2.png&amp;diff=661"/>
				<updated>2012-03-08T08:55:52Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=File:Schema_user_rights_1.png&amp;diff=660</id>
		<title>File:Schema user rights 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=File:Schema_user_rights_1.png&amp;diff=660"/>
				<updated>2012-03-08T08:55:29Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=659</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=659"/>
				<updated>2012-03-08T08:55:03Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Sharing data with other users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema. The owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read the contents of the table. The contents are still protected, so they cannot be changed by other users.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser.&lt;br /&gt;
&lt;br /&gt;
To give other users access to your tables, you must first give the other users access to your schema. &lt;br /&gt;
&lt;br /&gt;
# In PgAdminIII look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name, &amp;quot;lyklev&amp;quot; in this example.&lt;br /&gt;
# Right-click the schema; a menu will appear, as shown.&lt;br /&gt;
# Click &amp;quot;Properties&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
After you click &amp;quot;Properties&amp;quot;, a dialog window will appear.&lt;br /&gt;
&lt;br /&gt;
# Click the privileges tab (highlighted in the figure below).&lt;br /&gt;
# Select the user you want to give access to at the &amp;quot;Role&amp;quot; option. In this example, this is user &amp;quot;tijs&amp;quot;.&lt;br /&gt;
# Select &amp;quot;usage&amp;quot;, as highlighted.&lt;br /&gt;
# Click on &amp;quot;Add/Change&amp;quot; to give user &amp;quot;tijs&amp;quot; the &amp;quot;usage&amp;quot; right to your schema. A new line will appear in the list.&lt;br /&gt;
# Finally, click on &amp;quot;Ok&amp;quot; to store the new rights.&lt;br /&gt;
&lt;br /&gt;
[[File:Schema_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=658</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=658"/>
				<updated>2012-03-05T15:55:28Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Sharing tables with other users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing data with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema and the owner will be the user who uploaded the table. By default, both your schema and the tables contained in the schema are only accessible by you. If you want to share data with other users, you need to:&lt;br /&gt;
* give other users the right to use your schema;&lt;br /&gt;
* access the tables in your schema.&lt;br /&gt;
&lt;br /&gt;
You can give other users access to your schema and the tables contained in your schema using a database administration tool, such as PgAdminIII. The following example shows how to give another user the usage privilege to your schema. The second step shows how to give another user read-only access to the recently uploaded table, so that the other user can read, but not edit the contents of the table.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser, which is the left pane in the window, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
First, you must give the other user the &amp;quot;usage&amp;quot; right of your schema. &lt;br /&gt;
Look for the database &amp;quot;flysafe&amp;quot;, open the &amp;quot;schemas&amp;quot; item and locate your own schema. This is the schema with the same name as your login name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that you have given access rights to your schema, other users can see the contents of your schema, but they cannot yet access tables. To give another user access to a table, &lt;br /&gt;
unfold your schema&lt;br /&gt;
and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=657</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=657"/>
				<updated>2012-03-02T09:30:34Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* ToDo List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Urgent issues ===&lt;br /&gt;
&lt;br /&gt;
* There is missing data for device 211, for February 2012.&lt;br /&gt;
** Find out why this data is missing, re-import the data&lt;br /&gt;
** Find out why no error was reported and fix the failed mechanism&lt;br /&gt;
&lt;br /&gt;
* Matlab script wrapper fail for firmware versions 1.0.3.4 and 1.0.3.5&lt;br /&gt;
** Adjust matlab script wrapper to accept these firmware versions.&lt;br /&gt;
&lt;br /&gt;
=== Medium priority ===&lt;br /&gt;
&lt;br /&gt;
* Get the &amp;quot;projects&amp;quot; table working&lt;br /&gt;
** Make it work so that is causes ''fewer'' issues, not more. If this is not possible, streamline the old-fashioned way of creating users and granting access&lt;br /&gt;
** Give WB access to the projects table.&lt;br /&gt;
&lt;br /&gt;
* Extension of the table &amp;quot;gps.uva_devices&amp;quot;&lt;br /&gt;
** JS will specify which new columns need to be added.&lt;br /&gt;
&lt;br /&gt;
* New hardware specification&lt;br /&gt;
** Coen will write down a first draft specification of the new hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Lower priority issues ===&lt;br /&gt;
&lt;br /&gt;
* Userflag application&lt;br /&gt;
** There appears to be an application for flagging invalid GPS data. What is the status of this application? Who has access?&lt;br /&gt;
&lt;br /&gt;
=== Change requests ===&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
(empty)&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If there is an error during the processing of a GPS file, move that file to a &amp;quot;failed&amp;quot; subdirectory.&lt;br /&gt;
** ''Failed files are moved to a &amp;quot;failed&amp;quot; subdirectory in the same place as the failed file.''&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the UvA-bits web site.&lt;br /&gt;
** ''Scripts and urls have been provided to Aart-Jan for the UvA-bits web site''&lt;br /&gt;
&lt;br /&gt;
* Automatically and periodically generate power graphs for the GPS loggers; take the graph generating program from the Matlab script wrapper.&lt;br /&gt;
** ''Script is run periodically; plots are placed in a directory where the UvA-bits web site can read them from. Graphs are generated for all loggers. To protect the generated images so only authorized users can see them, only the UvA-bits machine can access these graphs. Access must be controlled by the UvA-bits machine.''&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices.''&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=637</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=637"/>
				<updated>2012-02-07T10:46:21Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Administration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
(empty)&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If there is an error during the processing of a GPS file, move that file to a &amp;quot;failed&amp;quot; subdirectory.&lt;br /&gt;
** ''Failed files are moved to a &amp;quot;failed&amp;quot; subdirectory in the same place as the failed file.''&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the UvA-bits web site.&lt;br /&gt;
** ''Scripts and urls have been provided to Aart-Jan for the UvA-bits web site''&lt;br /&gt;
&lt;br /&gt;
* Automatically and periodically generate power graphs for the GPS loggers; take the graph generating program from the Matlab script wrapper.&lt;br /&gt;
** ''Script is run periodically; plots are placed in a directory where the UvA-bits web site can read them from. Graphs are generated for all loggers. To protect the generated images so only authorized users can see them, only the UvA-bits machine can access these graphs. Access must be controlled by the UvA-bits machine.''&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices.''&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=636</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=636"/>
				<updated>2012-02-07T10:40:29Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
(empty)&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If there is an error during the processing of a GPS file, move that file to a &amp;quot;failed&amp;quot; subdirectory.&lt;br /&gt;
** ''Failed files are moved to a &amp;quot;failed&amp;quot; subdirectory in the same place as the failed file.''&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices.''&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=635</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=635"/>
				<updated>2012-02-07T10:37:22Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Finished */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
(empty)&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices.''&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=634</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=634"/>
				<updated>2012-02-07T10:36:35Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Public web site */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
(empty)&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=606</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=606"/>
				<updated>2012-01-30T12:32:33Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== CSV Files ===&lt;br /&gt;
&lt;br /&gt;
The records that you want to upload must be stored in CSV (comma-separated value) files. The file must meet the following requirements:&lt;br /&gt;
&lt;br /&gt;
* the first line of the file must contain the column names, separated with commas&lt;br /&gt;
* each next line must contain the data fields in the same order as the column names, separated with commas&lt;br /&gt;
* the column names must be unique&lt;br /&gt;
* spaces around column names and fields are always ignored&lt;br /&gt;
* in column names, there is no distinction between uppercase and lowercase.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_info_serial = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema and the owner will be the user who uploaded the table. By default, no other users can access the uploaded table. You can share your tables with other users using a database administration tool, such as PgAdminIII. The following example shows how to give another user read-only access to the recently uploaded table, so that the other user can read, but not edit the contents of the table.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser, which is the left pane in the window, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
Look for the database &amp;quot;flysafe&amp;quot; and unfold the schema with your&lt;br /&gt;
login name and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=UvAGPS&amp;diff=573</id>
		<title>UvAGPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=UvAGPS&amp;diff=573"/>
				<updated>2011-12-07T16:31:49Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* UVA_TRACKING_SPEED or UVA_TRACKING_SPEED_LIMITED */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= UvAGPS Data Model =&lt;br /&gt;
&lt;br /&gt;
For different versions of the UvAGPS firmware different tables are used. For firmware version v0.9.3.6 till v1.0.0.X the tables UVA_ENGINEERING_DATA and UVA_TRACKING_DATA are used. But in the new firmware versions 1.0.1.4 till 1.0.2.4 so much information was added  that new tables were introduced. However for the most important tracking tables a view is created so that all similar tracking for all types of firmware can be seen in one view. That is the UVA_TRACKING view. &lt;br /&gt;
&lt;br /&gt;
All tables, views and functions are also in the GPS schema.&lt;br /&gt;
&lt;br /&gt;
Not everybody has access to all data.  For most users access is limited to &amp;quot;limited&amp;quot; views that only give access to selected devices. &lt;br /&gt;
&lt;br /&gt;
== UVA_TRACKING_DATA or UVA_TRACKING_LIMITED ==&lt;br /&gt;
&lt;br /&gt;
Tracking data from UvA GPS tags for older firmware&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||GMT&lt;br /&gt;
|-&lt;br /&gt;
|latitude||float8||||||Decimal degrees&lt;br /&gt;
|-&lt;br /&gt;
|longitude||float8||||||Decimal degrees&lt;br /&gt;
|-&lt;br /&gt;
|h_accuracy||float8||||||Horizontal accuracy (m)&lt;br /&gt;
|-&lt;br /&gt;
|v_accuracy||float8||||||Vertical accuracy (m)&lt;br /&gt;
|-&lt;br /&gt;
|altitude ||float8||||||m&lt;br /&gt;
|-&lt;br /&gt;
|x_acceleration||Float8||||||x axis acceleration (m/s&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;2) movement to right is + and to left is -&lt;br /&gt;
|-&lt;br /&gt;
|y_acceleration||Float8||||||y axis acceleration (m/s&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;2) forward movement is + and backwards is -&lt;br /&gt;
|-&lt;br /&gt;
|z_acceleration||Float8||||||z axis acceleration (m/s&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;2) upwards movement is + downwards is -&lt;br /&gt;
|-&lt;br /&gt;
|speed ||float8||||||m/s&lt;br /&gt;
|-&lt;br /&gt;
|course||float8||||||Degrees&lt;br /&gt;
|-&lt;br /&gt;
|pressure||float8||||||Pressure sensor (pascal)&lt;br /&gt;
|-&lt;br /&gt;
|temperature||Float8||||||Degrees celcius&lt;br /&gt;
|-&lt;br /&gt;
|solar_voltage||Float8||||||V&lt;br /&gt;
|-&lt;br /&gt;
|battery_voltage||Float8||||||V&lt;br /&gt;
|-&lt;br /&gt;
|userflag||Integer||||||Data flagged as unacceptable by user&lt;br /&gt;
|-&lt;br /&gt;
|  “&amp;quot;location”&amp;quot;||geometry||||||postgreSQL geometry&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UVA_ENGINEERING_DATA ==&lt;br /&gt;
&lt;br /&gt;
Engineering data from UvA GPS tags for older firmware&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||GMT&lt;br /&gt;
|-&lt;br /&gt;
|t_syncsts||smallint||||||0: not synced, 1: user synced, 2: Gps synced&lt;br /&gt;
|-&lt;br /&gt;
|t_entzt||smallint||||||0: UCT time,1: TZT time (timezone time)&lt;br /&gt;
|-&lt;br /&gt;
|gzp_currentrategps||int4||||||&lt;br /&gt;
|-&lt;br /&gt;
|gzp_currentratecom||int4||||||&lt;br /&gt;
|-&lt;br /&gt;
|gzp_currentratepwr||int4||||||&lt;br /&gt;
|-&lt;br /&gt;
|sbm_voltagesolarpanel||float8||||||&lt;br /&gt;
|-&lt;br /&gt;
|sbm_voltagebattery||float8||||||&lt;br /&gt;
|-&lt;br /&gt;
|sbm_chargemode||int2||||||&lt;br /&gt;
|-&lt;br /&gt;
|egzp_mainrategps||integer||||||&lt;br /&gt;
|-&lt;br /&gt;
|egzp_mainratecom||integer||||||&lt;br /&gt;
|-&lt;br /&gt;
|egzp_mainratepwr||integer||||||&lt;br /&gt;
|-&lt;br /&gt;
|smg_on||text||||||&lt;br /&gt;
|-&lt;br /&gt;
|smg_off||text||||||&lt;br /&gt;
|-&lt;br /&gt;
|smg_esavegpsrate||integer||||||&lt;br /&gt;
|-&lt;br /&gt;
|smz_on||text||||||&lt;br /&gt;
|-&lt;br /&gt;
|smz_off||text||||||&lt;br /&gt;
|-&lt;br /&gt;
|smz_esavecomrate||integer||||||&lt;br /&gt;
|-&lt;br /&gt;
|gpsnavigationmode||smallint||||||&lt;br /&gt;
|-&lt;br /&gt;
|gpsfixtimeout||smallint||||||&lt;br /&gt;
|-&lt;br /&gt;
|eh||text||||||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== UVA_DEVICE or UVA_DEVICE_LIMITED == &lt;br /&gt;
&lt;br /&gt;
To be able to track the different firmware versions and specific properties for the different devices the UVA_DEVICE table was added. This table also includes essential information needed to calibrate the accelerometers. For more information see [[UvAGPS|Accelerometer calibration]]&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
| device_info_serial || integer || PK || NOT NULL || Serial number of tag&lt;br /&gt;
|- &lt;br /&gt;
| firmware_version || text |||| NOT NULL || Firmware version installed on tag&lt;br /&gt;
|-&lt;br /&gt;
| device_mass || double |||||||Mass of tag (g)&lt;br /&gt;
|-&lt;br /&gt;
| x_s|| double |||||||Calibration sensitivity of accelerometer in the x-axis &lt;br /&gt;
|-&lt;br /&gt;
| y_s|| double |||||||Calibration sensitivity of accelerometer in the y-axis &lt;br /&gt;
|-&lt;br /&gt;
| z_s|| double |||||||Calibration sensitivity of accelerometer in the z-axis &lt;br /&gt;
|-&lt;br /&gt;
| x_o|| double |||||||Calibration offset of accelerometer in the x-axis &lt;br /&gt;
|-&lt;br /&gt;
| y_o|| double |||||||Calibration offset of accelerometer in the y-axis &lt;br /&gt;
|-&lt;br /&gt;
| z_o|| double |||||||Calibration offset of accelerometer in the z-axis &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UVA_COMM101 or UVA_COMM_LIMITED== &lt;br /&gt;
&lt;br /&gt;
Communication table indicates status and result of communications with ground stations. Only for newer firmware.&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
| device_info_serial || integer || PK || NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
| date_time || timestamp || PK || NOT NULL || timestamp of start communication&lt;br /&gt;
|-&lt;br /&gt;
| date_time_end || timestamp |||||| timestamp of end communication           &lt;br /&gt;
|-&lt;br /&gt;
| date_time_utc || timestamp |||||| date_time in utc (if available)&lt;br /&gt;
|-&lt;br /&gt;
| date_time_end_utc || timestamp |||||| date_time_end in utc (if available)&lt;br /&gt;
|-&lt;br /&gt;
| action || text|||||| JOINED / RESCHEDULE  ??&lt;br /&gt;
|-&lt;br /&gt;
| bytes_communicated || integer |||||| Number of bytes communicated (total of all bytes per DATA line)  &lt;br /&gt;
|-&lt;br /&gt;
|status || text |||||| READY, TIMEOUT, LOWPOWER, MISSING&lt;br /&gt;
|-&lt;br /&gt;
| network_join_time || integer||||||milliseconds&lt;br /&gt;
|-&lt;br /&gt;
| number_identical_lines || integer |||||| Number identical lines in data block. Gives indication &lt;br /&gt;
|-&lt;br /&gt;
| non_ascii_char || integer |||||| Number of non ascii characters (indicated by question-mark ?)&lt;br /&gt;
|-&lt;br /&gt;
| sts_time || timestamp |||||| derived from S0 hh,mi&lt;br /&gt;
|-&lt;br /&gt;
| timesynced || smallint|||||| TimeSynced (0=not sy:wnced, 1=user set, 2=Gps Synced)&lt;br /&gt;
|-&lt;br /&gt;
|devicemode || smallint||||||DeviceMode (0-99)&lt;br /&gt;
|-&lt;br /&gt;
| vbat || float |||||| Battery voltage in V (0-~4.200V) &lt;br /&gt;
|-&lt;br /&gt;
|logb || integer |||||| logged bytes, waiting for download (0-4Mbyte)&lt;br /&gt;
|-&lt;br /&gt;
| logp || smallint |||||| Logged percentage (units 0.1%) of memory waiting to be downloaded (0-1000)&lt;br /&gt;
|-&lt;br /&gt;
| gpsii || integer |||||| GpsIval, current (0-65535)&lt;br /&gt;
|-&lt;br /&gt;
|comii || integer|||||| ComIval, current (0-65535)&lt;br /&gt;
|-&lt;br /&gt;
|accii || integer|||||| AcceleroIval, current (0-65535)&lt;br /&gt;
|-&lt;br /&gt;
|swddd || integer|||||| User switches, current (0-65535) &lt;br /&gt;
|-&lt;br /&gt;
|last_gps_fix ||timestamp||||||timestamp of last fix&lt;br /&gt;
|-&lt;br /&gt;
|latitude||float||||||Latitude of last fix. Decimal degrees &lt;br /&gt;
|-&lt;br /&gt;
|longitude||float||||||Longitude of last fix. Decimal degrees&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UVA_SETTINGS101 or UVA_SETTINGS_LIMITED  == &lt;br /&gt;
&lt;br /&gt;
Settings are either from C0-C1-C9 lines or parsed from uplink communication lines &lt;br /&gt;
If C0-C1 is parsed its values are compared with the previous value and if the settings are the &lt;br /&gt;
same no new records needs to be added &lt;br /&gt;
If uplink settings are parsed wait till the last setting has been seen, (DL command or EOF) &lt;br /&gt;
then store all the new settings in one record. Only for newer firmware.&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||Derive timestamp from Hh:mi fields in C0 combined with computer timestamp in JOINED line&lt;br /&gt;
|-&lt;br /&gt;
|timesynced || smallint ||||||&lt;br /&gt;
|-&lt;br /&gt;
|timezone_time || smallint ||||||&lt;br /&gt;
|-&lt;br /&gt;
|swddd || integer|||||| SpecialUserSwitches &lt;br /&gt;
|-&lt;br /&gt;
|gpsnavmode || smallint|||||| GpsNavMode 0-7&lt;br /&gt;
|-&lt;br /&gt;
|gpsreceivermode || smallint |||||| GpsReceiverNode 0-3&lt;br /&gt;
|-&lt;br /&gt;
|gpsfixtime || smallint|||||| GpsFixTime 0-255&lt;br /&gt;
|-&lt;br /&gt;
|gps_ivaln_on_h || smallint|||||| hours Gps IvalN on&lt;br /&gt;
|-&lt;br /&gt;
|gps_ivaln_on_m || smallint|||||| minutes Gps IvalN on &lt;br /&gt;
|-&lt;br /&gt;
|gps_ivaln  || integer|||||| GpsIvalN (0-65530)&lt;br /&gt;
|-&lt;br /&gt;
|gps_ivale_on_h || smallint|||||| hours Gps IvalE on&lt;br /&gt;
|-&lt;br /&gt;
|gps_ivale_on_m || smallint|||||| minutes GpS IvalE on&lt;br /&gt;
|-&lt;br /&gt;
|gps_ivale  || integer|||||| GpsIvalE &lt;br /&gt;
|-&lt;br /&gt;
|com_ivaln_on_h || smallint|||||| hours Com IvalN on&lt;br /&gt;
|-&lt;br /&gt;
|com_ivaln_on_m || smallint|||||| minutes Com IvalN on&lt;br /&gt;
|-&lt;br /&gt;
|com_ivaln || integer|||||| ComIvalN (0-65530)&lt;br /&gt;
|-&lt;br /&gt;
|com_ivale_on_h || smallint|||||| hours Com IvalE on&lt;br /&gt;
|-&lt;br /&gt;
|com_ivale_on_m || smallint|||||| minutes Com IvalE on&lt;br /&gt;
|-&lt;br /&gt;
|com_ivale || integer|||||| ComIvalE&lt;br /&gt;
|-&lt;br /&gt;
|accii || integer|||||| Accelero measurement interval         &lt;br /&gt;
|-&lt;br /&gt;
|accbn || integer|||||| Accelero number of blocks &lt;br /&gt;
|-&lt;br /&gt;
|accsn || integer|||||| Accelero number of samples (0-65536)&lt;br /&gt;
|-&lt;br /&gt;
|f || smallint||||||Accelero sample frequency  (0=20Hz, 1=10Hz, 2=5Hz, 3=1Hz)&lt;br /&gt;
|-&lt;br /&gt;
|pdp || smallint|||||| PdopMsk (3-250)&lt;br /&gt;
|-&lt;br /&gt;
|pac||smallint|||||| PaccMsk (10-100)&lt;br /&gt;
|-&lt;br /&gt;
|tdp ||smallint|||||| TdopMsk (3-250)&lt;br /&gt;
|-&lt;br /&gt;
|tac ||smallint|||||| TaccMsk (30-300)&lt;br /&gt;
|-&lt;br /&gt;
|ga || smallint|||||| Additional Fixes GpsIval mode (3-25) before interval fix is logged&lt;br /&gt;
|-&lt;br /&gt;
|aol || smallint||||||AccMemOffLev (100 - 950) units 0.1%; if Memfull above  this level all Accelero activity will be overruled and switched off untill MemFull &amp;lt; level - 5&lt;br /&gt;
|-&lt;br /&gt;
|eventnum || text|||||| 12 eventnumbers (0-0xff) only printed if not zero, therfore converted to text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== UVA_TRACKING_DATA101 or UVA_TRACKING_LIMITED==&lt;br /&gt;
&lt;br /&gt;
The tracking dat for newer firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||&lt;br /&gt;
|-&lt;br /&gt;
|latitude ||float||||||Decimal degrees&lt;br /&gt;
|-&lt;br /&gt;
|longitude ||float||||||Decimal degrees&lt;br /&gt;
|-&lt;br /&gt;
|altitude ||integer||||||heigth above sealevel meters&lt;br /&gt;
|-&lt;br /&gt;
|pressure ||integer||||||in pascal (1mBar = 100Pa, 1pressuremeter = ~12Pa)&lt;br /&gt;
|-&lt;br /&gt;
|temperature ||float||||||in celcius degrees&lt;br /&gt;
|-&lt;br /&gt;
|satellites_used ||smallint||||||satellites used for fix &lt;br /&gt;
|-&lt;br /&gt;
|gps_fixtime ||float||||||GpsFixTime in seconds &lt;br /&gt;
|-&lt;br /&gt;
|positiondop ||float||||||Position DOP in units&lt;br /&gt;
|-&lt;br /&gt;
|h_accuracy || float||||||Horizontal accuracy (units of meter)&lt;br /&gt;
|-&lt;br /&gt;
|v_accuracy || float||||||Vertical accuracy (units of meter)&lt;br /&gt;
|-&lt;br /&gt;
|x_speed ||float||||||Speed in x-axis (m/s)&lt;br /&gt;
|-&lt;br /&gt;
|y_speed ||float||||||Speed in y-axis (m/s)&lt;br /&gt;
|-&lt;br /&gt;
|z_speed ||float||||||Speed in z-axis (m/s)&lt;br /&gt;
|-&lt;br /&gt;
|speed_accuracy || float||||||Speed accuracy (m/s) &lt;br /&gt;
|-&lt;br /&gt;
|userflag||Integer||||||Data flagged as unacceptable by user if not 0&lt;br /&gt;
|-&lt;br /&gt;
|location || geometry |||||| lat/long as PostGIS geometry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UVA_ACC_START102 or UVA_ACC_START_LIMITED ==&lt;br /&gt;
&lt;br /&gt;
General acceleration entry associated with a set of accelerations. Added in Firmware 1.0.2.7 because there line numbers were introduced for acceleration lines so that these lines can be tracked.  &lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||&lt;br /&gt;
|-&lt;br /&gt;
|line_counter||integer||||||Number of lines associated with this set of accelerations&lt;br /&gt;
|-&lt;br /&gt;
|timesynced||smallint||||||TimeSynced (0=not synced, 1=user set, 2=Gps Synced)&lt;br /&gt;
|-&lt;br /&gt;
|accii||integer||||||Accelero measurement interval&lt;br /&gt;
|-&lt;br /&gt;
|accsn||integer||||||Number of samples (0-65536)&lt;br /&gt;
|-&lt;br /&gt;
|f||smallint||||||Accelero sample frequency (0=20Hz, 1=10Hz, 2=5Hz, 3=1Hz)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== UVA_ACCELERATION101 or UVA_ACCELERATION_LIMITED == &lt;br /&gt;
&lt;br /&gt;
Acceleration entries if accelerometer was turned on. Only for newer firmware. Actual measurements have shown that the range of values for x,y and z are larger then indicated by the manufacturer.  For more information about calibration and interpretation of accelerometer data see [[UvAGPS#Accelerometer_calibration|Accelerometer calibration]]&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||&lt;br /&gt;
|-&lt;br /&gt;
|index ||smallint||PK||NOT NULL||&lt;br /&gt;
|-&lt;br /&gt;
|x_acceleration ||smallint||||||acceleration in X-axis (-2666 till 2666)&lt;br /&gt;
|-&lt;br /&gt;
|y_acceleration ||smallint||||||acceleration in Y-axis (-2666 till 2666)&lt;br /&gt;
|-&lt;br /&gt;
|z_acceleration ||smallint||||||acceleration in Z-axis (-2666 till 2666)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UVA_ENERGY101 or UVA_ENERGY_LIMITED ==&lt;br /&gt;
&lt;br /&gt;
Only for newer firmware.&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||&lt;br /&gt;
|-&lt;br /&gt;
|timesynced ||smallint||||||TimeSynced (0=not synced, 1=user set, 2=Gps synced)&lt;br /&gt;
|-&lt;br /&gt;
|devicemode ||smallint||||||(0-99)&lt;br /&gt;
|-&lt;br /&gt;
|vsll ||float||||||Solar Voltage during charging in mV (0-~2500)&lt;br /&gt;
|-&lt;br /&gt;
|vbat ||float||||||Battery Voltage in V (0-~4.200)&lt;br /&gt;
|-&lt;br /&gt;
|ssw ||smallint|||||| Solar Cell Switches ... (0-255) fw1022 and up &lt;br /&gt;
|-&lt;br /&gt;
| ||||||||extended fields if special user switch is on &lt;br /&gt;
|-&lt;br /&gt;
|vsoo ||float|||||| Solar voltage open in V (0-~2.500)&lt;br /&gt;
|-&lt;br /&gt;
|vdrf ||float||||||reference voltage Dac in V (0-~2.435)&lt;br /&gt;
|-&lt;br /&gt;
|vchr ||float||||||charge current voltage&lt;br /&gt;
|-&lt;br /&gt;
|g ||smallint|||||| Gps battery threshold OK&lt;br /&gt;
|-&lt;br /&gt;
|c || smallint||||||Com battery threshold OK&lt;br /&gt;
|-&lt;br /&gt;
|m || smallint||||||Charge Mode (0,1,2 Com battery threshold OK&lt;br /&gt;
|-&lt;br /&gt;
|pressure || integer|||||| in pascal (1mBar = 100Pa, 1pressuremeter = ~12Pa)&lt;br /&gt;
|-&lt;br /&gt;
|temperature || float|||||| in celcius degrees   &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== UVA_TRACKING  or UVA_TRACKING_LIMITED == &lt;br /&gt;
&lt;br /&gt;
View to show identical fields for older and newer firmware tracking data&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||int4||PK||NOT NULL ||&lt;br /&gt;
|-&lt;br /&gt;
|date_time||timestamp||PK||NOT NULL||&lt;br /&gt;
|-&lt;br /&gt;
|latitude||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|longitude||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|altitude||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|pressure||integer|||||&lt;br /&gt;
|-&lt;br /&gt;
|temperature||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|h_accuracy||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|v_accuracy||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|x_speed||float||||||meters/second&lt;br /&gt;
|-&lt;br /&gt;
|y_speed||float||||||meters/second&lt;br /&gt;
|-&lt;br /&gt;
|z_speed||float||||||meters/second&lt;br /&gt;
|-&lt;br /&gt;
|gps_fixtime||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|userflag||integer||||||Flagged as inacceptable by user if not 0&lt;br /&gt;
|-&lt;br /&gt;
|satellites_used||smallint||||||&lt;br /&gt;
|-&lt;br /&gt;
|positiondop||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|speed_accuracy||float||||||&lt;br /&gt;
|-&lt;br /&gt;
|location||geometry||||||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UVA_TRACKING_SPEED or UVA_TRACKING_SPEED_LIMITED == &lt;br /&gt;
&lt;br /&gt;
Additional view that computes with the x_speed, y_speed and z_speed components the vnorth, veast and vdown speed components as well as the 3D speed in meters/second. &lt;br /&gt;
&lt;br /&gt;
In addition to the fields in the UVA_TRACKING view this view adds :&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|vnorth||float||||||- vx * sin(lat) * cos(long) - vy * sin(lat) * sin (long) + vz * cos(lat)&lt;br /&gt;
|-&lt;br /&gt;
|veast||float|||||| - vx * sin(lon) + vy * cos(lon)&lt;br /&gt;
|-&lt;br /&gt;
|vdown||float|||||| - vx * cos(lat) * cos(lon) - vy * cos(lat) * sin(lon) - vz * sin(lat)&lt;br /&gt;
|-&lt;br /&gt;
|speed||float|||||| sqrt(vnorth^2 + veast^2)&lt;br /&gt;
|-&lt;br /&gt;
|speed3d || float |||||| sqrt(vnorth^2 + veast^2 + vdown^2)&lt;br /&gt;
|-&lt;br /&gt;
|direction||float|||||| heading in degrees; 0 is north, 90 is east&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== UVA_WARNING102 or UVA_WARNING_LIMITED ==&lt;br /&gt;
&lt;br /&gt;
Since firmware version 1.0.2.7 this table was added as catchall for tags that do not occur very often (C10, C20) or errors that occur during parsing. &lt;br /&gt;
For example all CRC failures can be selected with : &lt;br /&gt;
&lt;br /&gt;
  select * from gps.uva_warning102 &lt;br /&gt;
  where warning = 'CRC8 failure'&lt;br /&gt;
  order by device_info_serial;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|'''Field'''||'''Type'''||'''Key'''||'''Constraints'''||'''Comments'''&lt;br /&gt;
|-&lt;br /&gt;
|device_info_serial||integer||PK||NOT NULL||&lt;br /&gt;
|-&lt;br /&gt;
|filename||text||PK||NOT NULL||UvAGPS log filename &lt;br /&gt;
|-&lt;br /&gt;
|linenumber||integer||PK||NOT NULL||linenumber in file &lt;br /&gt;
|-&lt;br /&gt;
|warning||text||||||The warming message or tag&lt;br /&gt;
|-&lt;br /&gt;
|line||text||||||The actual line in the file &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= UvAGPS functions =&lt;br /&gt;
&lt;br /&gt;
== get_uvagps_track_speed ==&lt;br /&gt;
&lt;br /&gt;
Compute distance (meters), time-interval, speed (meters/second) and heading (degrees) for a series of subsequent tracking entries with specific device_info_serial.&lt;br /&gt;
For the first entry in the sequence these values will always be missing because they are computed  as the difference between subsequent rows.&lt;br /&gt;
&lt;br /&gt;
Usage examples :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select * from gps.get_uvagps_track_speed(119, '2008-01-01 00:00:00', '2010-01-01 00:00:00');&lt;br /&gt;
&lt;br /&gt;
select * from gps.get_uvagps_track_speed(119);&lt;br /&gt;
&lt;br /&gt;
select t.*, a.distance, a.interval, a.speed, a.direction from gps.get_uvagps_track_speed(119, '2008-01-01 00:00:00', '2010-01-01 00:00:00') a join gps.uva_tracking t using(device_info_serial, date_time);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Distances and heading are calculated with spherical correction with the Haversine formula as described [http://http://www.movable-type.co.uk/scripts/latlong.html here]. &lt;br /&gt;
The heading is the initial heading. PostGIS does not calculate the heading, so therefore we don't use PostGIS.&lt;br /&gt;
&lt;br /&gt;
In these functions the records that have been flagged as invalid by setting the '''userflag''' are not taken into account and discarded. &lt;br /&gt;
If it is required get the speed for all records  a additional boolean argument for '''get raw data''' can be given. i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select * from gps.get_uvagps_track_speed(119, '2008-01-01 00:00:00', '2010-01-01 00:00:00', true);&lt;br /&gt;
&lt;br /&gt;
select * from gps.get_uvagps_track_speed(119, true);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== get_uvagps_track_distance ==&lt;br /&gt;
&lt;br /&gt;
Compute distance (meters) for UvAGPS tracks to arbitrary point in lat/long or geometry location &lt;br /&gt;
&lt;br /&gt;
Example usage :&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select * from gps.get_uvagps_track_distance(119, 52.1897017, 6.1996606); &lt;br /&gt;
&lt;br /&gt;
select * from gps.get_uvagps_track_distance(119, (select location from gps.uva_tracking where device_info_serial = 119 and date_time = '2009-05-07 19:55:08')); &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here the distance is calculated with the PostGIS distance_sphere function which uses spherical correction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== get_uvagps_track_distance_direction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compute distance (meters) and direction (degrees) for UvAGPS tracks from arbitrary point in lat/long or geometry location&lt;br /&gt;
&lt;br /&gt;
Example usage: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select * from gps.get_uvagps_track_distance_direction(119, 52.1897017, 6.1996606); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Distances and direction are calculated with spherical correction with the Haversine formula as described [http://http://www.movable-type.co.uk/scripts/latlong.html here]. The direction is the direction from the given point.&lt;br /&gt;
&lt;br /&gt;
In this function the records where the '''userflag''' has been set are discarded. To see  these records a additional boolean argument for '''show raw data''' should  be added like :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select * from gps.get_uvagps_track_distance_direction(119, 52.1897017, 6.1996606, true); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Accelerometer calibration =&lt;br /&gt;
&lt;br /&gt;
The accelerometer measures the acceleration in 3D (20 times per second). Acceleration is caused by gravity (static component) and by a change in speed (dynamic component). &lt;br /&gt;
When the logger is static in horizontal position (solar cells up), gravity (green arrow) shows a  heave (vertical acceleration, z) of +1 g (1 g = 9.81 m.s&amp;lt;sup&amp;gt;-2&amp;lt;/sup&amp;gt;) while surge and heave are both 0. When the front of the logger is vertically pointing down (forward acceleration, x), surge is +1g and when it is rolled to the right (sidewards acceleration, y) sway is +1g. Due to gravity, the pitch of a logger is thus translated into the values of heave, surge and sway (or z, x, y).&lt;br /&gt;
&lt;br /&gt;
However, the values are measured in mV instead of g. Before delivering the GPS-loggers, they have been calibrated at UvA. The acceleration (A) expressed in g is calculated from the measured value (M) and the calibration factors offset (''O'') and sensitivity (''S'').&lt;br /&gt;
&lt;br /&gt;
Thus acceleration for heave (z), surge (x) and sway (y) is calculated as:&lt;br /&gt;
A&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; = (M&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt;-O&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt;)/S&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; ;      A&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt; = (M&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;-O&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;)/S&amp;lt;sub&amp;gt;x&amp;lt;/sub&amp;gt;;      A&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt; = (M&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;-O&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt;)/S&amp;lt;sub&amp;gt;y&amp;lt;/sub&amp;gt; ; &lt;br /&gt;
&lt;br /&gt;
The values of ''O'' (in general ranging from 0-60, sometimes even 300) and ''S'' (ranging from 1300-1450) are available in the device table of the data base. If not available, use the factory defaults ''O'' = 0 and ''S'' = 1365.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[File:accelero1.png|300px]]||[[File:accelero2.png|300px]]|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the figure above heave (z) is shown in green, surge(x) in red and sway (y) in blue, all values are expressed in g (on the y-axis).&lt;br /&gt;
&lt;br /&gt;
= Data processing and filtering =&lt;br /&gt;
The raw log files are processed before being entered into the database. Each firmware version has a dedicated parser for the task. In certain cases data that is found in the log files is not stored in the database.  This can occur for two reasons:&lt;br /&gt;
&lt;br /&gt;
1. The data did not pass the CRC8 checksum (cyclic redundancy check). This is a standard procedure designed to detect accidental changes to raw computer data.&lt;br /&gt;
&lt;br /&gt;
2. If the data has an invalid signature. For example, if a certain data format (eg numeric) or number of values (eg 4 digits) is expected but not returned, this record is not stored in the database.&lt;br /&gt;
&lt;br /&gt;
When a line is deleted, the log file name, line number and the type of error is stored in the table gps.uva_warning102&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=572</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=572"/>
				<updated>2011-11-28T11:09:28Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Public web site */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices.''&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=571</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=571"/>
				<updated>2011-11-28T11:09:18Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Public web site */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** ''In progress, expect to finished by 14-12-2011.''&lt;br /&gt;
** ''LV: the uvagps functions are available through the functions tab and correctly filter gps devices''&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Showing_login_roles&amp;diff=570</id>
		<title>Showing login roles</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Showing_login_roles&amp;diff=570"/>
				<updated>2011-11-28T09:55:25Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By default, PgAdminIII only shows groups when modifiying the table privileges. If you want to share tables with individual users, you must change the PgAdminIII preferences to show users when modifying privileges. This is a PgAdminIII setting, so you need to adjust it in your own installation.&lt;br /&gt;
&lt;br /&gt;
To make PgAdminIII show users:&lt;br /&gt;
&lt;br /&gt;
# Select &amp;quot;Options&amp;quot; from the File menu. A settings window will appear.&lt;br /&gt;
# Go to the &amp;quot;Preferences&amp;quot; tab in the window, as highlighted in the figure below&lt;br /&gt;
# Set the &amp;quot;Show users for privileges&amp;quot; option, as highligted in the figure below.&lt;br /&gt;
&lt;br /&gt;
[[File:Pgadmin_show_users_for_privileges.png]]&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=File:Pgadmin_show_users_for_privileges.png&amp;diff=569</id>
		<title>File:Pgadmin show users for privileges.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=File:Pgadmin_show_users_for_privileges.png&amp;diff=569"/>
				<updated>2011-11-28T09:52:33Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: Image for showing how to make PgAdminIII show individual users instead of only group roles; relevant sections are highlighted.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Image for showing how to make PgAdminIII show individual users instead of only group roles; relevant sections are highlighted.&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Showing_login_roles&amp;diff=568</id>
		<title>Showing login roles</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Showing_login_roles&amp;diff=568"/>
				<updated>2011-11-28T09:51:14Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: Created page with &amp;quot;By default, PgAdminIII only shows groups when modifiying the table privileges. If you want to share tables with individual users, you must change the PgAdminIII preferences to sh...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;By default, PgAdminIII only shows groups when modifiying the table privileges. If you want to share tables with individual users, you must change the PgAdminIII preferences to show users when modifying privileges. This is a PgAdminIII setting, so you need to adjust it in your own installation.&lt;br /&gt;
&lt;br /&gt;
To make PgAdminIII show users:&lt;br /&gt;
&lt;br /&gt;
# Select &amp;quot;Options&amp;quot; from the File menu. A settings window will appear.&lt;br /&gt;
# Go to the &amp;quot;Preferences&amp;quot; tab in the window, as highlighted in the figure below&lt;br /&gt;
# Set the &amp;quot;Show users for privileges&amp;quot; option, as highligted in the figure below.&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=567</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=567"/>
				<updated>2011-11-21T14:33:40Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
* Improvements after meeting on 17-11-2011 (expected corrections on nov 28).&lt;br /&gt;
** Improve documentation, describing how to give individual users access to tables; this is a PgAdminIII feature, so describe where to look in the menus&lt;br /&gt;
** check ownership of tables after uploading&lt;br /&gt;
** verify that there is no restriction on the size of uploaded tables&lt;br /&gt;
** verify that mixing case in specified and actual column names in handled in a consistent way (for example 'nestid' vs. 'nestID')&lt;br /&gt;
** improve error messages, especially in the case of double records, missing &lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=566</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=566"/>
				<updated>2011-11-21T14:24:07Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Finished */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=565</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=565"/>
				<updated>2011-11-21T14:23:53Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=564</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=564"/>
				<updated>2011-11-21T14:22:41Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Finished */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;speed&amp;quot; was added to the gps.uva_tracking_speed view; the original speed was renamed to &amp;quot;speed_3d&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=563</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=563"/>
				<updated>2011-11-21T14:21:59Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed_2d view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=562</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=562"/>
				<updated>2011-11-21T14:20:59Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Finished */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Field &amp;quot;angle&amp;quot; was renamed to &amp;quot;direction&amp;quot; and was added to the gps.uva_tracking_speed_2d view. The unit is degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees.&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=561</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=561"/>
				<updated>2011-11-21T14:20:04Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=560</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=560"/>
				<updated>2011-11-07T12:57:44Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
** 13-10-2011, LV: Field &amp;quot;angle&amp;quot; must be renamed to &amp;quot;direction&amp;quot; and must be added to the gps.uva_tracking_speed_2d view. The unit must be degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees. Expected finish is 15-11-2011.&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=559</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=559"/>
				<updated>2011-11-07T12:57:13Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
** 13-10-2011, LV: Field &amp;quot;angle&amp;quot; must be renamed to &amp;quot;direction&amp;quot; and must be added to the gps.uva_tracking_speed_2d view. The unit must be degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees. Expected finish is 15-11-2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=558</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=558"/>
				<updated>2011-11-07T12:56:04Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
** 13-10-2011, LV: Field &amp;quot;angle&amp;quot; must be renamed to &amp;quot;direction&amp;quot; and must be added to the gps.uva_tracking_speed_2d view. The unit must be degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees. Expected finish is 18-10-2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=557</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=557"/>
				<updated>2011-11-07T12:55:29Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
** 02-11-2011, LV: Added a 'nicer', more consistent interface to the template management and data table upload system.&lt;br /&gt;
** 02-11-2011, LV: Added a description of the workflow to the user manual.&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
&lt;br /&gt;
* Write a manual which describes how to query the spatial database, for easily accessing the flow data for given (x,y)-coordinates and time. (LV)&lt;br /&gt;
Progress:&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
** 13-10-2011, LV: Field &amp;quot;angle&amp;quot; must be renamed to &amp;quot;direction&amp;quot; and must be added to the gps.uva_tracking_speed_2d view. The unit must be degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees. Expected finish is 18-10-2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=556</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=556"/>
				<updated>2011-11-07T12:53:09Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot;:&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
&lt;br /&gt;
* Write a manual which describes how to query the spatial database, for easily accessing the flow data for given (x,y)-coordinates and time. (LV)&lt;br /&gt;
Progress:&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
** 13-10-2011, LV: Field &amp;quot;angle&amp;quot; must be renamed to &amp;quot;direction&amp;quot; and must be added to the gps.uva_tracking_speed_2d view. The unit must be degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees. Expected finish is 18-10-2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=555</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=555"/>
				<updated>2011-11-07T12:52:42Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
* Design and implementation of the annotation table upload facility:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the *user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot; as soon as the data is available. (WB, medium priority)&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
&lt;br /&gt;
* Write a manual which describes how to query the spatial database, for easily accessing the flow data for given (x,y)-coordinates and time. (LV)&lt;br /&gt;
Progress:&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
** 13-10-2011, LV: Field &amp;quot;angle&amp;quot; must be renamed to &amp;quot;direction&amp;quot; and must be added to the gps.uva_tracking_speed_2d view. The unit must be degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees. Expected finish is 18-10-2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=554</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=ToDo&amp;diff=554"/>
				<updated>2011-11-07T12:51:31Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Data model, processing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ToDo List ==&lt;br /&gt;
&lt;br /&gt;
This is a dynamic list for Lykle Voort that changes with changing priorities. This list includes items predominantly related to the database that are pending and include a request data, status and person reporting problem (WB - Willem Bouten;JS - Judy Shamoun-Baranes; EB - Edwin Baaij). When items are solved they are moved to the FINISHED section.&lt;br /&gt;
&lt;br /&gt;
=== Public web site ===&lt;br /&gt;
&lt;br /&gt;
* Copy UvAGPS functions available on the flysafe server to the public server (JS, medium priority)&lt;br /&gt;
** In progress, expect to finished by 14-12-2011.&lt;br /&gt;
&lt;br /&gt;
=== Data model, processing ===&lt;br /&gt;
&lt;br /&gt;
* Create an annotation uploading facility. An annotation uploading facility enables users with database access to upload files with a previously defined structure to the database in the user's own schema. A table will typically be used to annotate GPS data. The columns of the table are created in 'templates', so to a template management system is to be created. This work consists of the following steps:&lt;br /&gt;
** create a template overview page&lt;br /&gt;
** add facilities to create a new template, either by starting from scratch or by copying an existing template from another user (where the new owner will be the user logged in)&lt;br /&gt;
** a facility to edit existing templates&lt;br /&gt;
** a facility to skip columns in uploaded files, in case not all columns are needed or in case some columns are copies of existing columns in other tables;&lt;br /&gt;
** log of upload service (who, when, which table) + overview page?? --&amp;gt; think/brainstorm on possibilities&lt;br /&gt;
** user documentation describing the workflow; (mail to Judy/Willem when 90% finished) (iterate within SARA first)&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
** 07-10-2011, LV: Added the [[Description of the Data upload and Annotation Service]]. A breakdown of the work is also listed there.&lt;br /&gt;
** 15-08-2011, LV: Upload facility is in progress. The user will be presented an upload form allowing where the user can select a file to be uploaded and a table in the user's own schema in which the data must be stored.&lt;br /&gt;
** 16-09-2011, LV: First of upload facility (draft) version complete&lt;br /&gt;
** 24-10-2011, LV: Completed template creation and editing faclity (first draft, needs cosmetic improvements).&lt;br /&gt;
&lt;br /&gt;
* Design and implement a datamodel for the output of the &amp;quot;tides and currents model&amp;quot; as soon as the data is available. (WB, medium priority)&lt;br /&gt;
** 25-08-2011, LV: The schema &amp;quot;flow&amp;quot; has been added to the datbase for storing the flow grids and model results.&lt;br /&gt;
** 25-08-2011, LV: A postgis table &amp;quot;grid_waddenzee&amp;quot; has been added to the database. This postgis table contains grid used by the flow model ''unstruc''' which was imported from OpeNDAP data provided by Deltares. You can view the grid using postgis-capable programs (e.g. Qgis).&lt;br /&gt;
** 31-08-2011, LV: The test data from Deltares has been imported into the database automatically.&lt;br /&gt;
** 31-08-2011, LV: The automatic importing of data will be started as soon as Deltares has actual data available.&lt;br /&gt;
** 21-09-2011, LV: Two model output data sets have been supplied by Deltares. Import has been started for the model ''Waddenfijn''. This model has a resolution of 100m.&lt;br /&gt;
** 28-09-2011, LV: Data sets appear to be incomplete, Deltares has been contacted. The 100m-model has data up to July 19th. Data has been imported from April 1st to July 18th to save disk space. The 300m-model has even less useful content, so this data was not imported into the database.&lt;br /&gt;
&lt;br /&gt;
* Write a manual which describes how to query the spatial database, for easily accessing the flow data for given (x,y)-coordinates and time. (LV)&lt;br /&gt;
Progress:&lt;br /&gt;
** 17-10-2011, LV: Database functions have been added which find the flow velocities for a given location and time range. These functions can be used in queries which add local wind and flow velocities to the track data of a bird.&lt;br /&gt;
** 17-10-2011, LV: Example queries and documentation have been added to the user documentation.&lt;br /&gt;
 &lt;br /&gt;
* Add 2D speed to the speed calculations in the uva_tracking_speed view (rename speed to 3D_speed). Add direction to calculations.&lt;br /&gt;
Work ahead:&lt;br /&gt;
** ''10-10-2011, LV: Function was not renamed, because other views depend on this view; instead a new table '''gps.uva_tracking_speed_2d''' was created. This view has the field 'angle', which is the angle from north, positive towards east, in radians.&lt;br /&gt;
** 13-10-2011, LV: Field &amp;quot;angle&amp;quot; must be renamed to &amp;quot;direction&amp;quot; and must be added to the gps.uva_tracking_speed_2d view. The unit must be degrees, where north is 0 degrees, northeast is 45 degrees and east is 90 degrees. Expected finish is 18-10-2011.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Automated upload and import UvAGPS metadata which should include a web form and webservice (WB, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Add function for computation of elevation (and perhaps azimuth) of sun above the horizon for each gps point.  This would provide users with the possibility to determine whether a point is measured during the day, at twilight (elevation lets users decide if they want civil or nautical twilight) or at night. An example script can be found in the R script crepuscule.R which is part of the maptools toolbox and would extract the value “solarpos”. Michael Kemp can provide more information on script usage and examples (m.u.kemp@uva.nl) day start, day end to mark whether a data point is at night or during the day (JS, low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Accelerometer data: based on the current data model, we cannot properly sort accelerometer measurements that are not coupled with a GPS fix, an extra field in the accelerometer table is probably needed. (JS, very low priority)&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
=== Administration ===&lt;br /&gt;
&lt;br /&gt;
* List of access rights: user's rights must be set consistently to make sure that all users have the correct rights to see data (WB, high priority);&lt;br /&gt;
** 01-07-2011, LV: In progress; a web interface listing user's rights is being created as part of the administrative interface; on hold for uploading annotation data.&lt;br /&gt;
&lt;br /&gt;
* add a project data table; assign projects to users or users to projects; link bird access to projects&lt;br /&gt;
** On hold while working on annotation metadata import.&lt;br /&gt;
&lt;br /&gt;
* Bookkeeping: Change interface so that a user can select uvaGPS and then a particular tag (or tags with cntr shift for example) and range of dates.  Currently a user can select uvaGPS and a range of dates and will receive all tags, many tags may not be relevant to the user, making it difficult to quickly assess the status (JS, low priority, should be improved by March 2012)&lt;br /&gt;
&lt;br /&gt;
* Provide authentication scripts and methods to Aart-Jan for the Uva-bits web site.&lt;br /&gt;
&lt;br /&gt;
* new policy for addition of new users: disable e-mail function, become user and check functionality before notification&lt;br /&gt;
** ''14-10-2011: new users have received a new e-mail with updated data, referring them to the UvA-Bits web site. Working on check-list for adding new users.''&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
== Finished ==&lt;br /&gt;
&lt;br /&gt;
* Adapt parser for new firmware (V 1.0.35) format (WB/EB, July 2011, high priority)&lt;br /&gt;
&lt;br /&gt;
''Parsing of the output of firmware version 1.0.35 is working. Some differences between the documentation and the actual logger output were reported to EB. (Sept 5 2011)''&lt;br /&gt;
&lt;br /&gt;
''There is an error when parsing the S0 lines; according to the manual there should be 16 fields, but there are 17. Waiting for a reply from EB (sept 1 2011)''&lt;br /&gt;
&lt;br /&gt;
* Upload facility for Enram radar images. An Ftp-server has been set up for uploading Enram radar images from European weather radars. The total data volume is estimated to be around 15 TB, so files are migrated to grid storage after verifying that the upload is complete and correct. (LV, august 2011)&lt;br /&gt;
&lt;br /&gt;
* Login once to the main web site and the phppsqladmin site (Wiki already shares the login) (WB, april 2011, not resolved - STOPPED).  This item has proven to be difficult to resolve due to security issues.&lt;br /&gt;
&lt;br /&gt;
* Guest account: we shoud have a guest account with very restricted access, but who can see for example birdview with the tracks of one or two ('donated') birds. (May 2011, Complete).  User name = guest, password = guest, access provided to several aspects of the virtual lab and 1 gull trajectory.&lt;br /&gt;
&lt;br /&gt;
* BirdView: I noticed that the upload option for kml files from a local directory includes kml only, can we extend the support to kml and kmz files? The http upload does actually support both. (solved July 2011)&lt;br /&gt;
&lt;br /&gt;
* Import UvAGPS log files via standard storage facility: Data can be uploaded manually via winSCP, iRODS, and digital drop box.  Dropbox is becoming the standard for all new stations and linked to the database services (implemented May 2011). &lt;br /&gt;
&lt;br /&gt;
* Quality control: Users with write rights can flag data points manually in the database through pgAdmin. Data cannot be queried but must be viewed through the data viewer to edit. Currently data is manually flagged by J. Shamoun-Baranes (solved April 2011)&lt;br /&gt;
&lt;br /&gt;
* QC &amp;amp; functions: When only a subset of data (say data approved from QC) is queried, the distance and direction functions work on the subset, there is an option to run these functions on all data - but not by default (April 2011)&lt;br /&gt;
&lt;br /&gt;
* Implement generate KMZ service for UvAGPS on public server (implemented May 2011 through virtual lab)&lt;br /&gt;
&lt;br /&gt;
* Metadata: Excel files are either sent to SARA and then uploaded to the database or uploaded manually (March 2011)&lt;br /&gt;
&lt;br /&gt;
* List of user's rights: a script was written to quickly produce an overview of all users and their rights (12-05-2011)&lt;br /&gt;
&lt;br /&gt;
* Make a readonly copy of Flysafe Wiki on public server (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Improve UvA GPS parser to log errors such as CRC8 in database (september 2010) &lt;br /&gt;
&lt;br /&gt;
* Implement service to create graphs for UvAGPS devices according to Willem's Matlab scripts  (october 2010)&lt;br /&gt;
&lt;br /&gt;
* Add accelerometer calibration factors to uva_device (september 2010)&lt;br /&gt;
&lt;br /&gt;
* Verify whether there are still users using Irods (WB, June 2011)&lt;br /&gt;
** There are no users using the Irods service anymore (September 2011)&lt;br /&gt;
&lt;br /&gt;
* add a description of the user's rights fields, instead of the database names for rights (may 2011)&lt;br /&gt;
** A description of the meaning of the user's rights has been added to the flysafe wiki, under &amp;quot;administration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* make sure that access to weather data is properly restricted&lt;br /&gt;
** In weather data two types are distinguished: ECMWF and ECMWF_RNLAF (more recent) data. Access to any type of weather data has to be granted explicitly. (September 2011)&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* How often is the FlySafe database updated with raw data uploaded via irods or winscp? (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Irods is no longer used by users to upload data. Winscp is almost never used since Dropbox became available.''&lt;br /&gt;
&lt;br /&gt;
* How is raw data filtered if at all, in addition to the CRC8 Checksum and the invalid signature, before entering the database? If data is being filtered out based on expert judgment, this must be documented and records should be flagged in the database rather than removed. (JS, July 2011)&lt;br /&gt;
** LV, 22-09-2011 ''Raw data is not filtered at all, apart from the CRC8 checksum.''&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=553</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=553"/>
				<updated>2011-11-03T14:34:18Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Uploading the annotation file, joining the data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;searching for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_serial_info = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema and the owner will be the user who uploaded the table. By default, no other users can access the uploaded table. You can share your tables with other users using a database administration tool, such as PgAdminIII. The following example shows how to give another user read-only access to the recently uploaded table, so that the other user can read, but not edit the contents of the table.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser, which is the left pane in the window, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
Look for the database &amp;quot;flysafe&amp;quot; and unfold the schema with your&lt;br /&gt;
login name and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=552</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=552"/>
				<updated>2011-11-03T11:57:18Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Annotation of GPS track data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;looking for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_serial_info = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema and the owner will be the user who uploaded the table. By default, no other users can access the uploaded table. You can share your tables with other users using a database administration tool, such as PgAdminIII. The following example shows how to give another user read-only access to the recently uploaded table, so that the other user can read, but not edit the contents of the table.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser, which is the left pane in the window, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
Look for the database &amp;quot;flysafe&amp;quot; and unfold the schema with your&lt;br /&gt;
login name and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	<entry>
		<id>https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=551</id>
		<title>Annotation tables</title>
		<link rel="alternate" type="text/html" href="https://wiki.e-ecology.nl/index.php?title=Annotation_tables&amp;diff=551"/>
				<updated>2011-11-03T11:55:40Z</updated>
		
		<summary type="html">&lt;p&gt;Lyklev: /* Creating a database table by uploading a CSV file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= User annotation tables =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In a highly database oriented environment with different types of users, some users prefer the possibility of uploading file-based data instead of interacting directly with the database.&lt;br /&gt;
&lt;br /&gt;
For the creation of a new table, the automated system should know the number and type of columns in the uploaded file. This means that some sort of template must exist in the system before a table can be uploaded and inserted automatically. Since most users will typically upload more than one table with the same column names and types, a template has to be created only once and can be reused many times by the same user or by a group of users.&lt;br /&gt;
&lt;br /&gt;
These pages describe the different components in the annotation service:&lt;br /&gt;
&lt;br /&gt;
* the template management pages, for creating and modifying templates;&lt;br /&gt;
* the upload form, for uploading files into new database tables.&lt;br /&gt;
&lt;br /&gt;
Furthermore, these pages describe how tables can be used and shared with other users.&lt;br /&gt;
&lt;br /&gt;
== Creating a new table template ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a new table template, go to the page 'Templates', which shows an overview of existing templates. Follow the link called &amp;quot;Create a new template&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Before you can define the fields of the template, you must give the template a name and a description.&lt;br /&gt;
&lt;br /&gt;
* Choose the name such that you can easily find it back.&lt;br /&gt;
* The description should be a description of what the template is for, not what the template will contain (as this will be visible when you define the columns). It has a mimimum of 40 characters.&lt;br /&gt;
&lt;br /&gt;
You can start defining columns after you click on &amp;quot;Create template&amp;quot;. This will also save the template name and description.&lt;br /&gt;
&lt;br /&gt;
== Defining and modifying template columns ==&lt;br /&gt;
&lt;br /&gt;
Each column in a template definition tells the system which columns to create when you upload a new file into the database. So the names of the columns are used as table column names later on. This means that for each column:&lt;br /&gt;
&lt;br /&gt;
* the name must be a valid table column name, that is, it must start with a letter and it must contain no spaces or special characters;&lt;br /&gt;
* the type must a valid database type;&lt;br /&gt;
* the checkbox &amp;quot;primary key&amp;quot; defines whether the column will be used as a primary key.&lt;br /&gt;
&lt;br /&gt;
The primary key can be one column or a combination of columns. In a database table, the primary key field or combination of each table row must be unique. For the analysis of GPS tracks, a good combination would be the 'datetime' and the 'device_info_serial' fields. Every database table must have at least one column marked as a primary key.&lt;br /&gt;
&lt;br /&gt;
To add a new template column, fill in the values on the last or only (and empty) row of the overview, then click on the button &amp;quot;Add column&amp;quot; next to it.&lt;br /&gt;
&lt;br /&gt;
To modify existing columns, edit the fields of the columns, then click on &amp;quot;Update columns&amp;quot; below the overview.&lt;br /&gt;
&lt;br /&gt;
To delete an existing column, click on the &amp;quot;Delete column&amp;quot; button next to the row.&lt;br /&gt;
&lt;br /&gt;
== Editing an existing template ==&lt;br /&gt;
&lt;br /&gt;
If you want to edit an existing template:&lt;br /&gt;
&lt;br /&gt;
# Go to the template overview page by selecting the &amp;quot;Templates&amp;quot; tab in the menu.&lt;br /&gt;
# Click on the &amp;quot;edit&amp;quot; link next to the template you want to edit. You can only edit your own templates.&lt;br /&gt;
# Edit the fields in the same way as when creating a new template.&lt;br /&gt;
&lt;br /&gt;
== Creating a database table by uploading a CSV file ==&lt;br /&gt;
&lt;br /&gt;
In the current version, you can create database tables from CSV files.&lt;br /&gt;
Before you can upload a file, you must have created a template in which&lt;br /&gt;
each column corresponds with a column in your CSV file.&lt;br /&gt;
&lt;br /&gt;
To upload a file into a new database table, go to the &amp;quot;Upload table&amp;quot;&lt;br /&gt;
page in the Annotation management pages. This will show you an upload&lt;br /&gt;
form.&lt;br /&gt;
&lt;br /&gt;
First, select the file you want to upload by clikcing on the &amp;quot;browse&amp;quot;&lt;br /&gt;
button.&lt;br /&gt;
&lt;br /&gt;
Second, enter a name for the new database table. This must be a valid&lt;br /&gt;
database table name, so it must start with a letter, contain no spaces or&lt;br /&gt;
special characters, and be no longer than ? characters.&lt;br /&gt;
&lt;br /&gt;
Then select the template which will be used for creating the new table.&lt;br /&gt;
Currently, all templates from all owners are shown.&lt;br /&gt;
&lt;br /&gt;
Finally, click the &amp;quot;Upload file&amp;quot; button. This will start uploading the&lt;br /&gt;
file, create a new table from the specified template and import the data&lt;br /&gt;
from the file into the new table.&lt;br /&gt;
&lt;br /&gt;
If any error occurs during the importing of the contents of the file, the&lt;br /&gt;
table is deleted again. The upload system will try to indicate where the&lt;br /&gt;
error is in the file.&lt;br /&gt;
&lt;br /&gt;
== Annotating GPS track tables ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
One of the purposes of uploading tables is to have some system to make personal annotations to GPS track data. It is not desirable to have personal annotations in the tracking data tables; instead, personal annotations should be stored in personal tables. Since users can have personal schemas, this is the logical place to put personal files. After creating the new tables, the annotations must be combined with the GPS track data.&lt;br /&gt;
&lt;br /&gt;
=== Definition of the annotation tables ===&lt;br /&gt;
&lt;br /&gt;
If a bird track must be annotated, there must be a way to idenfity records belonging to one particular bird track. The preferred way is to match the 'datetime' and the 'device_info_serial' fields, so annotation tables should have at least these two columns. This means that templates for annotation tables should have at least these two columns. It is also a good idea to make these fields primary keys, as this will speed up the joining later on. Your template will contain your annotation field too.&lt;br /&gt;
&lt;br /&gt;
As a minimal example for adding a comment to a GPS track, a template should contain:&lt;br /&gt;
&lt;br /&gt;
* a 'datetime' field of the type 'timestamp';&lt;br /&gt;
* a 'device_info_serial' field of the type 'integer';&lt;br /&gt;
* a 'comment' field, which in this example will be of the type 'text'.&lt;br /&gt;
&lt;br /&gt;
=== Uploading the annotation file, joining the data ===&lt;br /&gt;
&lt;br /&gt;
With the above example, suppose there is a very simple file with annotations for just two records. The file looks like this:&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;datetime&amp;quot;,&amp;quot;device_info_serial&amp;quot;,&amp;quot;comment&amp;quot;&lt;br /&gt;
  2011-05-21 12:10:45,533,&amp;quot;on nest&amp;quot;&lt;br /&gt;
  2011-05-21 12:25:42,533,&amp;quot;looking for food&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When this file is uploaded to the database, a new table is created. Suppose that this table is &amp;quot;user.annotation&amp;quot;, the results can be combined in one query:&lt;br /&gt;
&lt;br /&gt;
  SELECT     td.datetime, td.longitude, td.latitude, an.comment&lt;br /&gt;
  FROM       gps.uva_tracking_data td&lt;br /&gt;
  LEFT JOIN  user.annotation an&lt;br /&gt;
    ON       td.datetime            = an.datetime AND&lt;br /&gt;
             td.device_info_serial  = an.device_info_serial&lt;br /&gt;
  WHERE      device_serial_info = 533;&lt;br /&gt;
&lt;br /&gt;
== Sharing tables with other users ==&lt;br /&gt;
&lt;br /&gt;
New tables are created in the user's own database schema and the owner will be the user who uploaded the table. By default, no other users can access the uploaded table. You can share your tables with other users using a database administration tool, such as PgAdminIII. The following example shows how to give another user read-only access to the recently uploaded table, so that the other user can read, but not edit the contents of the table.&lt;br /&gt;
&lt;br /&gt;
Start PgadminIII and connect to &amp;quot;services.flysafe.sara.nl&amp;quot;. Then&lt;br /&gt;
look in the server browser, which is the left pane in the window, as shown below.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_1.png]]&lt;br /&gt;
&lt;br /&gt;
Look for the database &amp;quot;flysafe&amp;quot; and unfold the schema with your&lt;br /&gt;
login name and unfold the &amp;quot;tables&amp;quot; item in the tree. This will&lt;br /&gt;
look like the following figure; all tables you upload will appear&lt;br /&gt;
in this schema. In this example &amp;quot;test8&amp;quot; is a table that must&lt;br /&gt;
be shared with other users.&lt;br /&gt;
&lt;br /&gt;
Right-click on the table that you want to share with other users.&lt;br /&gt;
A menu will pop-up as shown in the following figure; in this&lt;br /&gt;
example the table &amp;quot;test8&amp;quot; was right-clicked.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_2.png]]&lt;br /&gt;
&lt;br /&gt;
From the popup menu, select &amp;quot;Properties&amp;quot;. A window like the one below will be shown&lt;br /&gt;
with various options for the selected table.&lt;br /&gt;
&lt;br /&gt;
# Select the tab &amp;quot;privileges&amp;quot;&lt;br /&gt;
# In the &amp;quot;role&amp;quot; field, select the user you want to share the table with; ''note: if you see only groups and no users, you have to change your PgadminIII preferences; this is described in [[showing login roles]]''.&lt;br /&gt;
# Select the privileges you want to give this user on this table. To read a table, a user must have the &amp;quot;SELECT&amp;quot; privilege; to change contents, the user must also have the &amp;quot;UPDATE&amp;quot; privilege.&lt;br /&gt;
# Click the &amp;quot;Add/Change&amp;quot; button. The user with all privileges will appear in the small window on the top.&lt;br /&gt;
# Click &amp;quot;Ok&amp;quot; to save the changes and close the window, or repeat the process to share the table with more users.&lt;br /&gt;
&lt;br /&gt;
[[File:Table_user_rights_3.png]]&lt;br /&gt;
&lt;br /&gt;
In the example above, the table &amp;quot;test8&amp;quot; is shared with user &amp;quot;tijs&amp;quot;, who will be able to read the table (&amp;quot;SELECT&amp;quot;), but not update the table (&amp;quot;UPDATE&amp;quot; is not checked).&lt;br /&gt;
&lt;br /&gt;
== Annotation of GPS track data ==&lt;/div&gt;</summary>
		<author><name>Lyklev</name></author>	</entry>

	</feed>