- Names were herited from proj4.
- Replace static variables with enums.
- Add more error codes and use them with projection_exception()
instead of magic numbers.
Relevant proj4 code was converted to C++ and Boostified. So all grids formats
are supported (ctable, ctable2, ntv1, ntv2), also vertical geoid grid GTX
format but it is not used right now. There are some differences though:
- proj4 stores loaded grids in global storage and pointers to a relevant subset
of grids in projection parameters structure. In Boost.Geometry this is moved
outside transformation structure to allow users to place global storage(s)
wherever they like.
- in proj4 the grids are loaded implicitly when there is +nadgrids parameter
passed. In Boost.Geometry an object representing a subset of grids explicitly
has to be initialized and then passed into transforming function.
- in proj4 grids has to be "installed" into certain directories. In
Boost.Geometry user can implement StreamPolicy opening any input stream
having unformatted input interface. The default one uses std::ifstream
opening files having the same names as the ones in +nadgrids parameter in
working directory.
Added classes:
srs::grids, srs::ifstream_policy, srs::grids_storage,
srs::projection_grids, srs::transformation_grids
and for multithreading:
srs::shared_grids
Added functions (also overloads)
srs::transformation::initialize_grids(grids_storage)
srs::transformation::forward(in, out, transformation_grids)
srs::transformation::inverse(in, out, transformation_grids)
Replace pj_param() taking type of parameter in a string with a set of
functions:
- pj_param_exist() - check if a parameter exists,
- pj_param_X() - check if a parameter exists and assign it to variable,
- pj_get_param_X() - return parameter if it exists or default value,
may be:
- s (returning std::string),
- i (int),
- f (floating point or user-defined numeric type),
- r (angle defined in DMS format as radians in FP or UD type),
- b (bool)
Use the above e.g. to avoid traversing parameters list twice per
parameter in some cases.
Add pj_mkparam() overload taking name and value as separate arguments to
avoid parsing of string in 'param=value' format.