Commit Graph

8536 Commits

Author SHA1 Message Date
Adam Wulkiewicz
9f28e8d8aa [srs] Rename upper-case variable and type names. 2018-04-13 18:48:50 +02:00
Vissarion Fysikopoulos
26fb76c622 [algorithms] [distance] Optimize segment check below of box 2018-04-13 16:24:31 +03: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
5eeaf93864
Merge pull request #472 from vissarion/feature_fix_envelope_polygon
Fix envelope polygon
2018-04-12 16:15:59 +02:00
Adam Wulkiewicz
6b00b94947 [doc] Update 1.68 release notes. 2018-04-12 16:14:43 +02:00
Vissarion Fysikopoulos
2b4a36493c [doc] Add polygon envelope fix to release notes 2018-04-12 17:14:37 +03:00
Adam Wulkiewicz
d77d3af272 [test][strategies] Add test for short sph and geo collinear segments. 2018-04-12 16:14:15 +02:00
Vissarion Fysikopoulos
0a5a4e9cae [test] Update comment for cw rings 2018-04-12 15:49:58 +03: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
Vissarion Fysikopoulos
1484a0eb65 [strategies] [tests] Fix special case for geo pt-seg distance 2018-04-05 14:26:21 +03:00
Vissarion Fysikopoulos
aee17ee094 [strategies] [tests] Activating some tests for pt-seg distance with thomas formula 2018-04-04 11:34:35 +03:00
Vissarion Fysikopoulos
93bd8501b0 [strategies] [algorithms] Azimuth strategy and box mirror function interfaces change 2018-04-02 14:55:34 +03:00
Vissarion Fysikopoulos
1e41a4d516 [strategies] [tests] Fix pt-seg distance cases for south hemisphere 2018-04-02 13:52:00 +03:00
Adam Wulkiewicz
884ee298d9 Merge branch 'bg-prepare' 2018-03-30 02:53:27 +02:00
Adam Wulkiewicz
bb727d91ed Merge branch 'develop' into bg-prepare 2018-03-30 02:52:30 +02:00
Vissarion Fysikopoulos
350836f3e7 Merge with develop branch 2018-03-29 11:03:20 +03: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
Vissarion Fysikopoulos
51a3a6b78c Merge branch 'feature_box_box_fix' into feature_box_seg 2018-03-28 12:49:24 +03:00
Vissarion Fysikopoulos
37c78acd6c [strategies] [tests] Diagonal case fix for box-box distance 2018-03-28 12:48:58 +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
Vissarion Fysikopoulos
3887ceedc3 [tests] South hemispahre box-box tests 2018-03-27 13:49:51 +03:00
Vissarion Fysikopoulos
d6569be95b Update include files for srs.hpp 2018-03-24 16:00:58 +02:00
Vissarion Fysikopoulos
2b5fc9a9d4 Merge remote-tracking branch 'origin/develop' into feature_box_seg 2018-03-24 15:43:13 +02:00
Vissarion Fysikopoulos
821bb37567 [algorithms] [strategies] Fix issue with envelope segment algorithm; wrong azimuth computation in some cases 2018-03-24 15:42:54 +02:00
Vissarion Fysikopoulos
e6e1b1d96f [tests] Crossing prime meridian tests 2018-03-23 16:40:09 +02:00
Adam Wulkiewicz
8c9fee52ab Merge branch 'bg-prepare' 2018-03-23 00:23:47 +01:00
Adam Wulkiewicz
2c6f8c25b4 Merge branch 'develop' into bg-prepare 2018-03-23 00:20:43 +01:00
Adam Wulkiewicz
b9e33ae18f [index][doc] Improve description of predicates. 2018-03-23 00:18:31 +01:00
Adam Wulkiewicz
4d7a929ae0 Merge branch 'bg-prepare' 2018-03-22 22:26:23 +01:00
Adam Wulkiewicz
90ee75f232 Merge branch 'develop' into bg-prepare 2018-03-22 22:25:10 +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
Vissarion Fysikopoulos
c416382aff [formulas] [tests] Handle cases of geometries in both hemispheres 2018-03-20 16:48:04 +02:00
Adam Wulkiewicz
2b0f326249 [test][srs] Improve error messages in projections tests. 2018-03-18 03:15:34 +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