mtop / speciesgeocoder

Species locality data + polygons -> nexus file.
GNU General Public License v3.0
39 stars 21 forks source link

The elevation function is not working? #40

Closed mfecalio closed 10 years ago

mfecalio commented 10 years ago

I performed some analyses to test if the elevation function is working. There is something wrong; the program is not coding species localities properly. See complete description in "test cases/4_elevation_new_tests".

mtop commented 10 years ago

The error is in the *.tif files that don't contain any elevations above 500m, which is really strange. However, using the 250 m resolution tif files in "/usr/local/db/speciesgeocoder/Elevation/250m_worlddata/" gives the followin result:

[mtop@albiorix issue_40]$ time phylogeocoder -l /usr/local/db/speciesgeocoder/preformancetests/occurrenceFE.txt -p /usr/local/db/speciesgeocoder/preformancetests/southamerica2altitude_new.txt -t /usr/local/db/speciesgeocoder/Elevation/250m_worlddata/*.tif -v > result_1000lFE_2p_30t_250m-data.nex
[mtop@albiorix issue_40]$ cat result_1000lFE_2p_30t_250m-data.nex#NEXUS
Begin data;
    Dimensions ntax=25 nchar=2;
    Format datatype=standard symbols="01" gap=-;
    CHARSTATELABELS
    1 South_america_below_500,
    2 South_america_above_500;

    Matrix
Species_a       1[49]1[151]
Species_b       1[102]1[29]
Species_c       1[20]0
Species_d       1[45]1[2]
Species_e       1[23]1[4]
Species_f       1[28]1[88]
Species_g       1[27]1[45]
Species_h       1[14]1[3]
Species_i       1[7]1[3]
Species_j       1[12]1[23]
Species_k       1[6]1[73]
Species_l       1[4]1[49]
Species_m       1[11]1[25]
Species_n       1[2]1[1]
Species_o       1[6]1[12]
Species_p       1[1]1[4]
Species_q       1[6]1[17]
Species_r       1[1]1[1]
Species_s       1[3]1[2]
Species_t       1[2]0
Species_u       1[20]1[1]
Species_v       1[28]1[7]
Species_x       1[7]0
Species_y       1[28]1[3]
Species_z       1[4]0
    ;
End;
[mtop@albiorix issue_40]$ 

Fernanda, please check if these new results make sense. BTW, excellent bug report in "test cases/4_elevation_new_tests".

mtop commented 10 years ago

Ruuds comment from Issue #38

In recent tests of the elevation function 2/3rd of the data points seem to be unregistered. Interestingly this matches the area of ocean in the data set, It is possible that the elevation files files don't have elevation data on the ocean or that the code doesn't register 0 point altitudes.

mfecalio commented 10 years ago

Mats, the new results make sense!!!