Coder Social home page Coder Social logo

fieldstudiescouncil / qgis-biological-recording-tools Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 4.0 2.03 MB

QGIS plugin for biological recorders. Created with the FSC Tomorrow's Biodiversity project.

License: GNU General Public License v3.0

Python 99.40% Batchfile 0.60%

qgis-biological-recording-tools's People

Contributors

burkmarr avatar charlesroper avatar iancarle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

qgis-biological-recording-tools's Issues

Generate Atlas Images button missing

I am an inexperienced user, so probably doing something daft but in the Options tab, I don't have a Generate atlas images button below the map mode drop down

Irregular 'atlas' grid.

From Mustafa Uçar (via YouTube): "I want to creaete grids whose horizontal spacing is 10, 10, 10, 9, 5, 5, 9, 10 respectively. I use them groundwater modelling". I replied: "I think that this has been asked for before. I'm going to log it as a feature request. It's something that I will consider doing after the conversion work for QGIS version 3." Consider allowing people to use any shapefile, e.g. one with features representing an irregular grid, to act as an aggregation template. Then count the biological records etc in each feature, just as we do an atlas map.

Map records as squares displaces 10 figure grid refs by 0.5 metres

From an email from Eric Fletcher (Cheshire Record)

I am not sure why I haven’t noticed this before now, but it seems that when I have imported Rec6 data into QGIS using TomBio it has displaced the 10 figure squares to the north and east by half a metre, or so it would seem. All other resolution data seems to display correctly. I have been using a dataset for the zoo estate and it contains 4, 6, 8 and 10 figure references.

I have attached an image that gives an example of the issue.
<<<
chester zoo estate_species distribution map zoomed_oct 2017

Spaces in grid references

The Biological Records tool does not currently cope with grid references that have spaces in them. This is a common occurrence, e.g. 'SJ 123 789' and the tool should cope with them.

problem saving TEMP layer to shp

Dear Rich,

My colleague Kris Boers contacted you earlier about the use of your plugin 'TomBio Tools' for UTM grids in Belgium. This plugin saves us a lot of time, so thank you for that!
But I noticed a bug in the plugin. When trying to save the TEMP files as a shape file I get an error that zero objects are saved. Only an empty shapefile is generated. The error is that the GridRef cells are empty. So when I entered a dummy value (1) for every cell the problem was solved. But this means I can't use the output function Format=shapefile and automatically save all generated TEMP layers to shp, unless I manually fill the GridRef column in every TEMP layer. Would it be possible to fix this in a next update of the plugin?

image

Best regards,
Diemer

User Defined Grid

In previous versions, the grid size/Grid Ref precision picklist had the option to set a user-defined grid size. That is missing from the picklist options yet the Grid Size field is still present but will not allow entry. Will this be re-instated or do I need to keep setting up user-defined grids in QGIS 2.18? This was a most useful feature, which I sincerely hope will be re-introduced.
Thank you

Some paths hardcoded

E.g.:

Error: Image folder 'C:\Users\fsc\Documents\Temp\images ' does not exist.

Please remove them all.

Non standard whitespace characters around GR cause python error

The Biological Records tool trims off whitespace characters from a grid reference before using it. But some non-standard whitespace characters are not trimmed, causing a python error when the GR is processed.

A workaround is to trim these out of the GRs using Excel. The standard 'TRIM' function won't recognise them, but you can use this insread: =TRIM(SUBSTITUTE(A2,CHAR(160),CHAR(32)))

NBN downloads not working

The NBN downloads are not working. This is due to an error with the NBN Atlas API. I am in touch with the NBN and currently awaiting a response from the development team.

Set origin (displace) of the 5km grid?

Hello,
I hope this is the right place to post my issue.
I only yesterday discovered this plugin (Biological-Recording-Tools) and immediately loved it, as it does things that I was trying to figure out "manually" for some time.
I mainly want to do species distribution atlas maps for Luxembourg, with a 5km grid.
As Luxembourg is, compared to other country relatively small we usually "displace" the origin of our 5km grid to better cover the surface of Luxembourg. We do for example place a grid cell on 53.000E 54.000N etc.
Now your plugin places the 5km grid automatically on 55.000E 55.000N etc. If only using the 1km grid this is not a problem, however choosing any other bigger grid size in the plugin, this does not work for Luxembourg.
I tried to illustrate this "problem" in the attached map.

