Commit Graph

5259 Commits

Author SHA1 Message Date
Adam Wulkiewicz
4d2c60d23f [algorithms][strategies] Propagate disjoint(P,B) and expand(B,B) strategies into algorithms. 2018-10-15 01:26:17 +02:00
Adam Wulkiewicz
37569190db [formulas] Replace coordinate_system<>::type::units with cs_angular_units<>::type. 2018-10-15 01:24:46 +02:00
Adam Wulkiewicz
6c879b78ac [algorithms][strategies] Implement separate cart/sph P/B within strategies. Change P/B within strategy concept (no struct template parameters). 2018-10-15 01:22:28 +02:00
Adam Wulkiewicz
12ff7a6b8e [is_valid] Fix unused variable warning. 2018-10-14 00:50:04 +02:00
Adam Wulkiewicz
80ffb22901 [strategies][envelope] Simplify envelope::cartesian_point strategy. This also makes template keywords unnecessary. 2018-10-14 00:41:12 +02:00
Adam Wulkiewicz
99293c814f [is_valid] Fix unused variable warning. 2018-10-14 00:33:26 +02:00
Adam Wulkiewicz
fe63e8e27b [index] In intersection_content() explicitly use disjoint B/B strategy. 2018-10-14 00:10:21 +02:00
Adam Wulkiewicz
7dc81a98dd [algorithms] Add missing typename keywords. 2018-10-14 00:09:31 +02:00
Adam Wulkiewicz
7af8085f75 [algorithms][strategies] Move CS-specific code of envelope_segment from algorithms details to strategies.
This fixes circular dependencies.
2018-10-13 22:43:21 +02:00
Adam Wulkiewicz
7d45cae67b [algorithms][strategies] Fix several compilation errors.
Shadowing of template parameters, missing typename keywords, missing
includes.
2018-10-13 13:04:58 +02:00
Adam Wulkiewicz
4ac1f450ff [algorithms][strategies] Move disjoint Box/Box CS- specific code to strategies and use these strategies in algorithms. 2018-10-13 12:46:01 +02:00
Adam Wulkiewicz
d29acd1a2c Merge branch 'develop' into feature/undefined_cs 2018-10-12 22:12:13 +02:00
Adam Wulkiewicz
1564d12b99 [similarity] Fix unused variable warning, formatting and naming in discrete_hausdorff_distance. 2018-10-12 22:10:54 +02:00
Adam Wulkiewicz
ef432a7fd2 Merge branch 'develop' into feature/undefined_cs 2018-10-12 21:19:22 +02:00
Adam Wulkiewicz
fbe8f51cd1 [is_valid] Fix overlapping interiors condition (replace 2x point_on_border with relate). 2018-10-12 19:39:28 +02:00
Adam Wulkiewicz
5847581734 [algorithms] Fix copyright date. 2018-10-12 17:35:47 +02:00
Mateusz Łoskot
f2d5fae490
Replace boost::ignore_unused_variable_warning with boost::ignore_unused
The former is provided by Boost.ConceptCheck.
The latter is an improved equivalent provided by Boost.Core.

Related to #513
2018-10-12 15:16:46 +02:00
Adam Wulkiewicz
38cbc162a0 Merge branch 'develop' into feature/undefined_cs 2018-10-12 03:52:06 +02:00
Adam Wulkiewicz
c7e8540926 [io] In wkt read/write use default P/P equals strategy. 2018-10-12 03:32:58 +02:00
Adam Wulkiewicz
6c322e6625 [algorithms] Update various algorithms after recent changes:
- use equals P/P in equals_point_point extracted from strategy passed to
  algorithm
- remove Midpoint of point_on_border (this exposes an error in is_valid)
- use envelope and expand strategies extracted from strategy passed to
  algorithm
