shawnlaffan / biodiverse

A tool for the spatial analysis of diversity
http://shawnlaffan.github.io/biodiverse/
GNU General Public License v3.0
75 stars 19 forks source link

Tabular tree export - add plot coords to enable plotting in graphics/GIS software #281

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Adding plot coords to the tabular tree export will make it possible to recreate 
the tree in GIS and/or other software.  

The advantage here is that the colours used for geographic displays are more 
easily linked since one can copy layer definitions across.  Otherwise 
specialised tree plotting software should be used.

Original issue reported on code.google.com by shawnlaffan on 31 Jan 2012 at 4:00

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r887.

Add code to calculate and add the coords.  
Possibly this can replace the code used in the GUI. 
Need to change the system to pass a scale factor as an argument, rather than 
making the plot X:Y=1:1.

Original comment by shawnlaffan on 31 Jan 2012 at 4:04

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r888.

User can now specify a scale factor if desired.  

Original comment by shawnlaffan on 31 Jan 2012 at 4:31

GoogleCodeExporter commented 9 years ago
How to use the output of this change:

If you are using ArcGIS then you need to use the "XY to Line" tool twice (once 
for the node lines and once for the vertical connectors).  

For the node lines, use plot_x1, plot_y1, plot_x2 and plot_y2 as the coords.  
Use the element field as the ID field (unique identifier), as this allows you 
to run a database join to re-connect any other data you exported with the tree 
(e.g. calculation results for each node).  

For the vertical connectors you repeat the process, this time using vplot_x1, 
vplot_y1, vplot_x2 and vplot_y2 as the coords.  You only need the element field 
if you want to colour the vertical lines as well. 

If you have reversals in the tree (i.e. negative node lengths) then you can use 
definition queries to separate these into +ve and -ve layers.  Just check for 
plot_x1 > plot_x2 and assign a dashed line style if you want to be like 
Biodiverse.

Original comment by shawnlaffan on 31 Jan 2012 at 4:40

GoogleCodeExporter commented 9 years ago
More details on how to use:

Set the Line Type to Geodesic and the SPatial Reference to a projected 
coordinate system (e.g. any UTM zone).

Original comment by shawnlaffan on 31 Jan 2012 at 4:43

GoogleCodeExporter commented 9 years ago
Still need to handle non-ultrametric trees.  Plotting currently starts from the 
longest terminal, so all terminals line up.  This is not quite right.  

Original comment by shawnlaffan on 31 Jan 2012 at 4:44

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r890.

Now correctly plotting non-ultrametric trees.  
Probably need to test a non-ultrametric with reversals to be complete, but how 
many such trees exist?  

Original comment by shawnlaffan on 31 Jan 2012 at 8:20

GoogleCodeExporter commented 9 years ago
More details on how to use:

It looks like ESRI has a bug where it converts the Element field from type long 
to double when converting the csv file to a feature class (shapefile).  

To handle that, export the csv file into a geodatabase and use that table in 
the conversion process. 

Original comment by shawnlaffan on 16 Feb 2012 at 10:48

GoogleCodeExporter commented 9 years ago
See also commit r899, where the ratio is corrected.  It should have been 
committed by itself...

Original comment by shawnlaffan on 21 Feb 2012 at 3:58

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r909.

Now supports plotting left to right.  

Original comment by shawnlaffan on 23 Apr 2012 at 11:38

GoogleCodeExporter commented 9 years ago
Update version milestone.  
Marked as fixed.

Original comment by shawnlaffan on 3 Jun 2012 at 3:30