1

Topic: Report Map

Dear all, we are currently in the process of creating a report map that will show all the occurrences of a particular user, once he/she is on line.
We already did this for a report list (occurrence list for a CMS user), that is doing well. To avoid the system asking the user to choose any detail, we put in the "preset parameters values" of the "report settings" menu the following scripts:
date_from=1900-01-01
date_to=2100-01-01
survey_id=
smpattrs=
occattrs=
taxon_group_id=
user_id={user_id}

For what the making of a map (in a different page) is concerned, despite the objective is to map the same list of data already created for the report list, the task seems to be not so easy:
- using the Report Map prebuilt form, once selected a polygon with the tool provided, no search for data is possible, since the system give the error: "please supply a search area for the report";
- other possible map solutions do not give any mapped data, neither if we put the script mentioned above in the "report settings" menu.

How could we easily create a map showing ONLY the data of a user, whatever the surveys used is?

Many thanks to whom who will help us!

Andrea

P.S.: as I already pointed out in other posts, the switch on and off of the Italian language in the Drupal installation (the first occurred unintentionally) created several unespected problems, ranging from map settings to CKeditor disappearence. I fear that some of these "lacking functionalities" would be still related to this!

2

Re: Report Map

Dear Andrea

If you are using the Occurrence List for a CMS User report you will encounter problems as this report does not contain a field with spatial information. Consider creating your own version of the report which contains the sample.geom field as demonstrated by the Map Occurences for Survey report.

See documentation on the Report Map form and the Report File Format

In addition to this, however, the error you report sounds like one I recall from a long time ago. Are using version 0.7.1 ?

Jim Bacon.

3

Re: Report Map

Hi Andrea
If you are up to date with the latest code from SubVersion, then you might like to consider using the "Easy Login" feature. This gives each user an ID which exists on the warehouse so that reporting is easier. Then you can use the following form configuration:
Select Form Category: Reporting
Select Form: Map Explorer
Base Map Layers -
choose any layers that you like though there is a bug apparent when using Google Physical so I would avoid that
Report Settings -
Report Name: library/occurrences/explore records
Preset parameter values:
smpattrs=
occattrs=
location_id=0
taxon_groups=0
currentUser={profile_indicia_user_id}
ownData=1
ownLocality=0
ownGroups=0

Default parameter values (these are deliberately blank):
idlist=
searchArea=

Hope that helps!

John van Breda
Biodiverse IT

4

Re: Report Map

I've checked: we are currently using version 0.7.1 !!!

John, I supposed that your suggestion will not work until we upgrade the version, is it true?

I only hope to avoid data losses in the process of upgrading!

Many thanks,

Andrea

5

Re: Report Map

Dear Andrea

The Easy Login feature that John mentions is part of the version 0.8.1 Drupal code. To use the 0.8.1 client software you should also be using 0.8.1 Warehouse code. John's suggestion below will not work without upgrading.

Upgrading the warehouse is not difficult. You can read in the wiki how to upgrade.

To upgrade the Drupal modules, follow the usual procedure that you would use for any other module. However, what I usually forget is that I then need to make the cache and upload folders writable and I also need to copy any custom css, js and lang files that I may have put in the prebuilt_forms subfolders. Sometimes I have settings in the helper_config.php file that I need to restore as well.

Always back up files and databases as a precaution and there should be no chance of data loss.

Jim Bacon.

6

Re: Report Map

Dear Jim and John,
I put some lines below written by the technicians that will help me in upgrading to the version 0.8.1:

-----------------------------------------------------------------------------------------------------------
Starting from a 0.7.1 in production, we just dowloaded release 0.8.1 into a temporary folder through a svn call. As far as the initial 0.7.1 is involved, only the following 2 files
./application/helpers/spatial_ref.php
./application/config/email.php

were modified after the initial installation.

Can we transform the 0.8.1 distro into the production one, by simply copying all files from the temporary folder and copying back the 2 listed and modified files above ?
Are any other actions against the postgres database or the config files needed ?
-----------------------------------------------------------------------------------------------------

Thank you for your help,

Andrea

7

Re: Report Map

Dear Andrea,

Am I correct in understanding that you have modified spatial_ref.php and email.php yourselves and need to apply these changes again to 0.8.1 after it has been installed?

/application/config/email.php is not included in the download so it will not be overwritten when you copy over 0.8.1. In general, the upgrade process should not alter configuration settings.

