MCPcopy Create free account
hub / github.com/PDAL/PDAL / addArgs

Method addArgs

io/LasWriter.cpp:123–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121
122
123void LasWriter::addArgs(ProgramArgs& args)
124{
125 std::time_t now;
126 std::time(&now);
127
128 uint16_t year = 1900;
129 uint16_t doy = 1;
130 std::tm *ptm = std::gmtime(&now);
131 if (ptm)
132 {
133 year += ptm->tm_year;
134 doy += ptm->tm_yday;
135 }
136
137 args.add("a_srs", "Spatial reference to use to write output", d->opts.aSrs);
138 args.add("compression", "Use LAZ compression when writing file", d->opts.compression,
139 las::Compression::False);
140 args.add("discard_high_return_numbers", "Discard points with out-of-spec "
141 "return numbers.", d->opts.discardHighReturnNumbers);
142 args.add("extra_dims", "List of dimension names to write in addition to those of the "
143 "point format or 'all' for all available dimensions", d->opts.extraDimSpec);
144 args.add("forward", "Dimensions to forward from LAS reader", d->opts.forwardSpec);
145
146 args.add("filesource_id", "File source ID number.", d->opts.filesourceId,
147 decltype(d->opts.filesourceId)(0));
148 args.add("major_version", "LAS major version", d->opts.majorVersion,
149 decltype(d->opts.majorVersion)(1));
150 args.add("minor_version", "LAS minor version", d->opts.minorVersion,
151 decltype(d->opts.minorVersion)(4));
152 args.add("dataformat_id", "Point format", d->opts.dataformatId,
153 decltype(d->opts.dataformatId)(7));
154 args.add("format", "Point format", d->opts.dataformatId,
155 decltype(d->opts.dataformatId)(7));
156 args.add("global_encoding", "Global encoding byte", d->opts.globalEncoding,
157 decltype(d->opts.globalEncoding)(0));
158 args.add("project_id", "Project ID", d->opts.projectId);
159 args.add("system_id", "System ID", d->opts.systemId,
160 decltype(d->opts.systemId)(d->header.systemId));
161 args.add("software_id", "Software ID", d->opts.softwareId,
162 decltype(d->opts.softwareId)(las::generateSoftwareId()));
163 args.add("creation_doy", "Creation day of year", d->opts.creationDoy,
164 decltype(d->opts.creationDoy)(doy));
165 args.add("creation_year", "Creation year", d->opts.creationYear,
166 decltype(d->opts.creationYear)(year));
167 args.add("pdal_metadata", "Write PDAL metadata as VLR?", d->opts.writePDALMetadata,
168 decltype(d->opts.writePDALMetadata)(false));
169 args.add("scale_x", "X scale factor", d->opts.scaleX, decltype(d->opts.scaleX)(".01"));
170 args.add("scale_y", "Y scale factor", d->opts.scaleY, decltype(d->opts.scaleY)(".01"));
171 args.add("scale_z", "Z scale factor", d->opts.scaleZ, decltype(d->opts.scaleZ)(".01"));
172 args.add("offset_x", "X offset", d->opts.offsetX);
173 args.add("offset_y", "Y offset", d->opts.offsetY);
174 args.add("offset_z", "Z offset", d->opts.offsetZ);
175 args.add("vlrs", "List of VLRs to set", d->opts.userVlrs);
176 args.add("enhanced_srs_vlrs", "Write WKT2 and PROJJSON as VLR?", d->opts.enhancedSrsVlrs,
177 decltype(d->opts.enhancedSrsVlrs)(false));
178}
179
180void LasWriter::initialize()

Callers

nothing calls this directly

Calls 2

generateSoftwareIdFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected