FIELDimageR
FIELDimageR copied to clipboard
Add FIELDimageR Plugin to QGIS
It would be great to be able to use FIELDImageR as a Plugin to QGIS. I have never done this and haven't had time yet, but I looked into it and wanted to start the discussion / leave notes for someone to pick up or make comments on.
- is anyone in this community familiar with QGIS plugin development and interested in helping?
- who are some users actively using the functionality (and interested in using QGIS) who can help review and guide the implementation?
This would leverage the Resource Sharing Plugin http://qgis-contribution.github.io/QGIS-ResourceSharing/
Here are some examples of R scripts in the official QGIS plugin repository: https://github.com/qgis/QGIS-Resources/tree/master/collections/qgis_rscripts/rscripts
This will require creating a separate repository for sharing the plugins.
- perhaps this can be in this repository or perhaps in a single repository shared w/ other ODM related plugins?
- Instructions are here
- once this is set up users will be able to add the plugins from github as described here
A few initial questions:
- Most important:
- what are key features / functions that should have a plugin?
- For each one, what are inputs and outputs? What is the priority?
- where should the repository be maintained?
Hi everyone,
Waw that’s awesome David, thank you for the initiative. Python and QGIS guys, please join us in this project.
About the questions. Let’s hear what the community says, but in my opinion, we can start with the functions fieldCrop, fieldMask, fieldShape, fieldPolygon, fieldIndex, and fieldInfo.
The basic arguments are:
-
fieldCrop Input • mosaic = object of class raster. • nPoint = number of points necessary to select field boundaries or area to remove. • remove = if TRUE the selected area will be removed from the image. Output • Image format raster.
-
fieldMask Input • mosaic = object of class raster. • Red,Green,Blue,RedEdge,NIR = respective position of the band at the original image file. • Index = vector with the vegetation indices to be calculated. • cropValue = referent value of soil in the image. • cropAbove = if TRUE all values above the cropValue will be accounted to make the mask. Output • Image format raster (all layers) and a binary mask (1 and 0).
-
fieldShape Input • mosaic = object of class raster. • ncols = number of ranges. • nrows = number of rows. • fieldMap = matrix with plots ID identified by rows and ranges, please use first the funsction fieldMap(). • fieldData = data frame with plot ID and all attributes of each plot (Traits as columns and genotypes as rows). • ID = name of plot ID in the fieldData file to combine with fieldShape.. Output • List with fieldShape format SpatialPolygonsDataFrame and image format raster.
-
fieldPolygon Input • mosaic = object of class raster. • nPolygon = number of polygons. • polygonID = a vector with polygon names with same order of drawing. If is NULL the ID will be the sequence of drawing. • polygonData = data frame with polygon ID and all attributes of each polygon (Traits as columns and polygon as rows). • ID = the column in polygonData with polygons names (ID) which the data will be combined with fieldShape. • remove = if TRUE the selected area will be removed from the image. Output • List with fieldShape format SpatialPolygonsDataFrame and image format raster.
-
fieldIndex Input • mosaic = object of class raster. • Red,Green,Blue,RedEdge,NIR = respective position of the band at the original image file. • Index = vector with the vegetation indices to be calculated. For the list of indices please visit the FIELDimageR manual at link: • myIndex = user can calculate a different index using the bands names, e.g. "(Green+Blue)/Red-NIR/RedEdge" Output • Image format raster with the original bands (layers) and with the new indices’ layers.
-
fieldInfo Input • mosaic = object of class raster. • fieldShape = plot shape file, please use first the function fieldShape(). • fun = function to summarize the values (e.g. mean). • Buffer = negative values should be used to remove boundaries from neighbor plot (normally the unit is meters, please use values as 0.1 = 10 cm). Output • Table with data extracted per plot.
Let us know if there are questions…!!! Thank you, Filipe