/application/helpers/spatial_ref.php includes changes between 0.7.1 and 0.8.1 so you need to merge your changes in to the new version. If you copy back your version from 0.7.1 you will loose our changes.

Included in the download are scripts that will update the database. These are installed in step 7 of the upgrade instructions.

Jim Bacon

8

Re: Report Map

Thank you very much, Jim. We followed your instructions, but there's something wrong.
As I did last time, I paste below the message of the person who is working on the server:

After I downloaded and installed release 0.8.1, I needed to

    mk /tmp/images
    transfer all files from the old /upload directory to the new one

in order to correct trivial errors.

Nevertheless when navigating to our warehouse page I expected to find something allowing the upgrade database mechanism, but I only found an error message saying "Unable to Complete Request - You can go to the home page or try again".The same thing happens when I try subpages such as index.php/home/upgrade

Any ideas ?

9

Re: Report Map

An integration to the message above:

Does the error above depends from the needed upgrades that have not been executed yet ?
If yes, what is the best way to perform the upgrade ?
After looking at http://...IndiciaWarehouse/modules/indicia_setup/db/version_0_7_1/ my programmers say that they could execute all the sql scripts from inside PostgreSql, but they are not sure whether it is the safest way. Moreover they do not know whether the 0.7.1 patches have to be included or ignored in our case of a migration from 0.7.1 to 0.8.1 . They noticed a release 0.8.2 too. What to do about it and about commands that are not "create or replace view" commands ?

10

Re: Report Map

Our site is temporarily out of order, since we are waiting for an answer to my last message in this post. Anyone could be so kind to give us a suggestion on this topic?

Many thanks!

Andrea

11

Re: Report Map

Hi Andrea,

Step 5 in the upgrade instructions says "copy the contents directly over the contents of your existing installation folder". That means you are not creating a new installation folder. If you follow these instructions you continue to use the same upload directory.

Since you had to copy the upload folder I think you have created a new installation folder. I think this means you will be missing some of the configuration files from the application\config folder. For example you may be missing the information for connecting to the database.

Release 0.8.2 is the current development code which is changing every day and is not ready to use.

Jim Bacon.

12

Re: Report Map

Hi all.

We tried to merge our distro with 0.8.1, always obtaining problems. I'd
like to ask for your competent opinion, examining every single step of
ours; surely we made mistakes.

I'd have a question about the svn command.

What is the exact command we have to execute in order to download release
0.8.1 ?

At first we tried *svn checkout
http://indicia.googlecode.com/svn/core/trunk/ indicia-read-only* , yet such
command downloaded the last unstable release, maybe the 0.8.2, something
more than the desired and stable 0.8.1, with no chance to go backward to
0.8.1 .

Then we tried *svn checkout
http://indicia.googlecode.com/svn/core/ … a-branches
* . We do not know svn well, so our aim is to consider the subdirectory
0.8.1 inside the tree of files and directories and to copy it into the
production subtree.

The execution of the latter svn invocation ended with some warnings.
Is the mechanism above correct in order to get 0.8.1 release or do better
and correct ways exist ? What is the meaning of the following errors that
happened at the end of the svn command ?
*
svn: warning: Error handling externals definition for
'indicia-branches/version 0.8.0/modules/phpUnit':
svn: warning: OPTIONS of '
http://source.kohanaframework.org/svn/phpunit/trunk': 200 OK (
http://source.kohanaframework.org)
svn: warning: Error handling externals definition for
'indicia-branches/version 0.6.2/modules/phpUnit':
svn: warning: OPTIONS of '
http://source.kohanaframework.org/svn/phpunit/trunk': 200 OK (
http://source.kohanaframework.org)
svn: warning: Error handling externals definition for
'indicia-branches/version 0.8.1/modules/phpUnit':
svn: warning: OPTIONS of '
http://source.kohanaframework.org/svn/phpunit/trunk': 200 OK (
http://source.kohanaframework.org)
Checked out revision 4717.

13

Re: Report Map

Hi Andrea,

The path to the 0.8.1 branch is
"http://indicia.googlecode.com/svn/core/branches/version 0.8.1"

You are checking out 3 different versions; 0.6.2, 0.8.0 and 0.8.1 all at the same time. You only need the 0.8.1 folder.

I use Tortoise SVN as my client program for accessing the code.
To download the code with Tortoise SVN I do the following
1. In Windows Explorer create an empty direcory.
2. Right-click on the empty directory and select SVN Checkout...
3. In the dialog box enter the url "http://indicia.googlecode.com/svn/core/branches/version 0.8.1". Leave all other options as default (Checkout depth: Fully recursive; Omit externals: unchecked; Revision: Head;) and click OK.

