1

Re: Dumb reporting question

Hi there,

First of all I would like to apologise for asking what is probably a very dumb question.  I am new to indicia and have only recently performed the Drupal installation and setup.  I am using the BRC test warehouse prior to going live.

I have created my species and taxons and have also created a submission form, which uses google maps to allow users to report sightings.  This all seems to work fine and submissions show when I check the reports on the warehouse.

The problem that I am having is with the reporting form.  I have created a form for displaying my sightings on a map, but think that I am missing a step out as my sightings are not showing on the map.

My gut feeling is that I am not inputing the correct data in the Feature Type field in the distribution layer.  What should I be putting in there to access data from my warehouse?

I have the correct species selected in my species list.

Select Form category = Reporting
Select Form = Distribution Map1

Any help or pointers would be gratefully accepted.

Thanks in advance.

Mark

2

Re: Dumb reporting question

Hi Mark,

Not dumb - Indicia is new to everyone.

The only thing currently you would want to put in the Feature Type field for the Distribution Map 1 is
indicia:detail_occurrences.

As an aside, the help text says "The list of feature type names can be viewed by clicking on the Layer Preview link in the GeoServer installation." This is hardly helpful unless you know that GeoServer can be viewed at http://testwarehouse.indicia.org.uk:8080/geoserver/web/. If you are in the position of warehouse administrator you can create your own layers to display more complex maps.

There is also an issue of whether you have selected Show All Species and, if not, how you have specified which species to show on the map. But first check you have the feature type set as above.

Jim Bacon.

3

Re: Dumb reporting question

Hi Jim,

Thank you for your quick response.  i had almost got my settings correct.  I did have indicia:detail_occurrences selected, but had squirrels as my species, rather than all species.  When I select all species, then my entries showed on the reporting map.

I basically have three options for my users, all of which come under squirrels.  There are Black, Red and Grey.

All I need to do now is to be able to differentiate on my map between the three types of squirrels (black, red and grey).  Preferably by colour so that I can see the different clusters throughout the UK.  Once this is done, then my website functionality is complete.

Is this simple to do?

Thanks

Mark

4

Re: Dumb reporting question

Hi Mark,

With the Distribution Map 1 form you get one distribution layer that shows species from the selected Species List. You either have to select Show All Species, as you have done, and all species in the list are shown, or you have to select a single species using the Taxon Identifier field.

What you want to achieve is to superimpose three layers, one for each species, in different colours. You can do this using the WMS Layers from GeoServer option in the Other Map Settings section. However, when selecting other layers it doesn't look like you can include any options, such as a filter by species, so I would have to construct the layers for you in GeoServer, already filtered, for you to display.

However, a more flexible approach would be to add configuration options for 3 distribution layers to the prebuilt form, much like the My Dot Map form in the Miscellaneous category. (This can display up to three layers filtered by values associated with a particular sample). That would involve a certain amount of coding. How's your PHP?

To side step the issue you could have 3 separate maps, one for each species.

Jim Bacon.

5

Re: Dumb reporting question

HI both
One more option would be for Jim or I to set up an SLD file (a kind of map style file) on the GeoServer which formats the map layer to show different colours for each of the 3 species. See http://docs.geoserver.org/stable/en/user/styling/sld-introduction.html then http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons.html#attribute-based-polygon which shows an example where filters in the SLD file are used to define the output colour of the polygon.

John van Breda
Biodiverse IT

6

Re: Dumb reporting question

Hi John,

Nice idea. I didn't know you could do that. I see a potential problem in that this uses one layer so it is going to be difficult to control which species appears on top when there are two records in the same area. Nor could you switch a species off to better see another.

It would also be a solution specific to this survey as well, rather than providing a solution to anyone wanting to compare distribution of two species. Your idea is probably the quickest fix though.

Jim.

7

Re: Dumb reporting question

Hi Jim and John,

Thank you both for your responses.  They have all been very helpful and have provided me with a more thorough understanding of Inicia.

Jim - regarding my PHP, its not bad, but with the timeframe that I have for the BBC dealine, I'm not sure its quite good enough.  There will be a BBC radio show on December 17th, so that should provided a bit of traffic, with so far no firm deadline for the One show on BBC1, but it could be anytime after that.

I really like also John's suggestion about setting different colours for each species.  That way, I can just have one colour for Red squirrels, one for Grey and one for Black.  That should work perfectly.  If there is a lot of colour on the map, then thats fine as I could always generate tables also to show specific breakdowns.

If one of you could help to get this up and running, then I would be very grateful.  I could obviously then impliment something more detailed at a future date when I have a better understanding of the software.

