Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add run-time and compile-time projections/transformations parameters. #496
With this PR transformations' parameters can be expressed in following ways:
This PR also changes the way of processing parameters in general. In the original code some parameters like
Replacing string-based parameters with run-time parameters speeds up the creation another 5x. So WRT the previous implementation (string-based always modifying parameters by expanding them and adding defaults) the speedup is 10x.
Replacing run-time parameters with compile-time parameters speeds up the creation another 2x, so WRT the original 20x.
Furthermore it's still possible to initialize transformations passing SRID codes (EPSG, ESRI, IAU2000), but now newly introduced, non-string-based parameters are used for this which means the initialization is faster. Before Proj4 strings were used for this.
I also improved const-corectness of the code, e.g. the input coordinates of projections are not modified so projections does not rely on the internal caller to work properly. This was affecting combined projections (projection calling another projection).
@mloskot Now it's fully manual. I guess it could be partially automated but it'd rely on consistency of Proj4 and the automation code would have to be re-written because both Proj4 and Boost.Geometry was changed since it was last used. I don't consider it worth it because it was used only for projections (code in