Skip to content
This repository
Browse code

set values on header directly in preparation for removing public meth…

…ods of driver.las.Writer that deal with the header in favor of giving user the ability to manipulate the header directly themselves
  • Loading branch information...
commit a5dc0509dfe0b19372f3770ff9fbd91320bc3016 1 parent 93e6a35
Howard Butler authored

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 src/drivers/las/Writer.cpp
12 src/drivers/las/Writer.cpp
@@ -70,17 +70,17 @@ Writer::Writer(Stage& prevStage, const Options& options)
70 70 void Writer::setOptions()
71 71 {
72 72 setGeneratingSoftware(getOptions().getValueOrDefault<std::string>("software_id", LasHeader::SoftwareIdentifier));
73   - setDate((boost::uint16_t)getOptions().getValueOrDefault<boost::uint32_t>("year", 0),
74   - (boost::uint16_t)getOptions().getValueOrDefault<boost::uint32_t>("day_of_year", 0));
75   - setPointFormat(static_cast<PointFormat>(getOptions().getValueOrDefault<boost::uint32_t>("format", 3)));
76   - setSystemIdentifier(getOptions().getValueOrDefault<std::string>("system_id", LasHeader::SystemIdentifier));
  73 + m_lasHeader.SetCreationDOY((boost::uint16_t)getOptions().getValueOrDefault<boost::uint32_t>("day_of_year", 0));
  74 + m_lasHeader.SetCreationYear((boost::uint16_t)getOptions().getValueOrDefault<boost::uint32_t>("year", 0));
  75 + m_lasHeader.setPointFormat(static_cast<PointFormat>(getOptions().getValueOrDefault<boost::uint32_t>("format", 3)));
  76 + m_lasHeader.SetSystemId(getOptions().getValueOrDefault<std::string>("system_id", LasHeader::SystemIdentifier));
77 77
78   - setHeaderPadding(getOptions().getValueOrDefault<boost::uint32_t>("header_padding", 0));
  78 + m_lasHeader.SetHeaderPadding(getOptions().getValueOrDefault<boost::uint32_t>("header_padding", 0));
79 79 if (getOptions().hasOption("a_srs"))
80 80 {
81 81 setSpatialReference(getOptions().getValueOrDefault<std::string>("a_srs",""));
82 82 }
83   - setCompressed(getOptions().getValueOrDefault("compression", false));
  83 + m_lasHeader.SetCompressed(getOptions().getValueOrDefault("compression", false));
84 84 m_lasHeader.SetFileSourceId(getOptions().getValueOrDefault<boost::uint16_t>("filesourceid", 0));
85 85 try
86 86 {

0 comments on commit a5dc050

Please sign in to comment.
Something went wrong with that request. Please try again.