Thanks again for all of your great support!

Mark

8

Re: Dumb reporting question

Hi

I have committed a new form to the repository that will create a map with three species layers. You can copy it from here to a text file in your iform/client_helpers/prebuilt_forms directory which should be saved as distribution_map_3.php.

There are three distribution layers to define.

The feature type for each is indicia:detail_occurrences.
The style can be one of dist_point_red, dist_point_grey or dist_point_black.
Ensure you select your species list.
Add the taxon meaning id for each species in the Taxon Identifier field. You can find this by going to the warehouse and editing each of the taxa in your species list.

Regards,
Jim Bacon.

9

Re: Dumb reporting question

Hi Jim,

Thank you very much for creating that.  I have added the php file and recreated my forms with the new settings.  I now seem to have the coorect reporting form, with a map that lists all three types of squirrel, within three layers.

One thing that seems to have happened however since moving from the test warehouse and recreating the forms, is that my submit sightings form no longer shows a map. 

I tried going into the indicia features and reverting my components before re-entering my settings, but the map still does not show for submit sightings.  It seems fine however for reporting.

I am wondering if this issue could have been caused in some way by the new php file or (which I think maybe is more likely) by the move to the new warehouse? 

I think once I get my submit sightings map back again, then I will have a fully functioning site ready for the bbc show.

Thank you for all of your advice so far.

Mark

10

Re: Dumb reporting question

Hi Mark
Have you checked if there are any JavaScript errors on the page? If this page is online and you could email me a link I'll take a look (email link should be on the left).
Best wishes

John van Breda
Biodiverse IT

11

Re: Dumb reporting question

Jim
Regarding the new distribution_map_3 form I wonder if a better approach would be a "multi_distribution_map" form which lets you add any number of distribution layers. To do this you would need to use the data_entry_helper jsonwidget control which lets you define a schema for a data structure that can be created. If you look in the report_grid prebuilt form at the columns_config parameter you will see how this is done. So, you can effectively allow the user to set up a list of layer definitions which gets saved as a single JSON parameter, then loop through them to create the required distribution layers.
Cheers

John van Breda
Biodiverse IT

12

Re: Dumb reporting question

Hi John/everyone,

I can confirm that this last issue was caused by my coding :/

I added onload="window.scrollTo(0,0)" to my page.tpl.php body.  I did this because on my home page, the survey map is displayed in an iframe. This is fine in Firefox, but in IE it causes the homepage to jump half way down the screen when it loads. The code that I put in fixed this issue, but unfortunately seems to have caused the issue that I reported. 

I have now removed the code and the map is displyed correctly.  I will now try to find a different workaround for the iframe ie bug.

Thanks everyone onece again for all of your assistance.  I have learned a lot about the software from you all and think that I have a site that with a slight amount of prettying up should do the required job really well.

Best wishes,

Mark

13

Re: Dumb reporting question

Hi Mark
If you use PHP to require_once the helper_base.php file (in the client_helpers folder), then you can use code something like:

helper_base::$onload_javascript .= "window.scrollTo(0,0);\n";

This will insert your code into the Indicia window.onload handler so that all the code should work OK together. Hope that helps.

John van Breda
Biodiverse IT

14

Re: Dumb reporting question

Jim Bacon wrote:

Hi

I have committed a new form to the repository that will create a map with three species layers. You can copy it from here to a text file in your iform/client_helpers/prebuilt_forms directory which should be saved as distribution_map_3.php.

There are three distribution layers to define.

The feature type for each is indicia:detail_occurrences.
The style can be one of dist_point_red, dist_point_grey or dist_point_black.
Ensure you select your species list.
Add the taxon meaning id for each species in the Taxon Identifier field. You can find this by going to the warehouse and editing each of the taxa in your species list.

Regards,
Jim Bacon.

Hi Jim,
I am using the distribution_map_3 form to display red and grey squirrels but I can't get the style to work. When I add dist_point_red there doesn't seem to be a problem (it's hard to tell as the default colour for the points is red!) but the grey and black styles don't work. An overlay over the entire map can be seen when viewing the page in Chrome and the icon for the colour in the legend is missing. Does this functionality only work on the Live Warehouse or have I got a setting wrong in my form (using the test warehouse)?

Thanks,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

15

Re: Dumb reporting question

The setup of GeoServer on the test warehouse is different to the live server - there are styles for dist_point_green and dist_point_blue you could use though.

John van Breda
Biodiverse IT

16

Re: Dumb reporting question

Excellent, thanks.

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar