| 150 | |
| 151 | |
| 152 | void Ilvis2Reader::readPoint(PointRef& point, StringList s, |
| 153 | std::string pointMap) |
| 154 | { |
| 155 | point.setField(pdal::Dimension::Id::LvisLfid, |
| 156 | convert<unsigned>(s, "LVIS_LFID", 0)); |
| 157 | point.setField(pdal::Dimension::Id::ShotNumber, |
| 158 | convert<unsigned>(s, "SHOTNUMBER", 1)); |
| 159 | point.setField(pdal::Dimension::Id::GpsTime, |
| 160 | convert<double>(s, "GPSTIME", 2)); |
| 161 | point.setField(pdal::Dimension::Id::LongitudeCentroid, |
| 162 | Utils::normalizeLongitude(convert<double>(s, "LONGITUDE_CENTROID", 3))); |
| 163 | point.setField(pdal::Dimension::Id::LatitudeCentroid, |
| 164 | convert<double>(s, "LATITUDE_CENTROID", 4)); |
| 165 | point.setField(pdal::Dimension::Id::ElevationCentroid, |
| 166 | convert<double>(s, "ELEVATION_CENTROID", 5)); |
| 167 | point.setField(pdal::Dimension::Id::LongitudeLow, |
| 168 | Utils::normalizeLongitude(convert<double>(s, "LONGITUDE_LOW", 6))); |
| 169 | point.setField(pdal::Dimension::Id::LatitudeLow, |
| 170 | convert<double>(s, "LATITUDE_LOW", 7)); |
| 171 | point.setField(pdal::Dimension::Id::ElevationLow, |
| 172 | convert<double>(s, "ELEVATION_LOW", 8)); |
| 173 | point.setField(pdal::Dimension::Id::LongitudeHigh, |
| 174 | Utils::normalizeLongitude(convert<double>(s, "LONGITUDE_HIGH", 9))); |
| 175 | point.setField(pdal::Dimension::Id::LatitudeHigh, |
| 176 | convert<double>(s, "LATITUDE_HIGH", 10)); |
| 177 | point.setField(pdal::Dimension::Id::ElevationHigh, |
| 178 | convert<double>(s, "ELEVATION_HIGH", 11)); |
| 179 | |
| 180 | double x, y, z; |
| 181 | pdal::Dimension::Id xd, yd, zd; |
| 182 | |
| 183 | xd = m_layout->findDim("LONGITUDE_" + pointMap); |
| 184 | yd = m_layout->findDim("LATITUDE_" + pointMap); |
| 185 | zd = m_layout->findDim("ELEVATION_" + pointMap); |
| 186 | |
| 187 | x = point.getFieldAs<double>(xd); |
| 188 | y = point.getFieldAs<double>(yd); |
| 189 | z = point.getFieldAs<double>(zd); |
| 190 | |
| 191 | point.setField(pdal::Dimension::Id::X, x); |
| 192 | point.setField(pdal::Dimension::Id::Y, y); |
| 193 | point.setField(pdal::Dimension::Id::Z, z); |
| 194 | } |
| 195 | |
| 196 | |
| 197 | void Ilvis2Reader::ready(PointTableRef table) |