1

I'm trying to collect data along highway segments in northern Alberta. I took vector data from ABMI (http://www.abmi.ca/home.html) and rasterized this to work within LecoS. I had success in early attempts to extract spatial metrics using the LecoS vector overlay function. The road segments are wildlife mortality (animal vehicle collision) hot spots and cold spots estimated using KDE+ software. I selected the center of each segment to create a 500 m circular buffer to sample the surrounding landscape. I have other raster layers that I'm hoping to use in my summary analysis and will be expanding the sampling to different buffer sizes. The following figure shows the vector overlay sampling scheme - a 500 m radial buffer from the median of each segment.

Hot spot / Cold spot road segments with radial buffer sample on median

Here's a video example of LecoS (https://www.youtube.com/watch?v=mDpowxRzgOY) if anyone doesn't know about this plugin.

Everything was working in early trials with LecoS. I saved my workspace and the next day found that I could no longer extract LecoS metrics. I went through the entire process of rasterizing, projecting, and clipping the data to see if going from scratch would work. I tried uninstalling and re-installing LecoS, but this has not solved my problem. I clipped the raster in an attempt to make the analysis space smaller. I've kept the analysis simple by selecting only one metric at a time.

I'm using QGIS V. 2.18.21. LecoS prompts a response in the bottom left of my workspace:

"Land cover calculated for feature 58 out of 58 (0 impossible)"

However, nothing happens after this - it stalls. I left it running overnight - still no table is generated. It shouldn't be a matter of waiting, because it took only a few minutes to get a table in my earlier attempts. I've tried saving to a file, adding table to workspace, and save in the attribute table - none of these options are working.

I've uploaded my raster and the buffer into Dropbox to see if I someone can try to execute and recreate the error. The vector data came from ABMI - so it is projected in Alberta 10-TM (Forest) EPSG:3400, NAD83.

https://www.dropbox.com/sh/uuzv8iw6ek09afd/AABwAGkBDBXLH3sfawm5ItxLa?dl=0

UPDATE: I clicked on the option to append the data to the Attribute Table. This worked on one trial occasion, but the excel file is blank. I had to re-open the vector file to see the appended data in the attribute table.

The process is slow because I have to create a unique vector layer to correspond to each raster layer. Further, I can only do a few metrics at a time. This workaround process creates a whole bunch of sub-files that I have piece together. I'm including a graphic overview to help contextualize the issue.

QGIS Screen capture of LecoS processing with vector overlay selection options

There is the option to batch process by selecting through the toolbox, but the problem still exists that a separate vector needs to be created for each type of analysis (e.g., Roads-500m.shp, Agriculture-500m.shp or Roads-1000m.shp, Agriculture-1000m.shp). It wouldn't be too bad if I could save the results as a csv - because I can amalgamate in R, but the LecoS software is not creating the csv files. I can only get the data appended to the attribute table (sometimes - it stalls often). I am working with a laptop Intel Core i7 @2.60 GHz 16GB RAM - GeForce GTX 960M. Might be a processing issue? Any suggestions?

I've posted this question on the gitHub for the software as well - but thought it would also be useful to post the question here in case someone else has had this experience and could provide an answer or suggestions to make this work more effectively.

1 Answer 1

1

This has been solved with help from the creator of LecoS (Martin Jung)! There does seem to be a problem with main GUI approach, but you can use the LecoS tools processing interface to get the information to save to a table.

LecoS tools professing interface screenshot

Jung provided the following input:

Notice that new attribute columns won't show up in the attribute table directly. The file must be removed from the QGIS table of contents and loaded again This is a general problem with *.dbf files in the ESRI shapefile format which do not support on-the-fly updating.

Go into the batch processing of Overlay Raster Metrics. In my case I had to indicated that the raster wasn't classified (selected No). In the batch process you can fill in the rows to complete multiple outputs but only one metric at a time for single class. There is the option to populate with more rows but the processing does not take long. I simply process then return to the batch process screen to select a new metric output. It would be nice to have the metrics exported to a single excel file but at least it is working and the outputs can be reintegrated easily using R.

Screenshot of LecoS tools Batch Processing - Overlay Raster Metrics

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.