- change union's default strategy (relate v.s. intersection).
2018-10-12 03:26:10 +02:00
Adam Wulkiewicz
203618b404 [algorithms] Remove point_on_border Midpoint parameter as unneeded, cartesian-only hack.
If using this parameter changes the result it means that a different
method should be used. Using it does not solve the real problem, it only
hides it. Consider a polygon in another, touching at the first vertex.
Checking the midpoint of the first segment of contained polygon could
result in finding out that the polygon is inside. However if the segment
was collinear to the containing polygon's segment or this polygon had
vertex exactly at the checked midpoint the result would be the same as
using the first point of the contained polygon.
2018-10-12 03:19:21 +02:00
Adam Wulkiewicz
64863cceeb [strategies] Update WRT recent changes:
- use CS-specific normalization strategies instead of algorithm.
- add lower-level strategies getters (point in point, envelope, expand).
- pass strategy to equals_point_point()
2018-10-12 03:12:34 +02:00
Adam Wulkiewicz
2a93705271 [disjoint][equals][strategies] Move CS-specific code of P/P disjoint/equals to strategies. 2018-10-12 03:12:03 +02:00
Adam Wulkiewicz
17017e4328 [envelope][expand][strategies] Move CS-specific code of envelope and expand to strategies. 2018-10-12 03:05:59 +02:00
Adam Wulkiewicz
94c7c810aa [normalize][strategies] Move CS-specific part of normalization code to strategies. 2018-10-12 03:00:24 +02:00
Adam Wulkiewicz
5b6651d588 [formulas] Fix coordinates comparison warning. 2018-10-12 02:58:53 +02:00
Adam Wulkiewicz
96115158d3 [area][distance] Dispatch on struct level by strategy at resolve_strategy step. 2018-10-12 02:36:37 +02:00
Adam Wulkiewicz
0be273f605 [core][geometries][srs] Add cs::undefined and detail::cs_angular_units.
Remove is_radian and units typedef from non-cartesian cs structs.
2018-10-12 02:27:55 +02:00
Vissarion Fysikopoulos
020be50d58 [tests] Add tests for line interpolate points algorithm with multipoints 2018-10-10 17:08:36 +03:00
Vissarion Fysikopoulos
62ee805cec [algorithms] Use segment as range in line interpolate point 2018-10-05 16:08:25 +03:00
Vissarion Fysikopoulos
bcf2f97237 [algorithms] Add support for multipoint in line_interpolate_point 2018-10-05 14:28:15 +03:00
Vissarion Fysikopoulos
c1625e3134 [algorithms] Change the interface of line_interpolate_point 2018-09-28 10:34:45 +03:00
Vissarion Fysikopoulos
c36a4c29f1 [algorithms] [strategies] [tests] Rename strategy for interpolation of points. 2018-09-25 13:00:34 +03:00
Barend Gehrels
465e487b8c [spike] Fix order problem in is_valid by providing a new overload with
an intuitive order which should replace the original one
2018-09-21 15:05:28 +02:00
Barend Gehrels
50691def6b [sort_by_side] Undo commit 0d78de5 which caused several regressions
in all intersection code. Fix the underlying reason for it (potential
overflow) in another way, by changing rank type to signed_size_type
2018-09-20 15:48:57 +02:00
Vissarion Fysikopoulos
53c5dc1e27 [algorithms] [tests] Add special cases for line_interpolate_point algorithm and tests 2018-09-20 15:56:50 +03:00
Vissarion Fysikopoulos
7740f3282e [algorithms] Calculation types in line_interpolate_point algorithm 2018-09-19 16:53:32 +03:00
Vissarion Fysikopoulos
3fb91edbf8 [algorithms] Change loop in line_interpolate_point for linestrings 2018-09-19 16:46:42 +03:00
Vissarion Fysikopoulos
3de61f311c [algoritms] [tests] Add tests for cartesian line_interpolate_point and fix bug in algorithm. 2018-09-19 16:33:32 +03:00
Vissarion Fysikopoulos
6c68f427dd [algorithms] Add line_interpolate_point algorithm for linestrings 2018-09-19 15:49:11 +03:00
Vissarion Fysikopoulos
b2090ed448 [strategy] Add cartesian strategy for line interpolate point algorithm 2018-09-17 15:23:42 +03:00
Adam Wulkiewicz
651b3dba77 [similarity] Add missing #ifdefs for headers. 2018-09-15 14:01:30 +02:00
Adam Wulkiewicz
0ca58b8176 [similarity][doc] Uncomment examples in qbk sections. 2018-09-15 00:50:55 +02:00
Adam Wulkiewicz
6b7272495b [geometry] Add similarity algorithms includes to the main header geometry.hpp 2018-09-15 00:39:49 +02:00
Adam Wulkiewicz
bf62e05e23
Merge pull request #496 from awulkiew/feature/projections_interface
Add run-time and compile-time projections/transformations parameters.
2018-09-14 23:37:42 +02:00
Adam Wulkiewicz
37e6eeaceb
Merge pull request #490 from yaghya/feature/similarity
Adding Frechet distance And Hausdorff distance algorithms to calculate Simmilarity Between Geometries
2018-09-14 23:35:46 +02:00
Yaghyavardhan singh khangarot
5ee034702b [doc][similarity] updated 2018-08-31 02:57:17 +05:30
Yaghyavardhan singh khangarot
329652bdec [doc][similarity] Updated for geographic strategies 2018-08-30 23:21:33 +05:30
Barend Gehrels
f7c2da0a0f [DISSOLVE] Avoid compiler warning for area type / coordinate type 2018-08-30 13:53:51 +02:00
Barend Gehrels
faad8e3294 [DISSOLVE] Fix dereferencing elements from collection being modified 2018-08-30 13:52:55 +02:00
Adam Wulkiewicz
5eb599eae9 [strategies] Add commented code in geo inters. strategy (for future experiments). 2018-08-27 23:47:26 +02:00
Adam Wulkiewicz
ece82259a1 [formulas] Handle division by 0 in Sjoberg formula. 2018-08-27 23:45:09 +02:00
Yaghyavardhan singh khangarot
475e53b870 [doc][similarity] updated 2018-08-26 20:50:56 +05:30
Adam Wulkiewicz
8c4ba19f11 [srs] Make function input arguments const in healpix projection. 2018-08-16 15:55:27 +02:00
yaghyavardhan singh khangarot
f526bb8f54
Merge branch 'develop' into feature/similarity 2018-08-15 20:15:42 +05:30
Yaghyavardhan singh khangarot
54b71c1581 [doc][similarity] Added Strategies in the documentation 2018-08-14 16:31:43 +05:30
Yaghyavardhan singh khangarot
da3ecd4c6d [doc][similarity] Updated documentation for the similarity algorithms for different distance strategies 2018-08-13 17:07:52 +05:30
Yaghyavardhan singh khangarot
50ca27ebb9 [doc][similarity] Updated documentation for the similarity algorithms 2018-08-12 05:07:16 +05:30
Dane Springmeyer
0d78de5974
Fix potential unsigned integer overflow in find_polygons_for_source
An invalid polygon will trigger overflow when `previous_rank` is `0` as `previous_rank - 1` will overflow. This can be detected by passing an invalid polygon like `[[8128,3600],[8224,3664],[8128,3600]]` into `boost::geometry::intersection` and compiling with `-fsanitize=undefined`
2018-08-11 09:01:40 -07:00
Adam Wulkiewicz
5357c4f15c [srs] Disable str_cast specializations with C++11 features in MSVC<=12. 2018-08-01 15:15:02 +02:00
Adam Wulkiewicz
319ee31d6a [srs] Disable str_cast specializations with C++11 features in MSVC<=12. 2018-08-01 14:09:58 +02:00
Yaghyavardhan singh khangarot
a9ac6d87b9 [algorithms]Rename Hausdorff Distance and Frechet Distance algorithms 2018-07-31 22:03:21 +05:30
Adam Wulkiewicz
3c8714c600 [algorithms][formulas][strategies] Fix unused variable warnings. 2018-07-30 04:58:06 +02:00
Adam Wulkiewicz
e2ad044720 [algorithms][formulas][strategies] Fix unused variable warnings. 2018-07-29 22:17:40 +02:00
Adam Wulkiewicz
7f27a9f995 Merge branch 'develop' into feature/projections_interface 2018-07-25 17:07:38 +02:00
Adam Wulkiewicz
79ef70f37b
Merge pull request #486 from BoostGSoC18/feature/geodesic_direct
Introduce formula for Karney's direct geodesic method
2018-07-25 14:59:48 +02:00
Adam Wulkiewicz
d3fd9e6d61 Merge branch 'develop' into bg-prepare 2018-07-23 03:09:22 +02:00
Adeel Ahmad
1bfeba16aa
[strategies] Add distance strategy for Karney's inverse formula 2018-07-20 13:52:20 +05:00
Vissarion Fysikopoulos
142ea74cb7 [strategies] Line interpolate point spherical strategy 2018-07-19 14:36:46 +03:00
Adam Wulkiewicz
01c7c4b6e9 [srs] Fix gcc8 warnings (catching polymorphic type by value). 2018-07-19 02:01:00 +02:00
Adeel Ahmad
2ff1824683
[formulas][test] Update copyright information 2018-07-16 19:06:20 +05:00
Adam Wulkiewicz
1b3cab85bd [srs] Add workaround for msvc-12 faulty array initialization. 2018-07-16 05:21:06 +02:00
Adam Wulkiewicz
f3e12546a0 [srs] Attempt to fix invalid constant expression preventing compilation with some versions of GCC. 2018-07-15 19:14:34 +02:00
Adam Wulkiewicz
3f75284e24 Merge branch 'develop' into bg-prepare 2018-07-15 18:35:01 +02:00
Adeel Ahmad
b44e3aed59
[formulas] Remove unused variable a12 in karney_inverse 2018-07-13 12:15:35 +05:00
Adeel Ahmad
55c1691ddc
[formulas] Fix incorrect argument to meridian_length() function 2018-07-13 12:08:00 +05:00
Vissarion Fysikopoulos
b768e811c1 [algorithms] [strategies] Line interpolate point geographic strategy 2018-07-12 15:32:57 +03:00
Vissarion Fysikopoulos
bcfe022338 [Algorithms] Interface of line_interpolate_point algorithm 2018-07-11 16:21:56 +03:00
Yaghyavardhan singh khangarot
ff68b40cad [algorithms] Updated 2018-07-10 15:18:49 +05:30
Adeel Ahmad
daf03b4888
[formulas] Use namespace alias se for series_expansion in karney_inverse 2018-07-10 11:52:20 +05:00
Adeel Ahmad
6432dfe96c
[formulas][util] Reformat code in karney_inverse to use coefficient containers 2018-07-10 11:36:33 +05:00
Adam Wulkiewicz
50dcb6d4ae
Merge pull request #488 from jonasdmentia/fix/closing_iterator_returns_reference_to_temp
Fix/closing iterator returns reference to temp
2018-07-09 13:43:46 +02:00
Adam Wulkiewicz
9d763b9e52
Merge pull request #499 from vissarion/fix/expand_make_inverse
Fix make_inverse and expand issue
2018-07-09 13:39:36 +02:00
Adeel Ahmad
73a2e2b8a4 Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-07-09 16:15:41 +05:00
Vissarion Fysikopoulos
f04c25f43d [algorithms] [util] Rename is_inverse utility and update copyright notes 2018-07-09 12:58:34 +03:00
Yaghyavardhan singh khangarot
dcae80d481 [algorithms] Updated hausdorff_distance.hpp 2018-07-09 10:14:22 +05:30
Yaghyavardhan singh khangarot
3e9f52773d [algorithms] Updated hausdorff distance algorithm using R-tree 2018-07-08 18:41:21 +05:30
Vissarion Fysikopoulos
65084bb854 [util] Use exact coordinate check for inverse box 2018-07-06 16:43:43 +03:00
Adeel Ahmad
1a52eaca9c
[formulas] Resolve inaccuracy in starting point for Newton's method 2018-07-06 18:27:49 +05:00
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
Yaghyavardhan singh khangarot
dde8666d16 [algorithms] Updated frechet and hausdorff distance algorithm 2018-07-06 03:51:02 +05:30
Phillip Palk
5a0964886a [iterators] fix calculation of range's const reference type inside closing_iterator and ever_circling_iterator. 2018-07-05 23:07:36 +10:00
Yaghyavardhan singh khangarot
a34d4a0eb7 [algorithms] Updated hausdorff distance algorithm 2018-07-04 20:28:20 +05:30
Adam Wulkiewicz
7a5e208b37 Merge branch 'develop' into bg-prepare 2018-07-04 16:54:48 +02:00
Adam Wulkiewicz
81ab3a1e7c [distance] Fix std::min() call with msvc. 2018-07-04 16:54:02 +02:00
Vissarion Fysikopoulos
fbc79c807b Merge remote-tracking branch 'origin/develop' into feature_test_distance_any_geo 2018-07-04 16:16:51 +03:00
Vissarion Fysikopoulos
c1dd9278b9 Fix conflicts by merging to develop 2018-07-04 15:55:09 +03:00
Vissarion Fysikopoulos
38c77cf435 [algorithms] Avoid normalization for boxes created by make_inverse 2018-07-04 14:52:41 +03:00
Adeel Ahmad
4f04310859
[formulas][test] Add Karney's inverse method in inverse test cases
The compilation is successful with gcc version (7.2.0),
but not with version (5.4.1). The accepted tolerance
is set to (0.0000001). Currently, all tests are not
passing, which indicates an error in the calculation.

Additionally, some changes have been made in
karney_inverse.hpp
2018-07-03 11:02:48 +05:00
Adeel Ahmad
12bd41fd5d
[formulas] Store values from Karney's inverse method in result_inverse structure
The computed values from inverse method include distance, azimuth,
reverse_azimuth, reduced_length, and geodesic_scale.
2018-07-02 13:47:58 +05:00
Adam Wulkiewicz
be7ae5b27a Merge branch 'develop' into bg-prepare 2018-07-02 04:55:26 +02:00
Adeel Ahmad
687df8e18a
Merge branch 'develop' into feature/geodesic_direct
Conflicts:
	include/boost/geometry/util/math.hpp
	test/formulas/direct.cpp

The conflicting files have been updated.
2018-06-29 14:31:15 +05:00
Adam Wulkiewicz
5729e6f410 Merge branch 'develop' into feature/projections_interface 2018-06-28 23:40:13 +02:00
Adeel Ahmad
621950329a
[util] Pass range into math::polyval() instead of std::vector
This is done to avoid creating a separate container in each
iteration.
2018-06-28 10:57:21 +05:00
Adeel Ahmad
1fe3b3bd75
[util] Pass SeriesOrder as template parameter in evaluate_coeffs_C3x() function
The coefficient container structs are moved to the
bottom of the file.
2018-06-28 10:56:11 +05:00
Adeel Ahmad
b86a93bc5a
[util] Rename math::normalize_values to math::normalize_unit_vector 2018-06-28 09:51:25 +05:00
Adam Wulkiewicz
7a832916ba [srs] Fix compilation errors in projections/grids.hpp
Wrong ifstream.open() argument and shadowing of template argument.
2018-06-28 04:06:37 +02:00
Adam Wulkiewicz
1f0d25300f [srs] Add default ctor to projection_unknown_id_exception. 2018-06-28 04:01:14 +02:00
Adam Wulkiewicz
d3cc2e6201 [srs] Use newly implemented parameters to define predefined SRID parameters.
Run-time and compile-time EPSG, ESRI and IAU2000 codes.
2018-06-28 03:58:12 +02:00
Adam Wulkiewicz
6f963b2117 [srs] Support new parameters in srs::projection and srs::transformation classes. 2018-06-28 03:55:13 +02:00
Adam Wulkiewicz
d6700a8865 [srs] Support new parameters in projections. 2018-06-28 03:52:56 +02:00
Adam Wulkiewicz
a5ad85cfae [srs] Support new interfaces in run-time factory and projection base classes. 2018-06-28 03:51:32 +02:00
Adam Wulkiewicz
345ad92e5b [srs] Implement new static and dynamic transformation parameters.
There are 3 ways of defining parameters:

// run-time Proj4 string
srs::proj4("+proj=tmerc +ellps=WGS84 +units=m")

// run-time
using namespace srs::dpar;
parameters<>(proj_tmerc)(ellps_wgs84)(units_m)

