-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXY2Cluster.cpp
More file actions
27 lines (25 loc) · 1 KB
/
XY2Cluster.cpp
File metadata and controls
27 lines (25 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "smattpl.h"
#include "RWFile.h"
int main(int argc, char * argv[])
{
if( argc<7 )
{
cerr << "Usage: XY2Cluster input output xsize ysize localScale readOption outOption" << endl;
cerr << " readOption 0: Reads only positions, format X Y" << endl;
cerr << " 1: Reads positions and a species, Format X Y Species" << endl;
cerr << " 2: Reads positions,species, and a value that may be basal area (not used)" << endl << endl;
cerr << " outOption 0: count the abundance in each site an puts the most abundant " << endl;
cerr << " anyNumber: outputs the species anyNumber " << endl << endl;
exit(1);
}
float xsize=atof(argv[3]);
float ysize=atof(argv[4]);
float localScale=atof(argv[5]);
int option = atoi(argv[6]);
int outOption = atoi(argv[7]);
simplmat<float> data;
RWFile file;
file.ClusterizeXY(argv[1], xsize,ysize,localScale, data,option,outOption);
file.WriteSeed(argv[2],data,"SP"); // data type SP species number 1
return(0);
}