Is there any way of changing the origin of the 5km grid cells?
Or any chance that this feature will be added in a future version of the plugin.
If I'm able to solve this small "problem" I would know a series of people whom I could recommend this plugin to here in Luxembourg.

Hope someone can help
Kind regards
Paul

lepus europaeus
Showing the grid used typically by us (black lines) and the grid cells placed by the plugin (blue)

Cannot load QGIS plugin

My team have all recently upgraded to Windows 10 and I am having trouble getting the plugin to load on our new setup. We are now running QGIS version 3.0.1 on Windows 10. I have had no trouble recently using the FSC plugin on QGIS 3.2 and 2.18.

When trying to install Tombio 3.2 I get the following message:

Couldn't load plugin 'TomBio' due to an error when calling its classFactory() method

ModuleNotFoundError: No module named 'qgscollapsiblegroupbox'
Traceback (most recent call last):
File "C:/PROGRA1/QGIS31.0/apps/qgis/./python\qgis\utils.py", line 336, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/MyName/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\TomBio_init_.py", line 26, in classFactory
from .tombio import TomBio
File "C:/PROGRA1/QGIS31.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/MyName/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\TomBio\tombio.py", line 28, in
from . import nbndialog
File "C:/PROGRA1/QGIS31.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/MyName/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\TomBio\nbndialog.py", line 23, in
from . import ui_nbn
File "C:/PROGRA1/QGIS31.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:/Users/MyName/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\TomBio\ui_nbn.py", line 825, in
from qgscollapsiblegroupbox import QgsCollapsibleGroupBox
File "C:/PROGRA1/QGIS31.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'qgscollapsiblegroupbox'

Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
QGIS version: 3.0.1-Girona Girona, a86bec25eb


I know the obvious answer would be to try a later version of QGIS but unfortunately we are constrained by security and are waiting for version 3.4 to be approved and scripted by our ICT team, which may take a while.

Do you have any suggestions?

*edited - we are using version 3.0.1 Girona

OSGR panel doesn't handle being small

If the OSGR panel isn't large on MacOS then the grid reference label isn't visible, see attachment.

Looks like the widget packing needs a bit of fiddling.

screen shot 2018-06-18 at 12 08 41

APPLIED STYLES NOT APPLIED IN SHAPEFILE GENERATION

Applied styles files used to produce the TEMP layers do not seem to be applied to any shapefiles generated by the 'Output options' section.
I would like to use the QGIS2WEB plugin to produce >1200 species distribution maps but if the shapefile output does not have the STYLES applied, these styles will have to be added individually to all of the shapefiles !
Martin Love

p.s. I don't seem to be able to get QGIS to apply STYLES to batches of layers (which might mitigate the problem) only individually !

png

Hi Richard
Fantastic plugin - thanks
I'm working on mammals/bats, so the number of maps is much smaller than in your tutorials. It would be easy if I can influence the size of the .png's. Now they are very small - I can image it would be a problem if I make them 10x bigger if I only need 20 (or even 50) maps. But that way, I can immediately use them in an atlas (paper)
Kind regards
Kris

Distribution maps - subspecies maps merged into one

Hi

Firstly, can I say a huge thank you for making this plugin available. I need to create nearly 2000 dot maps and your plugin makes that a breeze.

Some background: I'm using QGIS 2.18.1 and the v2.6.2 of the TomBio tools. I'm mapping distribution of plants in the Scottish borders. The distribution data is held in a PostgreSQL v9.6 database and PostGIS v2.3.0. I'm creating the maps using the TomBio plugin by taxon and then saving them as an image.

However, I am having an issue with the creation of the some of the dot maps. The issue is evident on QGIS and not just in the saved image. What is happening is that two lots of plant data are being mapped in one map. It seems to occur when the plant taxon names share the same species name. eg Agrostis canina and Agrostis caninia sens. lat. ie: when sens. lat. is appended to the plant name, or there is a separate subsp., agg. or var. varient of the plant.

