1

Topic: Mapping and downloading records

On our university recording website I would like to enable features for viewing and downloading data. Ideally I would like users to be able to view data on a grid and map and be able to filter it based on whether it is their data, taxonomic group and perhaps date.

I've tried out a few of the options available but have some queries about their functionality.

•    Dynamic Report Explorer. I have got this working but am I correct in saying this it is not possible to filter records by species or other variables?
•    Quick Species Maps. This looks promising as users can view data for individual taxonomic groups on a map and compare different species on the same map. I also note that for this feature on iRecord there is an option for only viewing a user’s own data. At the moment this feature is not working on my test site – no records appear on the map. In the Indicia Documentation it states that GeoServer needs to be set up on the Warehouse. I’m assuming that this is on the BRC test warehouse. Is there some further configuration I need to get it working on my test site?
•    Mapping Portal. This also looks promising as data for individual taxa can be viewed on a map (although different species cannot compared on the same map as in Quick Species Maps) and it looks like data can also be viewed on a grid. Is it possible to add other filters? At the moment this feature isn’t functioning on my test site either; I get the message: Unable to find report library/taxon_designations/species_and_occurrence_counts_for_boundary.xml. I can’t find much documentation about this feature. Does it also need GeoServer to function?
•    Is it possible to link any of these features to the downloading of data. E.g. someone filters data on a map (or grid) and then downloads it? At the moment I have the Easy Download form enabled for data download which I’m happy to continue using if there isn’t a download option integrated into any of the data exploration forms.

My conclusion at the moment is that either the Quick Species Maps or the Mapping Portal features along with Easy Download are probably what I should go for. Do you agree? Perhaps there are better options that I have missed? Can you offer any advice on how I can get Quick Species Maps and the Mapping Portal functioning so I can test them out and make a decision about which would be the best to use?

Many thanks

Rachel

2

Re: Mapping and downloading records

Hi Rachel
The Dynamic Report Explorer is the most recent approach to this kind of user interface and will probably give you the most flexibility. It supports filtering either through the parameters in the report file which you are using, or via filters entered into the top row of a report grid (as long as the report you are using is correctly configured). You can also add download links to the bottom of any report grids.

A tutorial for this page is available on Read the Docs.

To get download links, you need to use the @downloadLink=true option in the form structure configuration, under each report grid definition. Here's an example form structure to get you started:

[params]
@dataSource=library/occurrences/explore_list_2
@paramsInMapToolbar=true
[map]
@dataSource=library/occurrences/explore_list_2_mapping
=Records=
[report_grid]
@dataSource=library/occurrences/explore_list_2
@rowId=occurrence_id
@downloadLink=true
=Species=
[report_grid]
@dataSource=library/taxa/explore_list_2
@rowId=taxon_meaning_id
@linkFilterToMap=false
@downloadLink=true
John van Breda
Biodiverse IT

3

Re: Mapping and downloading records

Hi John

That sounds great; I will have a go at modifying the Dynamic Report Explorer.

I did actually have it working yesterday but now I just get a map with this error message above and below:

Report: reports/library/occurrences/explore_list.xml XMLReader::read(): file:///D:/web%20sites/indicia/content/reports/library/occurrences/explore_list.xml:51: parser error : Attribute datatype redefined

Any idea what that could be about!?

Many thanks

Rachel

4

Re: Mapping and downloading records

Hi Rachel

The testwarehouse has moved server this morning. (Everyone is advised to subscribe to the Server Maintenance topic to get notification of scheduled work) This may introduce some transient problems.

I could see a difference between the version of explore_list.xml on warehouse1 and the testwarehouse so I have ammended the file on testwarehouse. I expect this to cure the problem.

I know there is a minor problem with GeoServer which may also affect you. Biren is sorting that out at the moment.

Jim Bacon

5

Re: Mapping and downloading records

Hi Jim/John
Many thanks for your help with this. I now have Dynamic Report Explorer up and running and it seems to be working fine. Just a couple of quick queries though. Firstly, I've added a couple of custom attributes to the report grid and they have appeared in the final two columns - is there a way of changing the order of the columns? Secondly, I've added @downloadLink=true to the end of the form structure configuration but it doesn't seem to have appeared.
All the best
Rachel

6

Re: Mapping and downloading records

Hello Jim and John
I was just wondering if you'd had a chance to think about the two queries in my previous post on this topic.
Many thanks
Rachel

7

Re: Mapping and downloading records

Hi Rachel

I haven't used this form myself so have no ready answers.
I may be able to try it out in a few days but, meanwhile, you know more about it than I do.

Jim Bacon

8

Re: Mapping and downloading records

Hi Rachel

First part of an answer. I have found how to control the column order.

You have probably read the documentation for the Dynamic Report Explorer. At the bottom of that page you will see how the Columns Configuration List can control the display of columns. What you need to do is to add all the columns you want in your table to this list in the order that you want them. To do this you need to know the fieldname for each column and, in particular, your custom attribute columns.

The documentation suggests that you look in the report file to find the field names but you cannot get the custom attribute names there. Instead, I used FireBug to look at the table headers. They have an id in the form report-grid-0-th-fieldname.
My attributes turned out to have fieldnames of attr_occurrence_id or attr_sample_id where id is replace by the attribute_id. This is the same id that you have put in the Preset Parameter Values for occattrs or smpattrs in order to make them appear at all.

This has raised a side issue that adding a sample attribute breaks the query and you get no rows in the report. I will investigate.

Jim Bacon.

9

Re: Mapping and downloading records

Hi

An update to the above. I found and fixed a problem with the library/occurrence/explore_* reports. Sample attributes can now be added to output from these reports.

Will now investigate the download link problem.

Jim Bacon.

10

Re: Mapping and downloading records

Hi Rachel

I have found that the missing download link was fixed by John back in February. Your options are to either copy the development version of report_helper.php, which contains numerous other changes, or patch your existing file (probably in /sites/all/libraries/iform/client_helpers). In either event, make a backup of your current file first.

To patch your existing file you need to make two changes. To make the links appear you need to copy the change in r5262 at line 416 or thereabouts (but not the other changes in this revision). To make the links function you need to add the change in r5298 around line 330.

Jim Bacon.