Commit Graph

4562 Commits

Author SHA1 Message Date
Vissarion Fysikopoulos
9efcb83bb3 [algorithms] [tests] Move include for make.hpp to correct place 2018-07-06 16:08:01 +03:00
Vissarion Fysikopoulos
7072ef0212 [util] Use is_inverse utility to detect inverse boxes 2018-07-06 16:03:56 +03:00
Vissarion Fysikopoulos
38c77cf435 [algorithms] Avoid normalization for boxes created by make_inverse 2018-07-04 14:52:41 +03:00
Adam Wulkiewicz
097f6fdbe9 Merge pull request #482 from e-kwsm/include-cstring
[srs] Add missing cstring include.
2018-06-04 14:09:03 +02:00
Adam Wulkiewicz
e302cab9d9 [srs] Fix compilation errors in grids (c++98 requirement and shadowing of tparam). 2018-05-16 14:15:50 +02:00
Adam Wulkiewicz
450281a008 [srs] Fix shadowing of template parameters and wrong variable names. 2018-05-16 14:00:40 +02:00
E Kawashima
56f1cf8ede [srs] Add missing cstring include. 2018-05-14 15:32:19 +09:00
Adam Wulkiewicz
d5fe19ce06 Merge branch 'feature/projections_optimization' into develop 2018-05-10 18:08:31 +02:00
Adam Wulkiewicz
7622c517d6 Merge branch 'fix/projections_names' into develop 2018-05-10 18:05:55 +02:00
Adam Wulkiewicz
ca62c0e4e0 Merge pull request #469 from awulkiew/feature/projections_grids
Add support for horizontal grid shift (nadgrids) in transformation.
2018-05-10 18:02:40 +02:00
Adam Wulkiewicz
002f1e06d9 Merge pull request #468 from awulkiew/feature/projections_params
Improve projections' parameters handling.
2018-05-10 18:01:50 +02:00
Adam Wulkiewicz
9b8d0a3b4c [sectionalize] Avoid integer underflow/underflow in segment's direction calculation. 2018-04-19 23:34:24 +02:00
Adam Wulkiewicz
118b82937d [srs] Separate param names and values in datums definitions to avoid parsing of string while adding parameter. 2018-04-18 01:37:44 +02:00
Adam Wulkiewicz
548d64d97a [srs] In pj_ellps table hold elliptical parameter name and value separately to avoid parsing of string when adding a and b/rf parameters to parameters list. 2018-04-18 00:50:44 +02:00
Adam Wulkiewicz
ae75d05c2c [srs] Implement str_cast and use it instead of lexical_cast. 2018-04-18 00:33:47 +02:00
Adam Wulkiewicz
8feb7ca7ba [srs] Rename types, variables, enums to lowercase. 2018-04-13 22:30:51 +02:00
Adam Wulkiewicz
885319f2da [srs] Rename CalculationType to T to increase readability.
Furthermore:
- rename geographic_type and cartesian_type to T
- reformat base classes and ctor init lists
- rename variable named T
2018-04-13 22:01:45 +02:00
Adam Wulkiewicz
de14869fbc [srs] Rename upper-case global types and move them if possible.
- Types defined in projects.h: COMPLEX, PJ_ELLPS, PJ_DATUM, PJ_UNITS,
  PJ_PRIME_MERIDIANS.
- Move types used for global data, tables defining ellipsoids, datums,
  units and meridians to files defining the tables.
- Remove types that are not used in Boost.Geometry: DERIVS and FACTORS.
2018-04-13 19:15:34 +02:00
Adam Wulkiewicz
9f28e8d8aa [srs] Rename upper-case variable and type names. 2018-04-13 18:48:50 +02:00
Adam Wulkiewicz
4f86b6fb7e [srs] Rename macro-like variables datum type and error code.
- Names were herited from proj4.
- Replace static variables with enums.
- Add more error codes and use them with projection_exception()
  instead of magic numbers.
