9 #include "../src/ossimPdalFileReader.h" 10 #include "../src/ossimRialtoReader.h" 17 #include <pdal/pdal.hpp> 18 #include <pdal/util/Bounds.hpp> 19 #include <pdal/LasWriter.hpp> 20 #include <pdal/FauxReader.hpp> 22 #define TEST_READER false 28 cout <<
"\nUsage: "<<app_name<<
" <pdal|rialto|genlas> [filename]\n" << endl;
50 outfile +=
"-OUTPUT.tif";
52 if (tif_writer.
valid())
58 cout <<
"Output written to <"<<outfile<<
">"<<endl;
65 cout <<
"Testing rialto with <"<<fname<<
">"<<endl;
72 cout <<
"bounds = "<<bounds<<endl;
75 reader->
getBlock(bounds, pointBlock);
85 cout <<
"Testing pdal with <"<<fname<<
">"<<endl;
92 cout <<
"bounds = "<<bounds<<endl;
101 cout <<
"Generating file <"<<fname<<
">"<<endl;
105 BOX3D bbox(-0.001, -0.001, -100.0, 0.001, 0.001, 100.0);
106 roptions.add(
"bounds", bbox);
107 roptions.add(
"num_points", 11);
108 roptions.add(
"mode",
"ramp");
109 reader.setOptions(roptions);
113 woptions.add(
"filename", fname.
string());
114 woptions.add(
"a_srs",
"EPSG:4326");
115 woptions.add(
"scale_x", 0.0000001);
116 woptions.add(
"scale_y", 0.0000001);
117 writer.setOptions(woptions);
118 writer.setInput(reader);
121 writer.prepare(wtable);
122 writer.execute(wtable);
127 int main(
int argc,
char** argv)
135 return usage(argv[0]);
143 if (test_name.
downcase() ==
"rialto")
146 fname =
"autzen.gpkg";
149 else if (test_name.
downcase() ==
"pdal")
152 fname =
"autzen.las";
155 else if (test_name.
downcase() ==
"genlas")
162 return usage(argv[0]);
int usage(char *app_name)
Class used for rendering point cloud data into a raster tile.
static ossimString toString(bool aValue)
Numeric to string methods.
bool setPointCloudHandler(ossimPointCloudHandler *pch)
Permits backdoor for setting the input point cloud handler object.
virtual bool open(const ossimFilename &fname)
Accepts filename of Rialto database file.
virtual void getBounds(ossimGrect &bounds) const
void getGSD(ossimDpt &gsd, ossim_uint32 resLevel) const
Get the GSD for resLevel.
bool writeRaster(ossimPdalReader *reader, const char *test)
virtual bool open(const ossimFilename &fname)
Accepts the name of a point cloud file.
bool test_rialto(const ossimFilename &fname)
virtual void setGeotiffFlag(bool flag)
int main(int argc, char **argv)
unsigned int ossim_uint32
bool genlas(const ossimFilename &fname)
static ossimString downcase(const ossimString &aString)
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
bool setCurrentEntry(ossim_uint32 entryIdx) override
void setProperty(ossimRefPtr< ossimProperty > property) override
The reader properties are: – the GSD ("meters_per_pixel") which overrides computed nominal GSD – th...
virtual void setFilename(const ossimFilename &file)
bool test_pdal(const ossimFilename &fname)
static const char * METERS_PER_PIXEL_KW
virtual void getBlock(const ossimGrect &bounds, ossimPointBlock &block) const
Fetches the block of points inside the block bounds.
virtual bool execute()
Calls: writeFile() writeMetaDataFiles()
const std::string & string() const