// compile-time
using namespace srs::spar;
parameters<proj_tmerc, ellps_wgs84, units_m>
2018-06-28 03:44:15 +02:00
Adeel Ahmad
9ff4fbe94a
[util] Use functions from math namespace instead of std 2018-06-27 10:46:27 +05:00
Adeel Ahmad
9699b49098
[util][formulas] Rename normalize_angle function to normalize_azimuth
For normalizing longitudes, the normalize_longitude function is
used instead.
2018-06-27 10:34:18 +05:00
Adeel Ahmad
c26483b9fc
[util] Change static inline to inline in series_expansion.hpp file 2018-06-26 17:11:35 +05:00
Adeel Ahmad
4d39eae2b6
[util] Add BOOST_GEOMETRY_ASSERT in series expansion and normalization function
Modified functions are:
- evaluate_coeffs_C3x
- normalize_values
2018-06-26 17:07:59 +05:00
Adeel Ahmad
9c96bec2bf
[util] Avoid passing array size using std::vector
Previously, the array size was passed in as a
separate parameter.
2018-06-26 13:20:12 +05:00
Yaghyavardhan singh khangarot
3019282634 [algorihtms] Updated frechet_distance.hpp 2018-06-26 00:47:57 +05:30
Adeel Ahmad
06eb057fa9
[formulas] Use assignment operator on the same line for consistency
Other changes include the update of series expansion function
calls, as the template arguments are reversed.
2018-06-25 18:44:37 +05:00
Adeel Ahmad
19f06fa04e
[util] Reverse template argument order for series expansion functions
In some cases, this allows the caller to ignore the CT template
argument, as it is deduced from the argument list.
2018-06-25 18:39:43 +05:00
Adeel Ahmad
cc7e9e05c1
[formulas] Use namespace alias se for series_expansion 2018-06-25 17:59:32 +05:00
Adeel Ahmad
dedccdbdae
[formaulas][util] Define coefficient containers for computing series expansions
The coefficient containers are defined as structs in
series_expansion.hpp file. They allow the caller to
compute expansions without specifying the size
for the output array.
2018-06-25 17:19:44 +05:00
Yaghyavardhan singh khangarot
95218f3a17 [algorihtms] Extended algorihtm for point-MultiPoint and Multi-Point 2018-06-24 05:02:28 +05:30
Yaghyavardhan singh khangarot
495f82d9c8 Extended Hausdorff Distance for MultiLinestring_MultiLinestring 2018-06-23 23:40:08 +05:30
Yaghyavardhan singh khangarot
9dae6ec79b [algorithms] Using Linestrin_Linestring() for Linestrin_MultiLinestring 2018-06-23 04:28:04 +05:30
Adeel Ahmad
1972bcda3e
[formula][util] Pass boost::array to series expansion functions
Using boost::array we don't have to explicitly provide
the template parameters.
2018-06-22 19:26:27 +05:00
Yaghyavardhan singh khangarot
b78200f78e [algorithms] Updated Copyright 2018-06-21 22:48:00 +05:30
Yaghyavardhan singh khangarot
1e16e2937e [algorithms] Extending Hausdorff Distance for Linestring and MultiLinestring 2018-06-21 22:35:10 +05:30
Adam Wulkiewicz
f824763cb4 [formulas][srs][util] Add math::pow(), use it in geo area formula and projections. 2018-06-20 22:56:52 +02:00
Adeel Ahmad
6d0720b5ae
[formulas] Ensure reduced length and geodesic scale are computed in canonical form 2018-06-20 21:32:41 +05:00
Adeel Ahmad
02577bda55
[formulas] Use midpoint of bracket when value lies outside of range 2018-06-20 21:31:18 +05:00
Yaghyavardhan singh khangarot
2d9e66cbac Updating Frechet Distance and Hausdorff Distance 2018-06-20 15:25:11 +05:30
Adeel Ahmad
ead0b188f9
[formulas] Update bracketing values in Newton's method 2018-06-19 20:26:49 +05:00
Adeel Ahmad
2ddad45616
[util] Move difference_angle function to normalize_spheroidal_coordinates.hpp 2018-06-19 18:11:17 +05:00
Vissarion Fysikopoulos
25ce113de1 [formulas] Use std pow in are formulas 2018-06-19 13:07:53 +03:00
Vissarion Fysikopoulos
4dacbfa2d2 [formulas] Use pass by reference in area formula functions 2018-06-19 12:06:03 +03:00
Adeel Ahmad
490b4df943
Merge branch 'feature/geodesic_direct' into feature/karney_inverse
Conflicts (resolved):
	include/boost/geometry/util/math.hpp
