Skip to content

Commit

Permalink
Merge commit 'ce146657651cc320ca02f6a8d51c4ac00b5f4daa'
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyzlj committed Jan 23, 2019
2 parents fdff576 + ce14665 commit 838497a
Show file tree
Hide file tree
Showing 58 changed files with 103 additions and 71 deletions.
4 changes: 3 additions & 1 deletion autofuzslppos/taudem_ext/src/CatchHydroGeo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ email: dtarb@usu.edu
#include "linearpart.h"
#include "createpart.h"
#include "tiffIO.h"
using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

using std::unordered_map;

int readline(FILE *fp, char *fline)
{
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/CatchOutlets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ email: dtarb@usu.edu
//#include "shapelib/shapefil.h"
#include "CatchOutlets.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
OGRSFDriverH driver;
//OGRDataSourceH hDSsh, hDSshmoved;
//OGRLayerH hLayersh, hLayershmoved;
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/ConnectDown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ email: dtarb@usu.edu
//#include "shapelib/shapefil.h"
#include "ConnectDown.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

OGRSFDriverH driver;
OGRDataSourceH hDSsh, hDSshmoved;
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/D8HDistToStrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int distgrid(char *pfile, char *srcfile, char *distfile, int thresh) {
MPI_Init(NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/D8flowpathextremeup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int d8flowpathextremeup(char *pfile,
char *safile,
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/DinfAvalanche.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19


// The old program was written in column major order.
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/DinfConcLimAccum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19


// The old program was written in column major order.
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/DinfDistDown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "DinfDistDown.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19


// The old program was written in column major order.
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/DinfDistUp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ email: dtarb@usu.edu
#include "DinfDistUp.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19


// The old program was written in column major order.
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/DinfRevAccum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int dsaccum(char *angfile, char *wgfile, char *raccfile, char *dmaxfile) {

Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/DinfTransLimAccum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19


// The old program was written in column major order.
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/DinfUpDependence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int depgrd(char *angfile, char *dgfile, char *depfile) {

Expand Down
3 changes: 2 additions & 1 deletion autofuzslppos/taudem_ext/src/DropAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "DropAnalysis.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
using std::setprecision;

//returns true iff cell at [nrow][ncol] points to cell at [row][col]
bool pointsToMe(long col, long row, long ncol, long nrow, tdpartition *dirData){
Expand Down
3 changes: 2 additions & 1 deletion autofuzslppos/taudem_ext/src/EditRaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"
#include <stack>
using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
using std::stack;

/*********************************************************************/
int readline(FILE* fp, char* fline) {
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/LengthArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int lengtharea(char *plenfile, char *ad8file, char *ssfile, float *p) {
MPI_Init(NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/MoveOutletsToStrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ email: dtarb@usu.edu
//#include "shapelib/shapefil.h"
#include "MoveOutletsToStrm.h"
#
using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
OGRSFDriverH driver;
OGRDataSourceH hDSsh, hDSshmoved;
OGRLayerH hLayersh, hLayershmoved;
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/PeukerDouglas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "ctime"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int peukerdouglas(char *felfile, char *ssfile, float *p) {
MPI_Init(NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/RetlimFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ email: dtarb@usu.edu
#include "initneighbor.h"
#include <stdio.h>
#include "retlimro.h"
using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int retlimro(char *angfile, char *wgfile, char * rcfile, char *qrlfile)
{
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/SetRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"
#include <stack>
using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

/*********************************************************************/
int readline(FILE *fp, char *fline)
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/SlopeArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int slopearea(char *slopefile, char *scafile, char *safile, float *p) {
MPI_Init(NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/SlopeAreaRatio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int atanbgrid(char *slopefile, char *areafile, char *atanbfile) {
MPI_Init(NULL, NULL);
Expand Down
3 changes: 2 additions & 1 deletion autofuzslppos/taudem_ext/src/SlopeAveDown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
using std::min;

//float dist[9];
float **dist;
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/TWI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int twigrid(char *slopefile, char *areafile, char *twifile) {
MPI_Init(NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/Threshold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int threshold(char *ssafile, char *srcfile, char *maskfile, float thresh, int usemask) {
MPI_Init(NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/aread8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ email: dtarb@usu.edu
#include <iostream>
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int aread8(char *pfile,
char *afile,
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/areadinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int area(char *angfile,
char *scafile,
Expand Down
11 changes: 11 additions & 0 deletions autofuzslppos/taudem_ext/src/commonLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,21 @@ email: dtarb@usu.edu
#include <sys/time.h>
#include <fcntl.h>
#endif /* windows */

#define MCW MPI_COMM_WORLD
#define MAX_STRING_LENGTH 255
#define MAXLN 4096

using std::cout;
using std::endl;
using std::nothrow;

using std::queue;
using std::vector;

using std::ifstream;
using std::ios;

//TODO: revisit these to see if they are used/needed
//#define ABOVE 1
//#define BELOW 2
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/d8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ email: dtarb@usu.edu
//#include "tiffIO.h" Part of Commonlib
#include "Node.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

double **fact;

Expand Down
3 changes: 2 additions & 1 deletion autofuzslppos/taudem_ext/src/dinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ email: dtarb@usu.edu
#include <math.h>
#include "Node.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
using std::max;

//double fact[9];
double **fact;
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/dinfdecayaccum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19


// The old program was written in column major order.
Expand Down
3 changes: 2 additions & 1 deletion autofuzslppos/taudem_ext/src/flood.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include <stack>

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
using std::stack;

int flood(char *demfile, char *felfile, char *sfdrfile, int usesfdr, bool verbose,
bool is_4Point, bool use_mask, char *maskfile) // these three added by arb, 5/31/11
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/flowdircond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "initneighbor.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int flowdircond(char* pfile, char* zfile, char* zfdcfile) {

Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/gagewatershed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ email: dtarb@usu.edu
#include "tiffIO.h"
#include "ogrsf_frmts.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int gagewatershed(char *pfile,
char *wfile,
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/gridnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ email: dtarb@usu.edu
#include "createpart.h"
#include "tiffIO.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

int gridnet(char *pfile, char *plenfile, char *tlenfile, char *gordfile, char *maskfile,
char *datasrc, char *lyrname, int uselyrname, int lyrno, int useMask, int useOutlets, int thresh) {//1
Expand Down
3 changes: 2 additions & 1 deletion autofuzslppos/taudem_ext/src/linearpart.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ email: dtarb@usu.edu

#ifndef LINEARPART_H
#define LINEARPART_H
using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
using std::bad_alloc;

template<class datatype>
class linearpart : public tdpartition {
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/linklib.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ email: dtarb@usu.edu
//#include "shapelib/shapefil.h"
//#ifndef LINKLIB_H
//#define LINKLIB_H
using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

long LAST_ID = -1;

Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/ogrtest.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ogr_api.h"
#include "commonLib.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
int readwriteogr(char *datasrc, char *layername, char *datasrcnew, char *layernamenew) {

OGRSFDriverH hDriver, hDriver1;
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/ogrtestmn.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ogr_api.h"
#include "commonLib.h"

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19
int readwriteogr(char *datasrc, char *layername, char *datasrcnew, char *layernamenew);
int main(int argc, char **argv) {
char datasrc[MAXLN], layername[MAXLN], datasrcnew[MAXLN], layernamenew[MAXLN];
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/streamnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ email: dtarb@usu.edu
#include "ogr_api.h"
#include <limits>

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

OGRSFDriverH driver;
OGRDataSourceH hDS1;
Expand Down
2 changes: 1 addition & 1 deletion autofuzslppos/taudem_ext/src/tiffIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ email: dtarb@usu.edu
//#include "commonLib.h" //Part of tiffIO.h
#include <iostream>

using namespace std;
// using namespace std; // Avoid to using the entire namespace of std. Comment by Liangjun, 01/23/19

tiffIO::tiffIO(char *fname, DATA_TYPE newtype) {
MPI_Status status;
Expand Down
Loading

0 comments on commit 838497a

Please sign in to comment.