This is happening consistently where the plant names are similar in this same way:

  • Aconitum napellus and Aconitum napellus sens. lat.
  • Aphanes arvensis and Aphanes arvensis agg.
  • Asplenium adiantum-nigrum and Asplenium adiantum-nigrum sens. lat.

When there are more than two subspecies it seems to happen randomly. In the case of the Arenaria serpyllifolia maps the Arenaria serpyllifolia map is merged with the Arenaria serpyllifolia subsp. leptoclados map not with the other two. Similarly with the Aira caryophyllea maps.

You can tell when there is a merged map as the plant name labels are overlaid (luckily I told QGIS to draw the label even if they collide with other labels otherwise I may not have spotted this) and when inspecting the underlying data it is evident that both species data is mapped on a single map.

It appears that the mechanism to get the unique species name doesn't take into account the full name when getting the data for the individual maps.

Could you take a look at this and hopefully fix it? Let me know if you want any more information.

Thanks very much.

-Bill-

Filtering on common name not working as expected

From an email from Patrick Cook (Butterfly Conservation)...

I’ve been importing records of Small Pearl-bordered Fritillary and Pearl-bordered Fritillary using the biological records tool. When I use the scientific names I noticed the data looks correct. However when I use the English names and try to import just the Pearl-bordered Fritillary records it also brings in Small-Pearl bordered Fritillary too, confirmed by checking the attribute table of the resulting layer. I’m guessing it doesn’t look for an exact match from the csv?

POLYGON SELECTION NOT ALWAYS WORKING FOR NBN TOOL

I think I have a similar problem to issue #22 closed recently. On my system I have found that the polygon selection does not work for polygon shapefile layers (PSL) created in previous uses of a QGIS Project.
If I create a PSL in a project and select it with NBN TOOL open then the 'polygon' box gets a tick and the filter works OK. If then the NBNTOOL is closed the project saved and then shut down, when reopening the project and using the NBN TOOL the previousely created PSL can be selected as before but the 'polygon' box does not get a tick and the filter fails ? Never to work again unless the PSL is deleted and recreated when it will work until the project closed as before. Am I doing something wrong ? I think I had had this before the QGIS 3.4.3 upgrade ?
Martin

Create grid map layer from polygon layer

Hello,

Still happy with the tool to create atlas maps.
After initially using the tool by importing a csv files with only a small number of species and their occurrences (point data) I now moved on to adding our entire database (1.4 mio observations) to my QGIS project. It was added as PostGIS layer. To limit the data shown I'm using a simple quarry on the layer.
My initial idea was: the Biological-Recording-Tools can read data from a layer (and not only by importing data from a csv file) and that I could simple use the connected layer as a source.
However the layer that I have has point data and polygon data (see screenshot, green squares come from the original data, not created by Biological-Recording-Tools), the layer is thus a polygon layer and can not be read as source file by the Biological-Recording-Tools.

A workaround that I found is to:

  • run the quarry on the initial layer, then "save as" the layer to only get the desired data in a new file.
  • then run "polygon centroids" (vector - geometry tools) on this new layer.
  • use the resulting point layer as source for the Biological-Recording-Tools and get my distribution map as desired.

I was now wondering if there is a possibility that the Biological-Recording-Tools could directly read a polygon layer? Or is there another approach I could take to this "problem". My workaround is working, however a hint to a "faster" method would allays be welcome.

Thanks in advance of any suggestion

my original data comprising polygon and point data

Including grid ref squares e.g. monads with zero records in dbf files

I have been using the Biological Records Tool to generate 1km square record density maps to identify under recorded squares for the local biological records centre for which I work (Cofnod). This is very effective. However the resulting dbf file only lists squares for which records exist. It does not list squares with zero records which is what I would like. Would this be a possible enhancement? (I assume for it to do so it would require some sort of boundary (I have been using vice-county boundary vector files)).

Importing CSV using 3.4.4-Madeira

Hi Rich. I've just tried opening a csv with 3.4.4-Madeira having upgraded QGIS earlier this week and it doesn't seem to open it. It also gives me no indication that anything has failed too. I've just tried opening the same file using QGIS 2.1.18 and it opens fine. Any suggestions? Thanks