2018-06-19 10:05:16 +05:00
Yaghyavardhan singh khangarot
2bf85f4c23 Adding Frechet Distance And Haudorff Distance algorithms 2018-06-18 20:18:54 +05:30
Vissarion Fysikopoulos
10b340e89e [formulas] Call to pow function with both arguments having the same type 2018-06-18 16:33:31 +03:00
Adeel Ahmad
78411f63c8
[doc][util][formulas][test] Add copyright information in updated files 2018-06-18 18:05:11 +05:00
Vissarion Fysikopoulos
12f7a2239b [formulas] Add coordinates and reverse azimuth flags to spherical direct formula 2018-06-18 14:31:45 +03:00
Vissarion Fysikopoulos
738c0da0e2 [formulas] Add missing include file needed by spherical formulas 2018-06-18 14:13:36 +03:00
Vissarion Fysikopoulos
cc2ded01ee [formulas] [tests] Change thomas direct interface 2018-06-18 14:08:58 +03:00
Vissarion Fysikopoulos
88469892dd [formulas] Rename elliptic_meridian_arc formula to meridian 2018-06-18 12:52:05 +03:00
Vissarion Fysikopoulos
c1299d7a32 [formulas] [tests] Add revarse_azimuth and quantities computation to direct meridian formula plus tests 2018-06-18 12:03:13 +03:00
Adeel Ahmad
2c7a29e7dc
[formulas][util] Improve code formatting to conform with guidelines 2018-06-15 18:52:30 +05:00
Adeel Ahmad
318a61dce0
[formulas] Use updated functions for normalization 2018-06-15 18:20:01 +05:00
Adeel Ahmad
d591d7a7bb
[util] Use existing normalize_spheroidal_coordinates class for normalizing an angle
- This should normalize the given angle in range (-180, 180].
- The function normalize is also moved from math.hpp to
normalize_spheroidal_coordinates.hpp where it is renamed
to normalize_values
2018-06-15 18:14:17 +05:00
Vissarion Fysikopoulos
bc3189f9fd [formulas] [tests] Interface for direct meridian formula and tests 2018-06-15 10:25:05 +03:00
Adeel Ahmad
06fc06dc7f
[formulas] Add function lambda12 to regulate bracketing range in Karney inverse 2018-06-14 13:42:44 +05:00
Adeel Ahmad
642a84c551 Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-14 13:34:29 +05:00
Adeel Ahmad
943672bd3a
[formulas] Use template argument CT instead of double
This change is made in Karney's direct method.
2018-06-14 13:27:33 +05:00
Vissarion Fysikopoulos
d04c621150 [formulas] Return 0 in horner's rule special case of empty input 2018-06-14 10:30:10 +03:00
Adeel Ahmad
2aac4027aa Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-14 11:54:09 +05:00
Vissarion Fysikopoulos
4c4a91f3b4 [formulas] Add quarter meridian formula for spheroids 2018-06-13 13:58:52 +03:00
Adeel Ahmad
d11b7160b2
[formulas] Fix calculation of t for finding the geodesic scale (M12) 2018-06-13 12:26:56 +05:00
Adeel Ahmad
15d5cd6281
[formulas] Perform normalization on starting guess if it passes the sanity check 2018-06-12 18:32:26 +05:00
Adeel Ahmad
2bde1c119a
[formulas] Solve the astroid equation for inverse problem
For details, please refer to Eq. (65) in,
Geodesics on an ellipsoid of revolution, Charles F.F Karney,
https://arxiv.org/abs/1102.1215
2018-06-12 18:27:29 +05:00
Vissarion Fysikopoulos
afb575fbf5 [tests] Add tests for meridian direct formula 2018-06-12 15:52:58 +03:00
Vissarion Fysikopoulos
ccd9edff63 [formulas] [strategies] Thomas first order direct formula 2018-06-12 15:42:34 +03:00
Vissarion Fysikopoulos
b7406fd19c [formulas] Spherical direct formula 2018-06-12 15:29:56 +03:00
Vissarion Fysikopoulos
c572601efa [formulas] [strategies] Rename elliptic_arc_length formula to elliptic_meridian_arc_inverse for consistency 2018-06-12 14:48:06 +03:00
Vissarion Fysikopoulos
d22c39b52c [formulas] Elliptic meridian arc direct formula 2018-06-12 14:36:12 +03:00
Adeel Ahmad
5bb581c932
[formulas] Flip sign of cos_lam12
This fixes the inaccuracy caused during the
calculation of Newton's starting point.
2018-06-12 15:51:55 +05:00
Adeel Ahmad
71fbc86f44 Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-12 15:42:41 +05:00
Adeel Ahmad
485a2f9a0f
[formulas] Find starting point for inverse problem (short lines) 2018-06-11 18:44:27 +05:00
Adeel Ahmad
0344ba5c1a
[formulas] Handle case for equatorial points in inverse problem 2018-06-11 11:06:18 +05:00
Adeel Ahmad
043f401fbe
[util] Use Maxima generated function for computing C3x coefficients
The script used is geod.mac:
https://sourceforge.net/p/geographiclib/code/ci/release/tree/maxima/geod.mac
2018-06-09 16:11:46 +05:00
Phillip Palk
61679f4adc [iterators] use the base type (iterator_facade) for the reference and difference_type typedefs inside closing_iterator and ever_circling_iterator. Also, fixed reference_type type name to be reference. 2018-06-08 08:18:01 +10:00
Adeel Ahmad
276e8e6d7a
[formulas] Add function for computing the length at the meridians
This method is an integral part of Karney's solution to inverse
geodesic problem. It is only invoked for points that lie on
the meridian, or are close to it.
2018-06-07 18:28:22 +05:00
Adeel Ahmad
efd30c8ccc Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-07 11:00:37 +05:00
Adeel Ahmad
8a2dd63ccf
[util] Move sin_cos_series function to series_expansion.hpp
This function is extensively used for the direct and
inverse geodesic problem, therefore, it is moved
to a more accessible location.
2018-06-07 10:58:13 +05:00
Phillip Palk
1d7a38fbee [iterators] fix return of a reference to a temporary object when using closing_iterator and ever_circling_iterator with transformed ranges. 2018-06-07 10:07:48 +10:00
Adeel Ahmad
2e064c0f0d
[formulas] Arrange points in canonical form for inverse geodesic problem 2018-06-06 09:42:09 +05:00
Adeel Ahmad
7561d68c08
[util] Add function for returning NaN (not a number) 2018-06-06 09:39:31 +05:00
Adeel Ahmad
49e0a4fdae Merge branch 'feature/geodesic_direct' into feature/karney_inverse 2018-06-06 08:24:27 +05:00
Adeel Ahmad
df0cafdd19
[doc] Move Maxima scripts for geodesics to doc/other/maxima/geod.mac 2018-06-05 17:26:30 +05:00
Adeel Ahmad
b9b0f85560
[util] Add functions to normalize / sum two given values (angles) 2018-06-05 12:44:36 +05:00
Adeel Ahmad
cc19342b4e
[util] Remove duplicated Maxima code from series_expansion.hpp 2018-06-05 09:28:37 +05:00
Adeel Ahmad
831873752d
[formulas] Use constant type variables for comparison 2018-06-04 19:12:50 +05:00
Adeel Ahmad
1ed5f103f4
[formulas] Move SeriesOrder to the end of template parameter list 2018-06-04 19:09:07 +05: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
Adeel Ahmad
4fa4a8206a
[util] Update series expansion for C3x 2018-05-31 17:40:53 +05:00
Adeel Ahmad
b8a225e1cf
[formulas] Fix direct geodesic method by performing normalization
- Add minus sign for B12 evaluation
2018-05-29 21:11:53 +05:00
Adeel Ahmad
3dd6bce720
[util] Add functions for normalizing and evaluating polynomial 2018-05-29 21:08:06 +05:00
Adeel Ahmad
1e31876e94
[util] Modify function for evaluting C3x coefficient
- Add separate function for evaluating C3 from C3x coefficient
2018-05-29 21:06:19 +05:00
Adeel Ahmad
6a2897db25
[formulas][util] Add missing import and function return type 2018-05-28 12:28:14 +05:00
Adeel Ahmad
0c2b8cdbab
[formulas] Make variable declarations constant 2018-05-24 22:09:47 +05:00
Adeel Ahmad
ac4e483c92
[formulas] Compute the reduced length and geodesic scale using Karney's direct method 2018-05-24 11:26:56 +05:00
Adeel Ahmad
a0a55f361f
[util] Evaluate series and coefficients for A2 and C2 using series expansion 2018-05-24 11:18:26 +05:00
Adeel Ahmad
9e2c74afc8
[formulas] Compute the longitude for second point using the longitudinal difference 2018-05-23 14:22:40 +05:00
Adeel Ahmad
9152191986
[util] Add functions to evaluate coefficients for A3 and C3 using series expansion 2018-05-23 12:32:21 +05:00
Adeel Ahmad
881c73c90b
[formulas] Compute the latitude for second point following Karney's method
- Link to paper: https://arxiv.org/pdf/1109.4448.pdf
2018-05-22 17:18:37 +05:00
Vissarion Fysikopoulos
1646a67df6 [tests] Tests for areal-box geo distance 2018-05-21 17:06:23 +03:00
Vissarion Fysikopoulos
d91259b4e1 [algorithms] [test] Use s/b distance strategy in linear-box cases 2018-05-21 15:39:12 +03:00
Adeel Ahmad
6ce1b099cb
[util] Evaluate coefficients for C1p using series expansion
- Fix conversion from degree to radian in sin_cos_degrees function
2018-05-21 16:32:28 +05:00
Adeel Ahmad
3700b4fafa
[util] Move series expansion functions to util/series_expansion.hpp 2018-05-19 21:49:24 +05:00
Adeel Ahmad
b6fcee8f30
[formulas] Compute sin cos series using Clenshaw summation
- Update function headers
2018-05-19 21:33:01 +05:00
Adeel Ahmad
320891caef
[utils] Add function for normalizing and rounding off an angle 2018-05-19 21:32:09 +05:00
Vissarion Fysikopoulos
4a237e6878 [strategies] [distance] Remove pt-pt distance strategy getters from pt-seg strategy 2018-05-16 17:08:08 +03: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
Vissarion Fysikopoulos
a54ac78dde [strategies] [distance] Move vertical_or_meridian method from pt-pt to pt-seg strategy and remove unused methods 2018-05-16 13:29:57 +03:00
Adeel Ahmad
c73ea927c4
[formulas] Add function for evaluating coefficients for C1
- Add SED script for converting x to CT(x)
- Improve code documentation
2018-05-15 23:43:52 +05:00
Vissarion Fysikopoulos
4f755af72b [algorithms] [strategies] [tests] Create unique segment-box distance strategy 2018-05-15 17:11:50 +03:00
E Kawashima
56f1cf8ede
[srs] Add missing cstring include. 2018-05-14 15:32:19 +09:00
Adeel Ahmad
8d5d3bc8a9
[formulas] Add draft of direct geodesic problem from Karney (2011)
The paper can be found at: https://arxiv.org/pdf/1109.4448.pdf
This commit also introduces the evaluate_series_A1 function
for evaluating the series expantion, which was generated
using Maxima: http://maxima.sourceforge.net
2018-05-12 22:09:26 +05:00
Adeel Ahmad
302e240667
[utils] Add function sin_cos_degrees for evaluating sine and cosine function 2018-05-12 22:08:25 +05:00
Vissarion Fysikopoulos
fb7da1041a [algorithms] [strategies] Change azimuth strategy interface 2018-05-11 12:27:34 +03:00
Vissarion Fysikopoulos
2c72e1d636 [algorithms] [strategies] Change int return values with enums in disjoint segment_box 2018-05-11 11:37:35 +03: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
fdad082c7e [policies] Fix segment ratios comparison for short segments and non-integral types (no robustness, non-cartesian CS, etc.). 2018-05-07 18:35:58 +02:00
Adam Wulkiewicz
4223683fe8 [strategies] Improve consistency of spherical intersection strategy.
Improve segment ratios generated for collinear segments.
2018-05-06 01:04:16 +02:00
Adam Wulkiewicz
c498dc4086 [strategies] Improve consistency of segment ratios generated by sph and geo intersection strategies. 2018-05-04 01:35:45 +02:00
Adam Wulkiewicz
7e7a637c92 [policies] Improve consistency of segment_ratio comparison operators. 2018-05-04 01:34:53 +02:00
Vissarion Fysikopoulos
990c274705 [test] Tests multilinestrings-box distance 2018-05-03 12:35:16 +03:00
Vissarion Fysikopoulos
4c63f4030f [strategies] Remove default values from functional templates 2018-05-02 14:49:36 +03:00
Vissarion Fysikopoulos
2583decd76 [algorithms] [tests] Use azimuth side formula in disjoint 2018-04-26 16:50:36 +03:00
Vissarion Fysikopoulos
2a0b4e6b16 Merge branch 'feature_box_seg' into feature_test_distance_any_geo 2018-04-25 12:13:38 +03:00
Vissarion Fysikopoulos
72019d52d1 [algorithms] [strategies] Rename meridian method to vertical_or_meridian 2018-04-24 15:30:48 +03:00
Vissarion Fysikopoulos
e4f55eafdd [algorithms] [distance] Clean and optimize seg on the right of box distance case 2018-04-23 16:07:09 +03:00
Vissarion Fysikopoulos
077653f2ca [algorithms] [strategies] Move mirror box functionality to strategies 2018-04-20 11:54:16 +03:00
Vissarion Fysikopoulos
e4dcc5bc7e [strategies] Use general units for box in segment_below_of_box strategy 2018-04-20 10:57:15 +03:00
Adam Wulkiewicz
9b8d0a3b4c [sectionalize] Avoid integer underflow/underflow in segment's direction calculation. 2018-04-19 23:34:24 +02:00
Vissarion Fysikopoulos
8c0976902d [algorithms] [strategies] In check segment below box function move CS spesific computation to strategies 2018-04-19 16:29:38 +03: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
Vissarion Fysikopoulos
18f1394e30 [alsorithms] [distance] Optimization: avoid to compute vertex twice in some cases 2018-04-17 12:59:52 +03:00
Vissarion Fysikopoulos
7f5236b8fd [algorithms] [distance] Use the whole segment instead of starting point to vertex sub-segment for distance pt-seg computation 2018-04-17 11:55:02 +03: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
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
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
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
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
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
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
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
Adam Wulkiewicz
9459b39bee [srs] Update m* projections (proj4 5.0.0). 2018-03-14 01:23:32 +01:00
Adam Wulkiewicz
d770d18d6c [srs] Update l* projections (proj4 5.0.0). 2018-03-14 00:25:05 +01:00
Adam Wulkiewicz
f492512df4 [srs] Update i* and k* projections (proj4 5.0.0). 2018-03-13 02:44:39 +01:00
Adam Wulkiewicz
f4f1874f19 [srs] Update h* projections (proj4 5.0.0), add pj_calc_ellipsoid_params() function and comment in geos projection. 2018-03-12 23:13:15 +01:00
Adam Wulkiewicz
1f4a271d74 [srs] Update f* and g* projections (proj4 5.0.0). 2018-03-12 03:17:05 +01:00
Adam Wulkiewicz
e71bb85217 [srs] Update eck1, eck2, eck3, eck4, eck5, eqc, eqdc, etmerc (proj4 5.0.0). 2018-03-10 00:29:06 +01:00
Adam Wulkiewicz
57bd186feb [srs] Update cc, collg and denoy (proj4 5.0.0). 2018-03-09 19:21:55 +01:00
Adam Wulkiewicz
fc73443860 [srs] Update bacon, bipc, boggs, bonne (proj4 5.0.0). 2018-03-09 18:55:31 +01:00
Adam Wulkiewicz
4400796fc3 [srs] Update aea, aeqd, airy, aitoff and august (proj4 5.0.0). 2018-03-09 18:20:08 +01:00
Adam Wulkiewicz
04af0a1796 [srs] Fix error in tcea projection (not removed template parameter). 2018-03-09 18:19:14 +01:00
Adam Wulkiewicz
fe2e9d2877 [srs] Add new projection error/exception codes. 2018-03-09 18:17:33 +01:00
Adam Wulkiewicz
7f3562c059 [srs] Update some of the projections (to proj4 5.0.0). 2018-03-09 02:49:39 +01:00
Adam Wulkiewicz
8e3257325b [srs] Fix igh projection (wrong variant of underlying sinu projection).
- Use spherical sinu projection instead of elliptical/spheroidal.
2018-03-07 22:54:03 +01:00
Adam Wulkiewicz
8c8d06d3a9 [srs] Fix goode projection (wrong variant of underlying sinu projection).
- Use spherical sinu projection instead of elliptical/spheroidal.
- Rearrange and simplify the code in order to properly
  initialize underlying sinu projection object requireing es = 0.
  It's possible that es = 0 should be set in spherical sinu projection
  for safety.