You receive the same error message 3 times, once for each version. I, too, get a similar error.
Mine reads
Unable to connect to a repository at URL
    'http://source.kohanaframework.org/svn/phpunit/trunk'
The OPTIONS request returned invalid XML in the response: XML parse error at
    line 1: no element found (http://source.kohanaframework.org/svn/phpunit/trunk)

My understanding of this is that some external code from another repository is trying to be downloaded but failing. As I recognise this as something used in test and development I happily ignore it.

So, I think you are probably obtaining the code successfully.

Regards,
Jim Bacon

14

Re: Report Map

Hi all,
just to let you know that the upgrade went well. Thank you Jim your kind
and useful answers.

Yes, there are some warning errors after the lauch of the svn command, but I
thin the actual diffference was due to a different command used to copy the
new distro onto the old one.

Practically, I hope I will be useful for all future Linux users, the cp -a
<new distro directory>/* <old distro directory> was the real solution for
the problem, while a double tar (--create at first and --extract later)
provoked errors.

Best Regards

15

Re: Report Map

Dear Andrea,

I am very glad to hear you have been successful and thank you for posting your solution.

Now you can get back to the orignal topic of this thread and try to create that map of occurrences for a user!

Jim Bacon.

16

Re: Report Map

Dear Jim,
we have been successful with the upgrade, but apparently we are still far from the solution of the original question:
following John's instructions, a "map explorer" choice should appear under the following menu:
Select Form Category: Reporting
Select Form: Map Explorer
Unfortunately, the menu does not show this choice, being the same shown with the previous version of Indicia.

Any suggestion?

Andrea

17

Re: Report Map

Hi Andrea,

You have upgraded your warehouse to 0.8.1 but have you upgraded the Drupal iFrom module to 0.8.1 as well?
You can find this in the repository at "http://indicia.googlecode.com/svn/drupal/modules/iform/branches/version 0.8.1"

Make a backup copy of the old module and then try the cp -a command to overwrite the old module with the new one.

John is also suggesting you use the Easy Login module which you can obtain from the repository. Download "http://indicia.googlecode.com/svn/drupal/modules/indicia_features " and add that to your folder of Drupal modules. You will then need to enable the module. Read more about the Easy Login module.

Jim Bacon.

18

Re: Report Map

Some (not very encouraging) updates:
- we performed the upgrading;
- the system created a copy of users in the warehouse dbase, but only for a couple of users recently registered through the internet site;
- the number of users in the warehouse [lookuplist/people] is significantly smaller (about half) in comparison of that of the internet site [in Drupal: user management/users/list];
- after login, the data visualisable are those recorded by another user;
- in practice, the number ID of the warehouse is associated to a different user in comparison to that associated to the same number by the CMS;
- if a new user register himself, the system does associate to him the data already present in the dbase, previously recorded by a different user.

This "disallineation" caused, as you can imagine, heavy problems and we have to decide how to go ahead. Upgrading to 0.8.1 has to be done, but we are wondering if this (and expecially the easy login feature installation) had to be done in a system with an empty dbase!

I beg you pardon for a not-specific language, but I hope you understood our problem.
As usual, any hel is wellcome!

Andrea

19

Re: Report Map

Hi to all.
I paste below the comment of our web-server consultant, with the hope that it would be useful to solve our problem:

We think that the resulting error could be reduced after handling the two
tables for users (respectively inside Drupal and WareHouse environments )
in an opportune and unfortunately unknown manner. Yet not knowing the exact
data structure of the two environments we cannot know how to operate in an
effective and safe way.

Is there a way to correct the future insert operations and to transform
all previous data in a consistent manner ?

We think we have to follow an algorithm like this:

    1. An intermediate temporary table is created inside the Warehouse
    with 2 attributes :
       1. User id according to WH
       2. User id according to InstantIndicia
    2. Since (after EasyLogin ?) the next and unique authenticative table
    is the Users according to InstantIndicia and all observations are depending
    on that
        1. the new WH users table is rebuilt from old WH users and the
            transition table built at step 1
        2. the WH observations are rebuilt in the following way :
             1. data before the change of release : changed from old
             observation and table in step 1
             2. data after the change of release : they should be ok

Yet we do not know whether there are other depending tables and we do not
the data structure of the two databases (moreover they are different i.e.
Mysql and Postgresql).

Any suggestions ?