mbtyers / riverdist

River Network Distance Computation and Applications
23 stars 1 forks source link

line2network removes the contents of data tables #12

Closed jsta closed 1 year ago

jsta commented 6 years ago

Is this expected behavior for these two outputs not to match?

data(Kenai2)
sp <- Kenai2$sp
head(line2network(sp)$sp@data)
 Units: m 

 Removed 40 segments with lengths shorter than the connectivity tolerance. 
  Id
1  0
head(Kenai2$sp@data)
  OBJECTID_1 OBJECTID Permanent_      FDate Resolution  GNIS_ID
0          1    56632   27778886 2012/02/14          2     <NA>
1          2    56633   27778954 2012/02/14          2 01412957
2          3    56634   27778976 2012/02/14          2     <NA>
3          4    56672   27778300 2012/02/14          2 01413046
4          5    56690   27777582 2012/02/14          2 01413704
5          6    56692   27778876 2012/02/14          2     <NA>
              GNIS_Name LengthKM      ReachCode FlowDir WBArea_Per FType FCode
0                  <NA>    0.307 19020302003791       1       <NA>   460 46006
1 East Fork Moose Creek    5.090 19020302003828       1       <NA>   460 46006
2                  <NA>    1.297 19020302003843       1       <NA>   460 46006
3           Funny River    5.902 19020302002203       1       <NA>   460 46006
4           Olson Creek    0.261 19020302002534       1       <NA>   460 46006
5                  <NA>    0.460 19020302002248       1       <NA>   460 46006
   Shape_Leng Enabled Shape_Le_1
0 0.004767049       1   306.9358
1 0.070308984       1  5090.4162
2 0.017761108       1  1296.7689
3 0.085604192       1  5901.5960
4 0.003891757       1   260.8306
5 0.005536167       1   459.5132
mbtyers commented 1 year ago

riverdist no longer uses sp