2018-03-07 19:08:04 +01:00
Adam Wulkiewicz
5ac66e34ca [srs] Update aeqd projection (proj4 4.9.3).
Use geodesic formulas.

Credit: Charles Karney
2018-03-07 11:17:29 +01:00
Adam Wulkiewicz
d17bf50ce8 Merge branch 'develop' into bg-prepare 2018-03-03 11:27:55 +01:00
Adam Wulkiewicz
2a2e0ac41e [doc][srs][strategies] Add/improve docs of geographic strategies and spheroid. 2018-03-02 23:22:36 +01:00
Adam Wulkiewicz
ff427c0366 [srs] Remove potentially not thread-safe strerror() call. 2018-02-24 03:43:33 +01:00
Adam Wulkiewicz
f2a0231574 Merge branch 'develop' into bg-prepare
Conflicts due to moving projections from extensions and changes in
dissolve.
2018-02-23 22:05:16 +01:00
Barend Gehrels
f4bf11b8bb [simplify] use equals_point_point instead of plain equals 2018-02-19 18:41:36 +01:00
Barend Gehrels
d561e2c6cb [simplify] process review remarks, mainly in using geometry::range instead
of the bare traits
2018-02-19 18:38:30 +01:00
Barend Gehrels
da16ae8e79 [simplify] revise solution to get opposite instead of closing area
(which fixes some issues) and do more tries (to get more output)
2018-02-18 16:54:30 +01:00
Barend Gehrels
3e53d4d456 [simplify] during review, change implementation using rotate instead of clise 2018-02-17 13:50:07 +01:00
Adam Wulkiewicz
63376f5bb6 Merge commit '224797ce6c39f8289ee3c1fa18ea7259594340bc' into bg-prepare 2018-02-14 23:39:01 +01:00
Barend Gehrels
00389227b2 [simplify] rename iterators (because iterator for out is gone) 2018-02-14 17:05:29 +01:00
Barend Gehrels
7bf4d35616 [simplify] Also remove duplicate point in inserter 2018-02-14 17:05:07 +01:00
Barend Gehrels
a5a43b155c [buffer] Remove part now responsibility of simplify 2018-02-14 15:02:22 +01:00
Barend Gehrels
2d0ba126d9 [simplify] now some bugs were solved we can relax the fraction and
omit starting point earlier
2018-02-14 15:01:05 +01:00
Barend Gehrels
8586ebf6b6 [simplify] Remove duplicate points for lines having 2 points 2018-02-14 15:00:23 +01:00
Barend Gehrels
e0c8651af8 [simplify] do not create empty polygons or interior rings when they are
simplified away
2018-02-14 15:00:07 +01:00
Barend Gehrels
51077f7003 [simplify] simplifying small polygons (e.g. triangles), get rid of the minimum
to get consistent behaviour in omitting output (otherwise triangles stay,
while larger structures can be simplified away)
2018-02-14 14:52:48 +01:00
Barend Gehrels
1ce9583b17 [simplify] fix new behaviour, if sliced it should be closed explicitly
(also to calculate correct areas). Area check with sign instead of boolean.
2018-02-14 11:55:57 +01:00
Barend Gehrels
85b6675954 Merge branch 'develop' into feature/simplify 2018-02-14 09:50:52 +01:00
Adam Wulkiewicz
696e03532f [strategy] Fix QVM matrix access in matrix_transformer. 2018-02-05 23:45:14 +01:00
Adam Wulkiewicz
f874467abd [doc][geometries] Remove std::list from bg::model::polygon's example container types. 2018-02-05 22:35:25 +01:00
Adam Wulkiewicz
16e725533f Merge branch 'develop' of github.com:boostorg/geometry into develop 2018-02-01 03:08:20 +01:00
Adam Wulkiewicz
cf49b534c2 [strategies] Fix unused parameter warning. 2018-02-01 03:08:05 +01:00
Barend Gehrels
41ca8baee7 Merge branch 'develop' into feature/remove_rescaling 2018-01-31 09:56:48 +01:00
Barend Gehrels
53ab7ced45 [simplify] update algorithm for region around closure 2018-01-31 09:55:34 +01:00
Adam Wulkiewicz
1f23119690 [srs] Implement generic is_[param] differently.
The intention is to have generic metafunctions for finding parameters that
works with all compilers. Unlike previous implementation which doesn't
work with mingw-gcc-4.1.