Clearing Taxon column can cause problems

Clearing the taxon column before generating maps should result in maps that include records of all taxa, strange results can occur including map generated with very few records. The root of the problem appears to be that clearing taxon column does not clear the taxon tree.

Can't see bottom of Biological records panel when docked

I've seen this issue on a lot a machines when people come on my courses. Seems to be a that users often can't see the bottom bit of the Biological records toolbar when it is docked. This is a big issue as you need that bit to generate and remove the layers and exports. Work around is to have free floating panel but this quickly becomes a pain to use!

Problem with TomBio and latest QGIS 3.4.3

I seem to have a problem where on an existing QGIS project since upgrading to V 3.4.3 trying to start the Biological Records tool fails and after a few seconds QGIS closes. The other TomBio tools OSGR Tool etc start and work OK.

Tried building a new project from scratch which worked OK until shutting down and restarting new project when the above problem returned.

Martin

CONVERTING GRID LAYER TO SHAPEFILE

QGIS 3.0 - Not sure if I'm doing something wrong but, trying to convert an OSGR Tool, grid layer to a shapefile using 'Layer - Save As' produces an error as in the attached.
Regards
Martin
15-05-2018 09-40-48

Logging should indicate row number of bad GRs

When problems with records are logged on the log tab, the row number in the CSV file is not indicated. This should be added so that people can precisely locate problem records, e.g. bad GRs. It looks like bad GR's aren't logged either - so fix this. (Came from a question at the ALERC 2018 conference.)

Future developments

Hi Rich
I would find it really helpful if he biological records tool could live link to Recorder 6 and extract records based on taxon status (inc locally added ones). Is this something that is in the pipeline?

Regards

Nik
LERN

Buffer not filtering

HI Rich. The buffer filter does not appear to work properly in the NBN Atlas Tool for QGIS 3.0.3. It creates a buffer as normal but there is no filtering. It still works fine for 2.18. Can you confirm if the procedure has changed or is this an actual 'bug'? Cheers. Wayne.

Creating map layer at 10 fig grid reference

