MCPcopy Create free account
hub / github.com/LAStools/LAStools / get_format

Method get_format

LASlib/src/laswriter.cpp:1166–1208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1164}
1165
1166I32 LASwriteOpener::get_format() const
1167{
1168 if (specified || (file_name == 0))
1169 {
1170 return format;
1171 }
1172 else
1173 {
1174 if (HasFileExt(std::string(file_name), ".laz")) {
1175 return LAS_TOOLS_FORMAT_LAZ;
1176 } else if (HasFileExt(std::string(file_name), ".las"))
1177 {
1178 return LAS_TOOLS_FORMAT_LAS;
1179 } else if (HasFileExt(std::string(file_name), ".bin")) // terrasolid
1180 {
1181 return LAS_TOOLS_FORMAT_BIN;
1182 }
1183 else if (HasFileExt(std::string(file_name), ".qi")) // QFIT
1184 {
1185 return LAS_TOOLS_FORMAT_QFIT;
1186 }
1187 else if (HasFileExt(std::string(file_name), ".wrl")) // VRML
1188 {
1189 return LAS_TOOLS_FORMAT_VRML;
1190 }
1191 else if (HasFileExt(std::string(file_name), ".json")) // json
1192 {
1193 return LAS_TOOLS_FORMAT_JSON;
1194 }
1195 else if (HasFileExt(std::string(file_name), ".xml")) // xml
1196 {
1197 return LAS_TOOLS_FORMAT_XML;
1198 }
1199 else if (HasFileExt(std::string(file_name), ".csv")) // csv
1200 {
1201 return LAS_TOOLS_FORMAT_CSV;
1202 }
1203 else // assume ascii output
1204 {
1205 return LAS_TOOLS_FORMAT_TXT;
1206 }
1207 }
1208}
1209
1210void LASwriteOpener::set_parse_string(const CHAR* parse_string)
1211{

Callers 4

open_report_outputFunction · 0.45
mainFunction · 0.45
runMethod · 0.45
mainFunction · 0.45

Calls 2

HasFileExtFunction · 0.85
stringFunction · 0.85

Tested by

no test coverage detected