Replace one-per-each-parameter is_[param] metafunctions with new generic
ones.
2018-01-29 22:14:49 +01:00
Adam Wulkiewicz
0b01086d20 [srs] Fix unused parameter warnings. 2018-01-29 02:43:19 +01:00
Adam Wulkiewicz
0ce325e422 [srs] Fix extra ';' warnings. 2018-01-29 01:55:17 +01:00
Adam Wulkiewicz
f8140b1ec0 [srs] Fix fallthrough warnings with BOOST_FALLTHROUGH; 2018-01-28 13:57:23 +01:00
Adam Wulkiewicz
856e8a4f11 [srs] Fix unused parameter warnings in projections. 2018-01-28 03:28:16 +01:00
Adam Wulkiewicz
64b0472c06 [srs] Implement is_[param] metafunctions differently.
Implement one metafunction for each parameter.

Previous implementation with template template parameters and member
struct partial specializations is not compiled properly with
mingw-gcc-4.1.2.
2018-01-28 02:17:18 +01:00
Barend Gehrels
327f654623 [simplify] avoid to aggressive simplification at closing area 2018-01-27 16:14:27 +01:00
Barend Gehrels
f485fb7ebb [simplify] do not change closing area for buffer 2018-01-27 16:14:07 +01:00
Barend Gehrels
e533f624b0 [simplify] split class into two parts 2018-01-27 14:51:04 +01:00
Barend Gehrels
194f182acc [simplify] process closing area at end backwards, which results
in simpler and more efficient code
2018-01-27 14:38:17 +01:00
Barend Gehrels
5534818e0f [simplify] simplify around closing point of ring/polygons
Including unit test.
2018-01-26 17:46:14 +01:00
Barend Gehrels
8ef2eb41d0 [buffer] add necessary include for testing with no-rescale 2018-01-26 13:05:19 +01:00
Barend Gehrels
b3a6034e70 [spike] remove redundant static and fix layout 2018-01-26 13:04:56 +01:00
Barend Gehrels
d0ca69a058 [dissolve/overlay] when adding intersection point, check on collinearity
to avoid adding three points in a row. If these points were already part
of the input, then they are just added as is.
2018-01-26 12:40:35 +01:00
Barend Gehrels
e7491e76ee [dissolve] fix area_result_type which is changed in the library 2018-01-26 09:54:22 +01:00
Adam Wulkiewicz
d98640dbc5 [srs] Fix unreachable code msvc warnings in isea projection. 2018-01-25 21:08:49 +01:00
Barend Gehrels
e3cdb08a17 [segment_intersection] move preference of one segment to another to
cartesian intersection, because it was actually not used in spherical/
geographic, and because the new first version won't use it either.
2018-01-24 18:05:24 +01:00
Vissarion Fysikopoulos
b4856465c2 [algorithms] [tests] Generic box-segment distance for both cartesian and non-cartesian CS 2018-01-24 17:54:37 +02:00
Adam Wulkiewicz
8d2f00ae7b
Merge pull request #455 from awulkiew/feature/spherical_strategies
Support both RadiusType and Sphere as template parameter in spherial strategies.
2018-01-24 13:42:01 +01:00
Adam Wulkiewicz
719fe851bf [strategy] Fix strategy passing in helper function of geographic distance P/B strategy. 2018-01-23 21:12:32 +01:00
Adam Wulkiewicz
47da3da67c [srs] Fix function modifier (relace static with inline). 2018-01-23 21:11:42 +01:00
Adam Wulkiewicz
88aeb64fe5 [strategy] Take RadiusTypeOrSphere tparam in spherial strategies. 2018-01-23 18:43:56 +01:00
Adam Wulkiewicz
43a054ca99 [srs] Prefix get/set function calls with geometry:: (mingw-gcc-4.4 workaround). 2018-01-23 18:39:41 +01:00
Adam Wulkiewicz
b6c1e88378 [strategy] Fix min/max function calls with MSVC and use abs from math namespace. 2018-01-23 18:34:56 +01:00
Adam Wulkiewicz
efc9d4ac3d
Merge pull request #441 from awulkiew/feature/area_strategies
Change area strategies interface.
2018-01-22 23:05:17 +01:00
Vissarion Fysikopoulos
3d9cbd87a4 [strategies] Move generic distance pt/box and box/box strategies 2018-01-22 16:48:37 +02:00
Vissarion Fysikopoulos
edf07697e8 Merge remote-tracking branch 'origin/develop' into feature/distance_box 2018-01-22 12:59:25 +02:00
Adam Wulkiewicz
e67bf40b35 Merge branch 'develop' into feature/area_strategies 2018-01-21 02:48:29 +01:00
Adam Wulkiewicz
7d2026dd84 Merge branch 'develop' into feature/projections
Conflicts:
	include/boost/geometry/geometry.hpp
	test/Jamfile.v2
