Hi Ramiro,

We’ve discovered the problem is when the radius is set to less than the bin 
size so passing in -b 10 (or any value over 2) your script runs fine.

The resolution in the XML file is the resolution used to calculate canopy / 
non-canopy so if this is set to 1 and the bin size is set to 10, 100 cells 
within each pixel will be used to calculate a canopy cover image with a 10 m 
pixel size. 

Hope this makes sense,

Dan

> On 26 Mar 2015, at 14:56, Ramiro Silveyra González <rasil...@gmail.com> wrote:
> 
> Hi,
> 
> so without specifying b, I can run the canopy cover metrics. But the output 
> resolution is not the one I set in the xml template.
> I am working with 1 meter resolution and the canopycover metrics is returning 
> 10 meter resolution. I tried setting metric resolution with integer "1" and 
> float "1.0" and yields same problem.
> 
> Thanks,
> 
> Ramiro
> 
> 2015-03-25 23:42 GMT+01:00 Pete Bunting [pfb] <p...@aber.ac.uk 
> <mailto:p...@aber.ac.uk>>:
> Hi Both, 
> 
> Thanks for raising that one, I am not sure what is causing the problem but I 
> will try and have a look sometime. I am a bit tied up with things for the 
> next few weeks mind as I’m out of the office until April 20th. 
> 
> Cheers, Pete
> 
> ****************************************************
> * Dr Pete Bunting
> * Senior Lecturer in Remote Sensing
> * Earth Observation and Ecosystem Dynamics Group
> * Department of Geography and Earth Sciences
> * Aberystwyth University
> * Aberystwyth
> * Ceredigion
> * SY23 3DB
> * UK
> * 
> * Ph: +44 (0) 1970 622615 <tel:%2B44%20%280%29%201970%20622615>
> * Mob: +44 (0) 7917 842743 <tel:%2B44%20%280%29%207917%20842743>
> * Email: p...@aber.ac.uk <mailto:p...@aber.ac.uk>
> * ORCID: http://orcid.org/0000-0002-7435-0148 
> <http://orcid.org/0000-0002-7435-0148>
> ****************************************************
> 
>> On 26 Mar 2015, at 08:11, Daniel Clewley <daniel.clew...@gmail.com 
>> <mailto:daniel.clew...@gmail.com>> wrote:
>> 
>> Hi Ramiro,
>> 
>> If I pass in -b I can reproduce.
>> 
>> Can you open an issue on Bitbucket for this problem.
>> 
>> Thanks,
>> 
>> Dan
>> 
>>> On 25 Mar 2015, at 21:16, Ramiro Silveyra González <rasil...@gmail.com 
>>> <mailto:rasil...@gmail.com>> wrote:
>>> 
>>> Hi Dan,
>>> 
>>> I am running spdlib on Ubuntu 14.04, conda installation with a env for 
>>> spdlib.
>>> But I think that you just gave me the solution. Thank you.
>>> 
>>> If I run spdmetrics without specifying the bin size (b), as you did,  the 
>>> canopy cover metrics works. 
>>> It was running this for my files:
>>>   spdmetrics --image -f KEA -b 1 -c 50  -r 50 -m 
>>> /media/INTENSO/Ramiro_Masterarbeit/CanopyCover1.xml -i 
>>> /media/INTENSO/Ramiro_Masterarbeit/Tiles/Rows1/Cols30/tile_row1col30_2014_DHDNGK4_1m_rmn_pmfmccgrd_h.spd
>>>  -o 
>>> /media/INTENSO/Ramiro_Masterarbeit/Tiles/Rows1/Cols30/tile_row1col30_2014_DHDNGK4_rmn_pmfmccgrd_1m_CanopyCover.kea
>>> 
>>> I tried everything on the xml template. But I did not think of not setting 
>>> the resolution with -b.
>>> Without setting b, the metric works:
>>>   spdmetrics --image -f KEA  -c 50  -r 50 -m 
>>> /media/INTENSO/Ramiro_Masterarbeit/CanopyCover1.xml -i 
>>> /media/INTENSO/Ramiro_Masterarbeit/Tiles/Rows1/Cols30/tile_row1col30_2014_DHDNGK4_1m_rmn_pmfmccgrd_h.spd
>>>  -o 
>>> /media/INTENSO/Ramiro_Masterarbeit/Tiles/Rows1/Cols30/tile_row1col30_2014_DHDNGK4_rmn_pmfmccgrd_1m_CanopyCover.kea
>>> 
>>> And now I have to questions:
>>> Is there a conflict if resolution is specified twice: command line and xml 
>>> template?
>>> Is it better to specify the resolution just in the xml template?
>>> 
>>> Thanks,
>>> 
>>> Ramiro
>>> 
>>> 
>>> 2015-03-25 21:54 GMT+01:00 Daniel Clewley <daniel.clew...@gmail.com 
>>> <mailto:daniel.clew...@gmail.com>>:
>>> Hi Ramiro,
>>> 
>>> I’ve tried under running spdmetrics on OS X (built from source), Ubuntu 
>>> 14.04 and Fedora 21 using the latest build (SPDLib 3.2.289) from conda 
>>> (installed through Python 3.4 Miniconda) and all the metrics you sent ran 
>>> through fine so no idea why it’s not working on your system. The command I 
>>> used was:
>>> 
>>> spdmetrics --image -f KEA -o test.kea -i subset_h.spd -m CanopyPercent1.xml 
>>> 
>>> What distro are you running? Do you have other things installed which could 
>>> conflict with SPDLib? Have you tried under different systems and also found 
>>> the same problem? 
>>> 
>>> Thanks,
>>> 
>>> Dan
>>> 
>>>> On 25 Mar 2015, at 18:07, Ramiro Silveyra González <rasil...@gmail.com 
>>>> <mailto:rasil...@gmail.com>> wrote:
>>>> 
>>>> ah, I forgot the xml templates.
>>>> 
>>>> As I said all work but CanopyPercent. I have also tried canopycover and it 
>>>> yields the same error.
>>>> 
>>>> 2015-03-25 19:04 GMT+01:00 Ramiro Silveyra González <rasil...@gmail.com 
>>>> <mailto:rasil...@gmail.com>>:
>>>> Hi Dan,
>>>> 
>>>> thanks for your answer.
>>>> Yes, sure. You find a subset attached to this email.
>>>> 
>>>> On this file (also on the subset) I run several metrics ('CoverRts', 
>>>> 'MeanH', 'MaxH', 'MedianH','MinH', 'SumH', 'VarH', 'StdH','Stratum6', 
>>>> 'Stratum5', 'Stratum4', 'Stratum3','Stratum2','hscoi',(....) 'MaxH_Last', 
>>>> 'MedianA', 'SumA' ). 
>>>> All of them work, but I cannot run anything based on canopycover.
>>>> I have the same problem for the all files I have (504 tiles).
>>>> 
>>>> It would be great if you can find out what is not working.
>>>> 
>>>> Thanks,
>>>> 
>>>> Ramiro
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 2015-03-23 14:35 GMT+01:00 Daniel Clewley <daniel.clew...@gmail.com 
>>>> <mailto:daniel.clew...@gmail.com>>:
>>>> Hi Ramiro,
>>>> 
>>>> Not sure on this error. If you can provide a small sample SPD file and an 
>>>> example of a metrics file which works and one where it segfaults I can try 
>>>> running it through a debugger and seeing if I can see anything. 
>>>> 
>>>> The SPDLib wiki is a bit out of date now, more up to date documentation 
>>>> can be downloaded from 
>>>> https://bitbucket.org/petebunting/spdlib-documentation 
>>>> <https://bitbucket.org/petebunting/spdlib-documentation> or there are 
>>>> tutorials available to download from 
>>>> https://sourceforge.net/projects/spdlib/files/Tutorials/ 
>>>> <https://sourceforge.net/projects/spdlib/files/Tutorials/>
>>>> 
>>>> Thanks,
>>>> 
>>>> Dan
>>>> 
>>>> On 20 Mar 2015, at 20:49, Ramiro Silveyra González <rasil...@gmail.com 
>>>> <mailto:rasil...@gmail.com>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I am running some metrics with spdmetrics.
>>>>> Any metrics works fine for me, apart from metrics related to canopycover.
>>>>> 
>>>>> I tried with different parameters but I always get "segmentation fault, 
>>>>> core dumped.." error.
>>>>> I have checked all examples in the spdlib wiki, but I do not see where my 
>>>>> template could be wrong.
>>>>> 
>>>>> Here is my xml;
>>>>> 
>>>>> <?xml version="1.0" encoding="UTF-8" ?>s
>>>>> <!--
>>>>>     Description:
>>>>>        XML File for execution within SPDLib
>>>>>        This file contains a template for the
>>>>>        metrics XML interface.
>>>>> -->
>>>>>  
>>>>> <spdlib:metrics xmlns:spdlib="http://www.spdlib.org/xml/ 
>>>>> <http://www.spdlib.org/xml/>">
>>>>>     <spdlib:metric metric="canopycover" field="CanopyCover" 
>>>>> resolution="1" radius="2" return="All" class="Grd" heightup="40" 
>>>>> heightlow="0" />
>>>>> </spdlib:metrics>  
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> 
>>>>> Ramiro
>>>>> ------------------------------------------------------------------------------
>>>>> Dive into the World of Parallel Programming The Go Parallel Website, 
>>>>> sponsored
>>>>> by Intel and developed in partnership with Slashdot Media, is your hub 
>>>>> for all
>>>>> things parallel software development, from weekly thought leadership 
>>>>> blogs to
>>>>> news, videos, case studies, tutorials and more. Take a look and join the 
>>>>> conversation now. http://goparallel.sourceforge.net/ 
>>>>> <http://goparallel.sourceforge.net/>_______________________________________________
>>>>> spdlib-develop mailing list
>>>>> spdlib-develop@lists.sourceforge.net 
>>>>> <mailto:spdlib-develop@lists.sourceforge.net>
>>>>> https://lists.sourceforge.net/lists/listinfo/spdlib-develop 
>>>>> <https://lists.sourceforge.net/lists/listinfo/spdlib-develop>
>>>> 
>>>> 
>>>> <CanopyPercent1.xml><CoverRts1.xml><hscoi.xml><MaxH1.xml><MaxH_First.xml><MaxH_Last.xml><MeanA.xml><MeanH1.xml><MedianA.xml><MedianH1.xml><MedianH_First.xml><MedianH_Last.xml><numPulses.xml><StdH.xml><Stratum2.xml><Stratum3.xml><Stratum4.xml><Stratum5.xml><Stratum6.xml><SumA.xml><SumH.xml><VarH.xml>
>>> 
>>> 
>> 
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website, 
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for 
>> all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the 
>> conversation now. 
>> http://goparallel.sourceforge.net/_______________________________________________
>>  
>> <http://goparallel.sourceforge.net/_______________________________________________>
>> spdlib-develop mailing list
>> spdlib-develop@lists.sourceforge.net 
>> <mailto:spdlib-develop@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/spdlib-develop 
>> <https://lists.sourceforge.net/lists/listinfo/spdlib-develop>
> 
> 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
spdlib-develop mailing list
spdlib-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spdlib-develop

Reply via email to