1

Topic: How to display data year on year via Indicia maps

Hi all,

Given that the PlantTracker project is likely to be a long running project we need to find an effective method to handle the display of data from different years.  I'm assuming that this isn't a novel question and others must have considered and solved this issue before.

I'm envisaging that maps will default to display current year but with the option for users to:

- select a previous year of interest
- show all years

Any ideas?

Thanks

Dave

2

Re: How to display data year on year via Indicia maps

Hi Dave,

Be it tables, charts or maps, when you request output from Indicia you will be running a report.

The report can take parameters and you would be needing one with a start date and an end date in order to select a range of records. Were you to set up a report like this I think you would get two date pickers by default so that you could actually specify any date range you fancied with them.

If you wanted to simplify the interface to have just a selector for a year which then provided the start and end dates, you would either think about subclassing and extending one of the existing pre-built forms to include such a control or you would think about adding a new year picker control to the client_helpers that you could then somehow incorporate.

Jim Bacon

3

Re: How to display data year on year via Indicia maps

Hi Dave & Jim
There is a bit more to it than this. Firstly, if you are getting into displaying large numbers of points (more than a few thousand) you might need to consider using WMS web services from GeoServer to get your points onto the map. If you do this then things will be much faster, though a little more complex to configure. Although WMS itself as a standard does not support any form of filtering, fortunately the GeoServer implementation does support filtering using either WFS or CQL. Fortunately the latter is a fairly simple format.

The Quick Species Maps prebuilt form already uses GeoServer + WMS with a CQL Filter to display each species. It ought to be relatively simple to add a year based CQL filter to the functionality offered by this form.

Also, bear in mind that you could use SLD styling to output different colour dots for different year groups, for example.

If you are sticking to the reporting approach as suggested by Jim, then one additional consideration is that you can also style the points output onto the map using the xml report file. For example the verification reports include the following column definition which sets the stroke colour according to the verification status of each record:

 <column name='sc' visible='false' feature_style="strokeColor" sql="case xo.record_status when 'C' then 
      case o.certainty when 'C' then 'green' when 'L' then 'orange' when 'U' then 'red' else 'blue' end
    when 'V' then 'green'
    when 'D' then 'orange'
    when 'R' then 'red'
    else 'black' end" />

Best wishes
John

John van Breda
Biodiverse IT