2018-01-21 01:51:04 +01:00
Adam Wulkiewicz
84675e253f [projections] Remove unused paramters and types. 2018-01-21 00:06:35 +01:00
Vissarion Fysikopoulos
57b9cd0bbc [algorithms] [tests] Fix distance segment-box for spehrical and geographic when segments is close to a box corner 2018-01-19 19:12:49 +02:00
Vissarion Fysikopoulos
a51b2dd6ac [algorithm] [test] Meridian case for segment box distance; segments left-right of box 2018-01-18 12:40:09 +02:00
Adam Wulkiewicz
20a83095a0 [doc][area] Add documentation for geographic strategy and improve example (use strategies). 2018-01-16 15:22:52 +01:00
Adam Wulkiewicz
6d0d53c41e Merge branch 'develop' into feature/area_strategies 2018-01-16 14:45:48 +01:00
Adam Wulkiewicz
5f19586ef6 [doc][densify] Add examples. 2018-01-15 19:46:55 +01:00
Adam Wulkiewicz
e8fdc21b85 Merge branch 'develop' into feature/complexify 2018-01-15 19:24:08 +01:00
Adam Wulkiewicz
1cafdc6d43 [densify] Fix default strategy type and remove wrong template parameter. 2018-01-15 19:23:43 +01:00
Adam Wulkiewicz
36d5ad9122 [length] Implement resolve_strategy stage. 2018-01-15 19:20:18 +01:00
Barend Gehrels
e01ba5d62a [dissolve] comment case in recently changed code 2018-01-12 18:09:04 +01:00
Barend Gehrels
3984a1f3d9 [buffer] add method added to visitor for dissolve 2018-01-12 17:34:32 +01:00
Barend Gehrels
4641bacc87 [dissolve/traversal] examine shortcuts over more turns to fix the last reported
cases
2018-01-12 17:29:18 +01:00
Barend Gehrels
4902e1ef25 [dissolve] remove unused headers, return void 2018-01-12 16:28:54 +01:00
Barend Gehrels
9f16a17145 [dissolve] add generated rings to output to be able to judge intermediate
results better
2018-01-12 15:29:54 +01:00
Barend Gehrels
9543438736 [dissolve] use deque i/o vector like done in overlay 2018-01-12 14:54:23 +01:00
Barend Gehrels
65060df2e5 [dissolve] remove redundant ring_type as planned, and rename out_vector
to ring_container_type, as done in overlay
2018-01-12 14:51:46 +01:00
Barend Gehrels
841641c99e [dissolve] fix case where travel information was not correct. 2018-01-12 14:45:39 +01:00
Barend Gehrels
c828dcf34b [dissolve] handle interior rings as planne. This fixes some of the remaining
issues.
2018-01-12 13:56:50 +01:00
Barend Gehrels
74741357e2 [dissolve] handle rings separately (phase 1) and iterate it in reverse
if the orientation is not correct. Exterior rings only for now, to be
continued.
This fixes all order problems and makes implementation agnostic from
orientation of input. This is reflected in the updated unit test.
2018-01-12 12:27:15 +01:00
Barend Gehrels
29e5c01017 [dissolve] split ring/polygon implementation, to be followed up 2018-01-12 11:45:37 +01:00
Barend Gehrels
2b59d7c867 [dissolve] introduce Reverse to be able to (later) apply dissolve in two directions,
not only to support cw/ccw, but more to only use one version (positive area)
instead of processing cw input which is effectively ccw.
2018-01-12 11:18:25 +01:00
Barend Gehrels
5dbe743624 [dissolve] remove method now unused 2018-01-12 10:31:59 +01:00
Barend Gehrels
5cf534bd53 [dissolve] fix the reported star cases if they would go in other direction.
In case a turn travels to itself and it is not the start turn, the other
option should be taken (even if one of them is preferred)
2018-01-12 10:11:04 +01:00
Adam Wulkiewicz
f35a4f927e [doc][densify] Add documentation for densify algorithm and strategies.
Change strategies from structs to classes as this is the requirement of
the docs generating tool.
2018-01-12 03:01:01 +01:00
Adam Wulkiewicz
e99370beaa [geometry] Include densify algorithm and strategies in top-most headers. 2018-01-11 18:31:42 +01:00
Vissarion Fysikopoulos
0fb5cabe67 [algorithms] Fix box/segment distance for segment bottom of box 2018-01-11 13:01:00 +02:00
Adam Wulkiewicz
3daa5956f9 [densify][strategies] Throw on invalid max_distance (in algorithm), assert max_distance > 0 (in strategies). 2018-01-10 23:31:53 +01:00
Adam Wulkiewicz
3dd6413478 [strategies][densify] Support arbitrary dimension in cartesian densify strategy. 2018-01-10 23:23:33 +01:00
Adam Wulkiewicz
63562cc81b [densify] Refactor densify_range, implement using iterators. Now it requires FwdRng. 2018-01-10 23:03:52 +01:00
Vissarion Fisikopoulos
3ff1887b85
Merge branch 'develop' into feature/distance_box 2018-01-10 15:34:33 +02:00
Barend Gehrels
27b15722ca [overlay] flag const conditions 2018-01-10 10:46:17 +01:00
Barend Gehrels
71f4706ebf [overlay] remove warning about shadow it 2018-01-10 10:29:31 +01:00
Adam Wulkiewicz
27c82ca4c6 [densify][strategies] Take AssignPolicy instead of RangeOut in strategies.
This allows moving range handling, e.g. push_back() calls from strategies
to algorithm.
2018-01-09 12:35:31 +01:00
Adam Wulkiewicz
b3a4beb712 [index][rtree] By default use boost::container::new_allocator in order to support move semantics in C++03 after supporting boost::container::allocator_traits. 2018-01-05 19:42:35 +01:00
Adam Wulkiewicz
1756bdcb74 [index] Rename struct to avoid 'member function changing meaning' error. 2018-01-05 02:56:59 +01:00
Adam Wulkiewicz
0608f7e383 Merge branch 'develop' of github.com:boostorg/geometry into develop 2018-01-05 00:10:30 +01:00
Adam Wulkiewicz
cedbf5e070 [index] Refactor nodes and allocators code.
Fix GCC compilation error (convert allocator type before passing into
boost::container::vector ctor).
Use boost::container::allocator_traits in weak_static nodes
implementation.
2018-01-05 00:06:39 +01:00
Barend Gehrels
04b0b89207 Merge branch 'develop' into feature/dissolve
# Conflicts:
#	include/boost/geometry/algorithms/detail/overlay/is_self_turn.hpp
2018-01-04 22:09:40 +01:00
Barend Gehrels
6b637c91c0 Merge branch 'feature/intvalid' into develop 2018-01-04 21:42:43 +01:00
Adam Wulkiewicz
be9d98faea
Merge pull request #444 from DanielaE/fix/retire-iterator.hpp
Get rid of iterator.hpp
2018-01-04 12:46:58 +01:00
Adam Wulkiewicz
355aeb4215
Merge pull request #445 from DanielaE/fix/replace-deprecated-allocator-members
Most members of std::allocate are deprecated in C++17
2018-01-04 12:44:51 +01:00
Barend Gehrels
01bbb65883 [dissolve] resolve internal overlaps by calling the code also used for
multipolygons.
TODO: this should be done for interior rings separately too
2018-01-03 18:12:31 +01:00
Barend Gehrels
5c1a9fd3c6 [enrich/dissolve] set startable false for operations between two other
turns on the same segment, and discard turns which do not have startable
operations
2018-01-03 17:49:11 +01:00
Barend Gehrels
83f3920ab9 [dissolve] using preferred operations, they are now also used to determine
the order in which turns are traversed (first preferred).
This introduces a specific traverse umbrella class for dissolve
2018-01-03 17:36:13 +01:00
Barend Gehrels
bb506996f9 [dissolve] add attribute preferred start, and use it to decide which
operation should be selected in case both is union (which is now normal
for dissolve)
2018-01-03 17:07:48 +01:00
Barend Gehrels
0dfd86f678 [dissolve] instead of fixing dead-ends only
(which was actually a workaround and too limited), all turns are
now adapted and intersection is mapped to union
(note: a next commit will work this out further)
2018-01-03 16:27:58 +01:00