2018-04-12 23:46:46 +02:00
Adam Wulkiewicz
9b2bb48fae Merge branch 'develop' into fix/projections_names 2018-04-12 22:53:19 +02:00
Adam Wulkiewicz
06e53eb573 Merge branch 'develop' into fix/intersection_strategies 2018-04-12 16:20:16 +02:00
Adam Wulkiewicz
756f3951c7 [strategies] Fix zero ratio denominator calculated by sph and geo strategies. 2018-04-11 22:39:36 +02:00
Vissarion Fysikopoulos
cc381b3c7f [algorithms] [tests] Fix envelope algorithm for spherical and geographic polygons and rings 2018-04-11 17:12:27 +03:00
Adam Wulkiewicz
0a1ba2763a [srs] Rename projections' global constants.
Use lower-case names to avoid clashes with macros.
Move constants to separate file.
2018-04-09 04:03:29 +02:00
Adam Wulkiewicz
1aeef5d396 [srs] Support horizontal shift grids (nadgrids) in transformation.
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)
2018-04-08 14:15:21 +02:00
Adam Wulkiewicz
49b9e7bfa3 Merge pull request #465 from awulkiew/feature/projections_update
Update implemented projections to proj4 5.0.0 state.
2018-04-07 14:55:17 +02:00
Adam Wulkiewicz
e3802efb04 Merge pull request #467 from vissarion/feature_box_box_fix
Few fixes in distance computation
2018-03-28 16:09:08 +02:00
Vissarion Fysikopoulos
ff6547bc7b [formulas] Fix a bug in thomas inverse formula 2018-03-28 16:59:03 +03:00
Vissarion Fysikopoulos
df23bb19b8 [strategies] Fix inverse strategy type call from point segment distance computation strategy 2018-03-28 16:54:08 +03:00
Vissarion Fysikopoulos
ab2ab3144d [strategies] [tests] Diagonal case fix for box-box distance 2018-03-28 14:42:08 +03:00
Barend Gehrels
68296965f5 ticket #13386 - workaround for some gcc compilers 2018-03-27 21:50:18 +02:00
Barend Gehrels
7bfd8c6ca3 Revert "ticket #13386 - workaround for some gcc compilers complaining about"
This reverts commit 54f5ead9e8.
2018-03-27 21:46:05 +02:00
Barend Gehrels
54f5ead9e8 ticket #13386 - workaround for some gcc compilers complaining about
Also move the const according to conventions, in this method.
2018-03-27 21:28:13 +02:00
Adam Wulkiewicz
b9e33ae18f [index][doc] Improve description of predicates. 2018-03-23 00:18:31 +01:00
Adam Wulkiewicz
22f49ce7b4 [srs] Allow defining prime meridian in DMS format. 2018-03-22 22:11:53 +01:00
Adam Wulkiewicz
65df039169 [srs] In dms parser replace memset with init. list or std::fill. 2018-03-22 22:10:41 +01:00
Adam Wulkiewicz
7df9d6d235 [srs] Simplify pj_consts struct holding projection parameters. 2018-03-21 18:21:42 +01:00
Adam Wulkiewicz
7d73240ad9 [srs] Improve projections' parameters handling.
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.
2018-03-20 23:24:03 +01:00
Adam Wulkiewicz
c32e32c18f [srs] In bonne proj avoid calc_t to bool implicit conversion. 2018-03-18 03:14:08 +01:00
Adam Wulkiewicz
2490451d8e [srs][test] Do not include projections by default (due to possible clashes with macros). 2018-03-15 20:37:34 +01:00
Adam Wulkiewicz
331c584c27 [srs] Replace apa table with struct and return it from pj_authset() instead of dummy/true bool value. 2018-03-15 18:58:31 +01:00
Adam Wulkiewicz
ffa8c32856 [srs] Add missing include and fix unused variable warnings. 2018-03-15 18:39:46 +01:00
Adam Wulkiewicz
4c2753701e [srs] Replace en table with struct and return it from pj_enfn() instead of dummy/true bool value. 2018-03-15 17:48:52 +01:00
Adam Wulkiewicz
8794ffb121 [srs] Update v* and w* projections (proj4 5.0.0). 2018-03-15 16:57:05 +01:00
Adam Wulkiewicz
e39e242fe5 [srs] Update t* and u* projections (proj4 5.0.0). 2018-03-15 13:46:40 +01:00
Adam Wulkiewicz
409729c299 [srs] Update r* and s* projections (proj4 5.0.0). 2018-03-14 18:54:29 +01:00
Adam Wulkiewicz
40448ee99b [srs] Update p* and q* projections (proj4 5.0.0). 2018-03-14 17:04:03 +01:00
Adam Wulkiewicz
c1406db0f3 [srs] Update n* and o* projections (proj4 5.0.0). 2018-03-14 16:07:57 +01:00
Adam Wulkiewicz
ffeeaedb38 [is_valid] Add missing core/cs.hpp include. 2018-03-14 11:31:24 +01:00