Skip to content

Commit

Permalink
Move towgs84 in code element out of variant.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinko92 committed Nov 12, 2023
1 parent 95ca494 commit f4cafb3
Show file tree
Hide file tree
Showing 4 changed files with 5,835 additions and 23,315 deletions.
14 changes: 6 additions & 8 deletions include/boost/geometry/srs/projections/code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,18 @@ namespace detail
{
double a, b;
} s;
//nadgrids
struct
{
std::size_t size;
double data[7];
} towgs84;
//nadgrids,
//towgs84
};

int code;
std::int8_t parameter_count;
// Not bundling the following together into a struct to avoid 8-byte-alignment.
std::int16_t parameter_ids[MaxParams];
std::int8_t towgs84_size {0};
std::int8_t parameter_variant_tags[MaxParams];
std::int16_t parameter_ids[MaxParams];
parameter_variant parameters[MaxParams];
double towgs84_data[7];
};

template <std::size_t MaxParams>
Expand Down Expand Up @@ -115,7 +113,7 @@ namespace detail
else if (id == static_cast<int>(name_towgs84::towgs84)) //towgs84
{
out(p(name_towgs84::towgs84,
srs::detail::towgs84<double>(pv.towgs84.data, pv.towgs84.data + pv.towgs84.size)));
srs::detail::towgs84<double>(e.towgs84_data, e.towgs84_data + e.towgs84_size)));
}
// no occurence of axis in arr
else if (id == static_cast<int>(name_units::units)) //units
Expand Down
Loading

0 comments on commit f4cafb3

Please sign in to comment.