I'm working on orchid records with a nature reserve with the raw data in a cvs file with each row being a single record and a 10fig grid reference. I've managed to crate some very useful maps showing the records as points & on a 10m atlas squares styled to show difference abundance levels.
What would also be useful is a way to create a 1m atlas squares which would effectively combine all the data points which have the same 10-fig grid references and allow abundance levels to be shown in a much finer scale. Is it possible to get this added as an option? (I realise it's only applicable to within site projects like mine) Or is there another way to do this? Quite a few of our spreadsheets from survey work end up with several records at the same grid reference, I could manipulate the data in excel to combine rows but if there's an easy way to do it in QGIS that would be great.
Thanks!
(Sorry if this isn't the best platform to raise this - I was directed here by the chap running our training course!)

Feature request - point output for atlas maps

Add a 'point' output option in addition to 'circles' and 'squares' for atlas map production. That would allow people to do styling based on graduated symbols. At the moment they would have to make a centroid map from the circles/squares.

Further problems with non-standard characters in taxon names

From an email from Marco Zenatello:

Hi Richard, I am still using your (excellent) tool to produce draft atlas maps for birds. However, if I use Italian names as a taxon field, TEMP map layers are not produced for those birds whose name contains an accent (e.g. Chiffchaff, which in Italian is written "Luì piccolo"). It's a minor bug which I can easily overcome by editing my dataset, but perhaps you may be interesting to know it!
That's all - have a good day
Marco

Error in add_grid_ref_provider.py when setting default CRS: QGIS 3.6.1/tombio 3.2.1

I have used the tombio plugin for a while on QGIS 2.18 (on kubuntu linux) with no problems. I am now testing QGIS 3.6.1 with Tombio 3.2.1. When changing the default CRS for new projects in Settings->Options->CRS it throws this error:

An error has occurred while executing Python code:

RuntimeError: wrapped C/C++ object of type AddGridRefAlgorithm has been deleted
Traceback (most recent call last):
File "/home/paul/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/TomBio/add_grid_ref_provider.py", line 57, in loadAlgorithms
self.addAlgorithm( alg )
RuntimeError: wrapped C/C++ object of type AddGridRefAlgorithm has been deleted

Python version: 3.7.2 (default, Nov 10 2011, 15:00:00) [GCC 8.3.0]
QGIS version: 3.6.1-Noosa Noosa, 93e761dd

Thinking this might be a peculiarly linux problem I did a fresh install on Windows 10 with qgis 3.6.1 from QGIS-OSGeo4W-3.6.1-1-Setup-x86_64.exe on the qgis download page, and the same version of tombio and got the same error on the line 57 in add_grid_ref_provider.py.

Any thoughts?

Paul

Issues accessing NBN data behind proxy

I'm trying to access data using the NBN tool but unfortunately getting a proxy error.

e = {URLError} URLError(error('Tunnel connection failed: 407 Proxy Authorization Required',),)

I can incidently get through to the main site and retrieve data via a browser using:
https://data.nbn.org.uk/api/taxa?q=robin

I have added my proxy settings to the network tab and can access the plugins repo, etc. Have you set this up to work behind a proxy?

Thanks

Matt

Updating map when csv changes

Not sure if I should be here or in the forum.... I'm trying to work out how I can update the map layer automatically when a .csv is changed. I can do this directly in QGIS using the Watch File checkbox when creating a layer from the .csv. But as FSC tools neatly simplifies this stage I can't seem to do it with maps I've created with the FSC tool. I can't find a way to Watch File after the layer is created, only at the create layer stage. I'm quite new to this so might be missing something obvious. Thanks.

batch saving distribution maps with two distribution periods

Dear Rich,

A nice extension of the plugin would be if one could save two layers per map when badge saving maps. I'm making an atlas of the mammals of the Brussels capital region and in every map I want to compare the distribution of the previous atlas period (squares) with the distribution in the current atlas period (circles). It works perfecty to generate these layers with your plugin and combine them in the print composer (see image below), but as far as I know it is not possible to use the badge saving mode in your plugin to automatically generate this combination of distributions for each species to images. That would be a nice addiation to the plugin. :-) Unless you know a way to work around?

image

Best regards,
Diemer

ADD GRS TO LAYER

I may be going barmy but - I think the Lat/Lon columns in the Attribute Table produced by the tool have their headings reversed ?
Feartures
The attached screenshot shows Fonthill Lake and its entry in the Attribute table with Google Earth display marker indicating the Lat/Lon of the lake correctly ????????

Bad Gateway on installation attempt

Hi Richard,

Having trouble installing the tool onto a newly installed 2.18 copy of QGIS, the error message I get when clicking Install plugin is attached.

Any ideas?
Cheers,
Steve.

capture

inactive / empty fields for Lat/Lon

Hi Rich!
Trying to use TomBio tools module for my scientific purposes, I faced with a problem concerning inactive or empty fields for X and Y columns, as well as for OS GridRef Column. I suspect it may depends on my csv file format, that might be wrong... I tried csv files containing 3 columns (Location, Latitude, Longitude) or only 2 columns (Latitude, Longitude) without any text strings - only 2 columns of figures. Anyway results were the same: I can't choose X and Y columns for coordinates - these fields are unable to be chosen.
What should I do? Please, give me a clue how solve this puzzle. Thanks in advance!
Best wishes,
Pavel

New filter (spp group) for NBN Atlas tool

Hi Rich. As discussed, I would like to request an enhancement to the NBN Atlas tool - an additional filter to allow user to return and download data for a group of species, e.g. on a designated list or user-defined species list. I think this would be of use for many TomBio users. It looks like it should be supported by the NBN Atlas webservices: https://api.nbnatlas.org/ in one way or another!

QGIS PRINT COMPOSER AND TOMBIO COMPOSER IMAGE #TAXON# LINK

Has the link between the QGIS Print Composer and the TOMBIO Composer Image output brocken ? I wanted to print some distribution maps using the TOMBIO composer image output that used to work fine but now instead of printing the Taxon name as in the CSV file the distribution map shows #TAXON# etc.
This seems to have happened after upgrading QGIS to V 2.18.6 and TOMBIO to the NBNatlas version !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.