79 cs.
m_left = {{0, 15}, {5, 15}, {6, 14}};
85 io.
m_cs.push_back(cs);
86 io.
m_cs.push_back(cs);
89 const int numPixelsX = 41, numPixelsY = 11;
90 const double pixelSize = 1.0;
91 const xms::Pt3d minPt(-20.0, 0.0);
92 const std::vector<double> rasterVals(numPixelsX * numPixelsY, 5);
102 std::string rasterFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testFillEmbankment_out.asc"));
103 std::string baseFile(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testFillEmbankment_base.asc"));
109 xms::VecPt3d basePts = {{0, 0, 15}, {0, 10, 15}, {-5, 0, 15}, {-20, 0, 0}, {-5, 10, 15},
110 {-20, 10, 0}, {5, 0, 15}, {20, 0, 0}, {5, 10, 15}, {20, 10, 0}};
114 xms::VecInt baseLines = {0, 1};
116 baseLines = {3, 2, 0, 6, 7};
118 baseLines = {5, 4, 1, 8, 9};
129 std::string tinFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testFillEmbankmentTin_out.tin"));
130 std::ofstream ofs(tinFileName, std::ofstream::trunc);
153 cs.
m_left = {{0, 0}, {5, 0}, {6, 1}};
159 io.
m_cs.push_back(cs);
160 io.
m_cs.push_back(cs);
163 const int numPixelsX = 41, numPixelsY = 11;
164 const double pixelSize = 1.0;
165 const xms::Pt3d minPt(-20.0, 0.0);
166 const std::vector<double> rasterVals(numPixelsX * numPixelsY, 5);
176 std::string rasterFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testCutEmbankment_out.asc"));
177 std::string baseFile(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testCutEmbankment_base.asc"));
183 xms::VecPt3d basePts = {{0, 0, 0}, {0, 10, 0}, {-5, 0, 0}, {-20, 0, 15}, {-5, 10, 0},
184 {-20, 10, 15}, {5, 0, 0}, {20, 0, 15}, {5, 10, 0}, {20, 10, 15}};
188 xms::VecInt baseLines = {0, 1};
190 baseLines = {3, 2, 0, 6, 7};
192 baseLines = {5, 4, 1, 8, 9};
203 std::string tinFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testCutEmbankmentTin_out.tin"));
204 std::ofstream ofs(tinFileName, std::ofstream::trunc);
227 cs.
m_left = {{0, 15}, {5, 15}, {6, 14}};
233 io.
m_cs.push_back(cs);
234 io.
m_cs.push_back(cs);
247 const int numPixelsX = 46, numPixelsY = 45;
248 const double pixelSize = 1.0;
249 const xms::Pt3d minPt(-16.0, -8.0);
250 const std::vector<double> rasterVals(numPixelsX * numPixelsY,
XM_NODATA);
260 std::string rasterFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testWingWall_out.asc"));
261 std::string baseFile(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testWingWall_base.asc"));
267 xms::VecPt3d basePts = {{0, 0, 15}, {20, 20, 15}, {-4.5, 2.6, 15}, {-15.1, 13.2, 0},
268 {17.4, 24.5, 15}, {7.7, 36, 0}, {4.5, -2.6, 15}, {21.2, -7.1, 0},
269 {22.6, 15.5, 15}, {28.2, 0, 0}};
273 xms::VecInt baseLines = {0, 1};
275 baseLines = {3, 2, 0, 6, 7};
277 baseLines = {5, 4, 1, 8, 9};
288 std::string tinFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testWingWallTin_out.tin"));
289 std::ofstream ofs(tinFileName, std::ofstream::trunc);
313 cs.
m_left = {{0, 15}, {5, 15}, {6, 14}};
319 io.
m_cs.push_back(cs);
320 io.
m_cs.push_back(cs);
335 const int numPixelsX = 56, numPixelsY = 53;
336 const double pixelSize = 1.0;
337 const xms::Pt3d minPt(-17.0, -17.0);
338 const std::vector<double> rasterVals(numPixelsX * numPixelsY,
XM_NODATA);
348 std::string rasterFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testSlopedAbutment_out.asc"));
349 std::string baseFile(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testSlopedAbutment_base.asc"));
355 xms::VecPt3d basePts = {
356 {0, 0, 15}, {20, 20, 15}, {-3.5, 3.5, 15}, {-14.1, 14.1, 0},
357 {15.2, 22.2, 15}, {4.6, 32.9, 0}, {3.5, -3.5, 15}, {14.1, -14.1, 0},
358 {24.8, 17.8, 15}, {35.4, 7.1, 0}, {-10.6, -3.5, 5}, {-12.9, -1.9, 4.2},
359 {-14.8, 0.5, 3.3}, {-16, 3.5, 2.5}, {-16.4, 7, 1.7}, {-15.8, 10.6, 0.8},
360 {-3.5, -10.6, 5.0}, {-1.9, -12.9, 4.2}, {0.5, -14.8, 3.3}, {3.5, -16.0, 2.5},
361 {7.0, -16.4, 1.7}, {10.6, -15.8, 0.8}, {19.4, 31.3, 5}, {16.6, 33.4, 3.8},
362 {13, 34.6, 2.5}, {8.8, 34.4, 1.3}, {29, 26.8, 5}, {31.8, 25.9, 4.3},
363 {34.3, 24.1, 3.6}, {36.4, 21.5, 2.9}, {37.7, 18.2, 2.1}, {38, 14.6, 1.4},
367 std::string tinFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testSlopedAbutmentTin_out.tin"));
368 std::ofstream ofs(tinFileName, std::ofstream::trunc);
392 cs.
m_left = {{0, 15}, {5, 15}, {6, 14}};
398 io.
m_cs.push_back(cs);
399 io.
m_cs.push_back(cs);
416 const int numPixelsX = 90, numPixelsY = 81;
417 const double pixelSize = 1.0;
418 const xms::Pt3d minPt(-21.0, -12.0);
419 const std::vector<double> rasterVals(numPixelsX * numPixelsY,
XM_NODATA);
429 std::string rasterFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testGuidebank_out.asc"));
430 std::string baseFile(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testGuidebank_base.asc"));
436 TS_ASSERT_EQUALS(144, io.
m_outTin->Points().size());
438 std::string tinFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testGuidebankTin_out.tin"));
439 std::ofstream ofs(tinFileName, std::ofstream::trunc);
462 cs.
m_left = {{0, 15}, {5, 15}, {6, 14}};
468 io.
m_cs.push_back(cs);
469 io.
m_cs.push_back(cs);
473 BSHP<xms::VecPt3d> tPts(
new xms::VecPt3d());
474 *tPts = {{-1, 25, 6}, {-15, 11, 6}, {5, -11, 10}, {20, 4, 10}};
475 BSHP<xms::VecInt> tTris(
new xms::VecInt());
476 *tTris = {0, 1, 2, 1, 3, 2};
477 tin->SetPoints(tPts);
478 tin->SetTriangles(tTris);
483 const int numPixelsX = 29, numPixelsY = 34;
484 const double pixelSize = 1.0;
485 const xms::Pt3d minPt(-10.0, -8.0);
486 const std::vector<double> rasterVals(numPixelsX * numPixelsY,
XM_NODATA);
496 std::string rasterFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testIntersectBathymetry_out.asc"));
497 std::string baseFile(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testIntersectBathymetry_base.asc"));
503 xms::VecPt3d basePts = {{0, 0, 15}, {10, 10, 15}, {-3.54, 3.54, 15},
504 {-9.42, 9.42, 6.68}, {6.46, 13.54, 15}, {-4.14, 24.14, 0},
505 {3.54, -3.54, 15}, {7.18, -7.18, 9.84}, {13.54, 6.46, 15},
506 {17.18, 2.82, 9.84}};
509 std::string tinFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/testIntersectBathymetryTin_out.tin"));
510 std::ofstream ofs(tinFileName, std::ofstream::trunc);
527 {1001673.2, 14390623.5, 336.0 },
528 {1001629.780754384200000, 14390618.277580569000000, 336.000000000000000},
529 {1001589.675662567800000, 14390613.453783935000000, 336.000000000000000},
530 {1001552.631758032300000, 14390608.998183563000000, 336.000000000000000},
531 {1001518.415382976300000, 14390604.882675350000000, 336.000000000000000},
532 {1001486.810714498500000, 14390601.081300350000000, 336.000000000000000},
533 {1001457.618403274400000, 14390597.570081044000000, 336.000000000000000},
534 {1001430.654316142900000, 14390594.326870101000000, 336.000000000000000},
535 {1001405.748374668900000, 14390591.331210665000000, 336.000000000000000},
536 {1001382.743482358400000, 14390588.564207349000000, 336.000000000000000},
537 {1001361.494533758600000, 14390586.008407025000000, 336.000000000000000},
538 {1001341.867499191000000, 14390583.647688746000000, 336.000000000000000},
539 {1001323.738579348000000, 14390581.467162071000000, 336.000000000000000},
540 {1001306.993424416500000, 14390579.453073129000000, 336.000000000000000},
541 {1001291.526412807400000, 14390577.592717867000000, 336.000000000000000},
542 {1001277.239984936200000, 14390575.874361930000000, 336.000000000000000},
543 {1001264.044027858300000, 14390574.287166627000000, 336.000000000000000},
544 {1001251.855306872700000, 14390572.821120583000000, 336.000000000000000},
545 {1001240.596940512100000, 14390571.466976576000000, 336.000000000000000},
546 {1001230.197915605000000, 14390570.216193220000000, 336.000000000000000},
547 {1001220.592639355300000, 14390569.060881084000000, 336.000000000000000},
548 {1001211.720525608300000, 14390567.993752934000000, 336.000000000000000},
549 {1001203.525612698400000, 14390567.008077763000000, 336.000000000000000},
550 {1001195.956210466300000, 14390566.097638329000000, 336.000000000000000},
551 {1001188.964574218400000, 14390565.256691961000000, 336.000000000000000},
552 {1001182.506603571900000, 14390564.479934305000000, 336.000000000000000},
553 {1001176.541564289400000, 14390563.762465896000000, 336.000000000000000},
554 {1001171.031831342000000, 14390563.099761236000000, 336.000000000000000},
555 {1001165.942651587700000, 14390562.487640254000000, 336.000000000000000},
556 {1001161.241924561600000, 14390561.922241943000000, 336.000000000000000},
557 {1001156.9, 14390561.4, 336.0 }
564 cs.
m_left = { { 0, 332 },{ 12.5, 332},{ 13.5, 331 } };
584 std::string rasterFileName(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/dpipe_base.asc"));
585 std::ifstream ifs(rasterFileName.c_str(), std::ifstream::in);
596 std::string baseFile(XMS_TEST_PATH + std::string(
"stamping/rasterTestFiles/garbageOutput.asc"));
static BSHP< XmStamper > New()
Creates a XmStamper class.
BSHP< TrTin > m_bathymetry
underlying bathymetry
VecPt3d m_left
left side of the cross section
void test_StampCutEmbankment()
Tests stamping a simple cut embankment.
int m_idxRightShoulder
index to the shoulder point in the m_right vector
void test_StampIntersectBathymetry()
Tests stamping a simple fill embankment bathymetry cut off.
VecInt2d m_outBreakLines
break lines that are honored in the TIN
double m_radius2
second radius (R2) for guidebank creation
XmStamperEndCap m_firstEndCap
end cap at beginnig of polyline
double m_leftMax
max x value for left side
bool ReadFromFile(std::ifstream &a_file)
Reads the XmStampRaster class information to a file.
void test_StampWingWall()
Tests stamping a simple fill embankment with a wing wall end cap.
XmStampRaster m_raster
Input/output raster to stamp the resulting elevations onto this raster.
double m_maxX
max distance from center line
XmStamperEndCap m_lastEndCap
end cap at end of polyline
void WriteGridFile(const std::string &a_fileName, const XmRasterFormatEnum a_format)
Writes the raster in the given format to the given filename.
static BSHP< TrTin > New()
int m_side
position of guidebank relative to center line, 0-left, 1-right
XmWingWall m_wingWall
wing wall definition
XmGuidebank m_guidebank
guidebank definition
double m_wingWallAngle
degrees from 0 to 60
double m_rightMax
max x value for right side
void test_RealDataStamping()
[snip_testStampIntersectBathymetry]
VecPt3d m_right
right side of the cross section
int m_type
type of end cap: 0- guidebank, 1- sloped abutment, 2- wing wall
Stamping inputs/outputs class.
int m_nPts
number of points created along the center line to create the guidebank
Cross section definition for stamping.
void test_StampGuidebank()
Tests stamping a simple fill embankment with guidebank end cap.
std::vector< XmStampCrossSection > m_cs
cross sections along the polyLine
double m_angle
degrees from -45 to 45
void test_StampSlopedAbutment()
Tests stamping a simple fill embankment with sloped abutment end cap.
Raster defined using a non-rotated cartesian axis for use in XmStamper.
VecPt3d m_slope
x,y pairs defining slope from center line
void test_StampFillEmbankment()
Tests stamping a simple fill embankment.
double m_width
width of guidebank about the center line
int m_stampingType
Stamping type 0 - Cut, 1 - Fill, 2 - Both.
XmSlopedAbutment m_slopedAbutment
sloped abutment definition
double m_radius1
first radius (R1) for guidebank creation