Commit Graph

5259 Commits

Author SHA1 Message Date
Barend Gehrels
437be1b2b0 [overlay] fix cases with mixed operations (no testcase) 2017-06-14 10:29:15 +02:00
Barend Gehrels
604be619d9 [overlay] fix aggregations, include blocked as from 2017-06-14 10:28:47 +02:00
Barend Gehrels
412fc452da [overlay] Relax case 2, allow both continue and intersection
Fixes new #case_recursive_boxes_53
2017-06-13 20:29:25 +02:00
Barend Gehrels
31b2a89c6d [overlay] remove duplicate condition 2017-06-13 20:18:51 +02:00
Barend Gehrels
2dbc55ed7d [dissolve] fix compilation errors reported by Johan 2017-06-12 20:30:09 +02:00
Barend Gehrels
3cd4f325ec [traverse] fix another similar case #case_137_multi now with two
different outgoing arcs
2017-06-07 22:48:18 +02:00
Barend Gehrels
9993d3697f [traverse] fix cases where touching interior/exterior is approached
from two different directions, and leave in one direction
2017-06-07 22:35:44 +02:00
Barend Gehrels
ef22284629 [traverse] refactor new method to make more options 2017-06-07 22:28:57 +02:00
Barend Gehrels
bf159328e5 [traverse] fix errors in isolation detection in switch detector by
taking clusters into account
2017-06-07 15:20:35 +02:00
Barend Gehrels
db372517b4 [traverse] fix cases where two polygons both have a touching interior ring,
which is equal to itself
2017-06-07 15:06:51 +02:00
Barend Gehrels
95454e4c8e [traverse] redo, isolated MUST be checked. Checking interior/exterior ring is
then redundant again, besides that it does not work for differences.
This breaks case_134 but that must be fixed differently.

After this change, recursive_polygons test is flawless
w.r.t. intersections/unions (validity/with self turns not yet checked)
2017-06-05 17:45:51 +02:00
Barend Gehrels
c04f26bffa [overlay] pending commit, where operations are set to not startable,
they should not be added afterwards so set them like traversed
2017-06-05 16:00:11 +02:00
Barend Gehrels
bd16305a72 [overlay] remove original behaviour to discard turns colocated with blocked turns,
because this stops generating interior rings in certain configurations, and
it is, in the meantime, handled differently in cluster traversal.
Fixes cases like new case #case_recursive_boxes_51
2017-06-05 15:59:29 +02:00
Barend Gehrels
6088389338 [overlay] unset startable for closed turns 2017-06-05 15:26:08 +02:00
Barend Gehrels
e281d5e437 [overay] cleanup clusters properly 2017-06-05 15:25:03 +02:00
Barend Gehrels
0853342320 [traverse] fix #case_58_multi and #case_134_multi by verifying connected
regions in switch detector
2017-06-05 11:51:53 +02:00
Barend Gehrels
ecae306146 [traverse] generalize pattern for colocated interior rings by making
cases with multiple rings (#case_134_multi) possible. It also does
not check for isolated anymore but instead checks interior/exterior rings
and region_ids
2017-06-04 14:04:00 +02:00
Barend Gehrels
254203d06e [traverse] add visited to traversable
There is no unit test case for this change, but the robustness test
(recursive_polygons) gives 5 times less errors with this change
2017-06-04 12:15:23 +02:00
Barend Gehrels
b0cf8ffb59 [traverse] extend handling specific case of cc/ii with another variant,
now also solving #case_recursive_boxes_50
2017-06-04 11:23:42 +02:00
Barend Gehrels
463f778a36 [overlay] fix cases with two parallel interior rings, one touching
the exterior ring, by adding a special case for this. This solves
nearly all robustness (recursive_polygon) now.
2017-06-03 20:09:06 +02:00
Barend Gehrels
c051ab5724 [overlay] instead of for self-turns only, skip all discarded turns
for intersection operations
2017-05-31 11:38:52 +02:00
Barend Gehrels
16be4bbdb2 [overlay] fix new case #case_recursive_boxes_48 for self-intersections
by discarding self ii turns NOT located within another geometry
2017-05-31 11:12:57 +02:00
Barend Gehrels
00ef210f69 [overlay] Remove some redundant includes 2017-05-31 11:00:28 +02:00
Barend Gehrels
952a4e8a9c [overlay] extract discarding self-turns to separate headerfile 2017-05-31 10:59:52 +02:00
Barend Gehrels
acd364586f [overlay] handle todo-item, extract self_turn 2017-05-29 20:57:35 +02:00
Glen Fernandes
0ed359a624 Use pointer_traits.to_address instead of addressof(*p)
addressof(*p) before construct() is not well-defined, since p
does not alias storage that has an object constructed in it.
2017-05-29 14:01:51 -04:00
Barend Gehrels
d3481fccca [overlay] fix within-check for buffer by making it a specialization
instead of a if-condition
2017-05-28 17:28:51 +02:00
Barend Gehrels
c53cbe56f5 [overlay] fix cases with self-turns where interior rings are generated
within another geometry, for union
2017-05-26 22:21:10 +02:00
Barend Gehrels
7d8a46d888 [overlay] remove redundant parameter 2017-05-26 15:26:18 +02:00
Barend Gehrels
0bc28aadb8 [self_turns] fix direction - for this, an extra template parameter is required
(it cannot (yet) be derived from the geometry, because it causes is_valid
to fail)
2017-05-25 13:52:13 +02:00
Barend Gehrels
7d86bfdbf5 [overlay] simplify conditions to discard turns in enrich 2017-05-25 12:03:03 +02:00
Barend Gehrels
99c580a7b1 [overlay] For self-turns, remove exception for difference and,
like union, for intersection only keep ii self-turns
2017-05-25 11:45:46 +02:00
Adam Wulkiewicz
1a605740cc Merge pull request #397 from awulkiew/feature/relops_multi_point
Add missing relational operations for MultiPoint/Geometry
2017-05-23 13:24:19 +02:00
Adam Wulkiewicz
f6c28cebb7 Merge pull request #398 from vissarion/feature/disjoint_fix
Feature/disjoint fix
2017-05-23 13:23:58 +02:00
Barend Gehrels
52c2fde84a [self_turns] fix behaviour (correct assignment of segment_identifiers) for ccw geometries 2017-05-21 14:41:46 +02:00
Barend Gehrels
713679f0d0 [overlay] add comment 2017-05-20 17:30:52 +02:00
Barend Gehrels
0de898a004 [union] Fix select_source for self_turn, it should use multi_index 2017-05-20 15:54:57 +02:00
Adam Wulkiewicz
3c1fa1e316 [srs] Support all geometries in projection<>, add concepts and dimension check. 2017-05-19 15:14:50 +02:00
Adam Wulkiewicz
048d3fe53b [srs] Rename proj_exception to projection_exception and use BOOST_THROW_EXCEPTION.
- Rename exception
- Replace throw keyword with BOOST_THROW_EXCEPTION.
- Rethrow with BOOST_RETHROW
2017-05-17 21:39:33 +02:00
Adam Wulkiewicz
4b46351890 [srs] Add missing proj_exception codes in projections.
In some places reformat code around to match Proj4 code.
2017-05-17 20:35:23 +02:00
Adam Wulkiewicz
6002b55607 [srs] Add return statement in base_t_f::inverse to suppress warning. 2017-05-17 20:33:05 +02:00
Adam Wulkiewicz
d9cd15e94f [srs] Improve compile- and run-time error handling.
- Show static mpl assert message if static projection is not invertible.
- Throw exception in dynamic not implemented inverse projection.
- Add 3 new exception types and throw them if:
  - projection id is not specified
  - unkown projection id is passed
  - projection is not invertable
2017-05-17 17:38:25 +02:00
Adam Wulkiewicz
08500cfc18 [srs] Check validity of +n parameter in urm5 projection. 2017-05-17 01:20:10 +02:00
Adam Wulkiewicz
32a8a0a451 [srs] Fix bug with stereographic projection at equator that multiplied equatorial coordinates by 2 (after Proj4). 2017-05-17 01:18:44 +02:00
Adam Wulkiewicz
b4aab6bccd [srs] Add exceptions in robin projection and pass error code to existing ones. 2017-05-17 01:17:10 +02:00
Adam Wulkiewicz
52a6e508a8 [srs] In pj_inv() replace fabs() with bg::math::abs(). 2017-05-17 01:15:04 +02:00
Adam Wulkiewicz
02d57ff52c [srs] Differentiate between proj. not specified and unknown (different exception code/msg). 2017-05-17 01:14:04 +02:00
Adam Wulkiewicz
bbad83ea5d [srs] Fix scaling bug in ocea projection, as fixed in Proj4. 2017-05-16 15:12:41 +02:00
Adam Wulkiewicz
59f4800d79 [srs] Add missing inverse to hammer projection. 2017-05-16 01:34:51 +02:00
Adam Wulkiewicz
70d3cf13ea [srs] Support various calc. types in projections p*, q*, r*, s*, u*, v*.
Add needed constants.
2017-05-15 01:02:31 +02:00
Adam Wulkiewicz
f20f3a4a51 [srs] Support arbitrary calc. type in projections n*, o*.
Add const keywords to arguments of pj_zpoly1*.
2017-05-14 21:40:31 +02:00
Adam Wulkiewicz
6e4f66e0f4 [srs] Support various calc. types in projections k*, l*.
Add needed constants.
2017-05-14 17:57:21 +02:00
Adam Wulkiewicz
c2141ad367 [srs] Support arbitrary calc. type in projections i*, m*, t*, w*.
Add proj_exception ctor taking message.
Add needed constants.
2017-05-14 17:15:00 +02:00
Barend Gehrels
81977f07e6 [overlay] handle ii turn colocated with ux in the same way as with uu 2017-05-13 18:15:00 +02:00
Barend Gehrels
6ddcf4269b [overlay] discard uu selfturns for unions, and ii selfturns for differences 2017-05-13 17:54:24 +02:00
Barend Gehrels
1b20673a1d [intersection] fix cases with self-turns for intersections 2017-05-13 14:51:06 +02:00
Adam Wulkiewicz
086f26650e [srs] Support arbitrary calc. type in projections starting at letters a-h.
Also add/remove common constants.
2017-05-13 04:22:54 +02:00
Adam Wulkiewicz
dcb3e6096f [srs] Add math constants (function templates) used in projections to common file projects.hpp 2017-05-12 18:26:13 +02:00
Adam Wulkiewicz
ba0b7f52d0 [equals] Fix word in comment. 2017-05-12 01:04:07 +02:00
Adam Wulkiewicz
7ac3094416 [srs] Support arbitrary calc. type in all projections/impl functions. 2017-05-11 23:13:11 +02:00
Adam Wulkiewicz
12e07074bd [srs] Support any calculation type in projection parameters and several other internals. 2017-05-11 18:14:38 +02:00
Vissarion Fysikopoulos
bc63ad29af [disjoint] fix review comments 2017-05-11 11:42:22 +03:00
Adam Wulkiewicz
1dad53a4b6 [srs] Fix implicit int to bool warning in aeqd projection. 2017-05-10 21:03:20 +02:00
Adam Wulkiewicz
528270a68f [srs] Finish boostifying recently added code (add inline keywords, change macros to functions, etc.). 2017-05-10 21:02:50 +02:00
Adam Wulkiewicz
358e22d4f6 [srs] Add support for Proj4 vunits/vto_meter (vertical scaling) and lon_wrap. 2017-05-10 19:29:24 +02:00
Adam Wulkiewicz
bef6c5bb96 Merge branch 'develop' into feature/relops_multi_point
Conflicts:
	include/boost/geometry/algorithms/intersects.hpp
	include/boost/geometry/algorithms/touches.hpp
2017-05-10 15:30:27 +02:00
Barend Gehrels
2114c3f7b6 [traverse] remove unintended committed code 2017-05-10 15:04:46 +02:00
Barend Gehrels
4b524fc7ac [union] set visited in clusters, like done in intersection. But now
use rank instead of next ip, which was a TODO item.
This causes one unittest case to fail, which has another reason, its turn
in a cluster is not detected because of finalization information. That is
now solved in a different way.
2017-05-10 14:06:45 +02:00
Barend Gehrels
e1473b41a8 [union] discard all ii turns for union, like uu turns are discarded for intersection.
This is important for validity.
2017-05-10 09:49:30 +02:00
Adam Wulkiewicz
b73cff1a7c [srs] Implement transformation.
- Convert geocent.hpp and pj_transform.hpp from Proj4 to Boost.Geometry.
- Not all features are supported yet (Axes, NAD grids, Height/Z scaling
  missing).
- Add missing Proj4 error codes.
2017-05-10 04:21:12 +02:00
Adam Wulkiewicz
2a657f488a [srs] Divide projection<> into public and detail part allowing to use detail functionality in other parts of the library. 2017-05-10 04:20:38 +02:00
Adam Wulkiewicz
4be7b31d86 [srs] Store error message in proj_exception, convert pj_sterrno from Proj4 to Boost.Geometry. 2017-05-10 04:18:48 +02:00
Barend Gehrels
2ea9884ddd [validity] avoid discarded self-turn in isolated region generation,
and avoid registering uu-self-turns
This fixes the regressions in cases which were handled correctly before,
for intersection
2017-05-08 14:15:14 +02:00
Barend Gehrels
9395371beb [fix] Fix selecting rings after merge with covered_by, this is because
in this branch all the uu turns are discarded for intersections
2017-05-08 10:01:58 +02:00
Barend Gehrels
e52e2a8665 Merge branch 'develop' into feature/intvalid
# Conflicts:
#	test/algorithms/overlay/overlay_cases.hpp
#	test/algorithms/set_operations/intersection/intersection.cpp
#	test/algorithms/set_operations/union/union.cpp
2017-05-06 18:26:49 +02:00
Vissarion Fysikopoulos
4f7956d5ae [disjoint] more cleaning code 2017-05-05 15:57:36 +03:00
Vissarion Fysikopoulos
b7d5f4b849 [disjoint] cleaning code 2017-05-05 14:17:52 +03:00
Adam Wulkiewicz
d133efe071 [srs] Move projections from extensions to main part of the library.
Move files from geometry/extensions/gis/projections to geometry/srs and
geometry/srs/projections.
Move project_transformer to strategies/transform.

Change namespace of bg::projection<> to bg::srs::projection<>.

Move dms_parser from extensions/gis/geographic/strategies to
srs/projections/impl and from strategy::parse namespace to
projections::detail namespace.
2017-05-05 03:46:55 +02:00
Adam Wulkiewicz
355856a0db [relate] Add optimizations for MultiPoint/MultiPoint (sort smaller geometry first, analyse if needed). 2017-05-04 15:46:55 +02:00
Adam Wulkiewicz
4172ee31e5 [touches] Implement for MultiPoint/Geometry using relate(). 2017-05-04 15:45:25 +02:00
Adam Wulkiewicz
f2d1deef38 Merge branch 'develop' into feature/relops_multi_point 2017-05-04 13:39:21 +02:00
Adam Wulkiewicz
41b20b69e9 [crosses][relate] Implement for MultiPoint/LinearOrAreal input combinations. 2017-05-04 13:38:03 +02:00
Adam Wulkiewicz
2c3f2989fc [index] Include only the interface of equals and overlaps. 2017-05-04 13:36:05 +02:00
Adam Wulkiewicz
3b0379b089 [equals][overlaps] Divide the code into interface and implementation part. 2017-05-04 13:35:07 +02:00
Adam Wulkiewicz
105182a03b Merge pull request #386 from awulkiew/feature/geographic
Use envelope-seg and disjoint-seg/box strategies in various algorithms.
2017-05-04 13:14:38 +02:00
Vissarion Fysikopoulos
5cdae7c693 [disjoint] [vertex_longitude] Reviewing cases of disjoint, create new tests, fix corner cases 2017-05-02 18:44:26 +03:00
Adam Wulkiewicz
25d3da4b4b [relate] Add MutliPoint/SingleLorA implementation. 2017-04-27 18:38:44 +02:00
Barend Gehrels
97151eb985 Merge branch 'develop' into feature/intvalid 2017-04-27 10:41:12 +02:00
Adam Wulkiewicz
68a851b750 [intersects][disjoint] Implement algorithms for MultiPoint/Areal. 2017-04-26 19:10:29 +02:00
Adam Wulkiewicz
6eef0c6208 [within] Add small optimization in MultiPoint/LorA (check boundary only if needed). 2017-04-26 15:02:46 +02:00
Vissarion Fysikopoulos
fe1c91577f many cases working, still testing 2017-04-26 12:59:03 +03:00
Adam Wulkiewicz
289bbc6df4 [relops] Implement within and covered_by for MPt/LorA. 2017-04-26 06:19:21 +02:00
Adam Wulkiewicz
d219b00cec [strategies] Enable default within/covered_by strategy for MultiPoints. 2017-04-26 05:19:43 +02:00
Adam Wulkiewicz
300b680a49 [index] Include only relops interfaces or implementations for specific geometries (box/box). 2017-04-26 05:16:39 +02:00
Adam Wulkiewicz
51efd26ae9 [relops] Divide algorithms into interface and implementation parts.
covered_by, intersects, touches, within.
2017-04-26 04:48:54 +02:00
Adam Wulkiewicz
2f533848d6 [overlay] In follow, last_covered_by, pass linestring point instead of midpoint. 2017-04-26 04:35:23 +02:00
Adam Wulkiewicz
a1e8fd101e [overlay] Fix unused typedef in assign_parents. 2017-04-26 04:29:16 +02:00
Adam Wulkiewicz
b8e5cd55b6 [within] Fix initialization of const relate::less in multi_point_multi_point. 2017-04-26 04:25:16 +02:00
Adam Wulkiewicz
1a6446ba66 Merge branch 'develop' into feature/geographic 2017-04-25 03:48:06 +02:00
Adam Wulkiewicz
031d0c2957 [relops] Add/fix dispatches for missing PointLike/PointLike geometries combinations in covered_by, equals, within. 2017-04-24 19:46:52 +02:00
Adam Wulkiewicz
ca55981928 [strategies] Enable within/covered_by default_strategy for MultiPoints. 2017-04-24 19:43:01 +02:00
Adam Wulkiewicz
312476bfbc [projections][strategies] Update/improve project_transformer strategy.
- Implement 3 transformers:
  * project_transformer automatically choosing forward/inverse projection.
  * project_forward_transformer
  * project_inverse_transformer
- Use new projection<> interface and support the same parameters.
- Move all transform strategies into one file and put them in
  bg::strategy::transform namespace.
2017-04-23 03:48:05 +02:00
Adam Wulkiewicz
d9fe6d7cd3 [projections] Copy higher dimensions in projection<> forward/inverse. 2017-04-23 03:47:45 +02:00
Adam Wulkiewicz
fc88955d94 [projections] Revert comments to original format, broken by autoformatting. 2017-04-23 00:06:42 +02:00
Adam Wulkiewicz
ddce41f2c5 [projections] Move back the internal projections representations into bg::projections namespace from bg::projections::detail namespace. 2017-04-22 23:37:47 +02:00
Adam Wulkiewicz
29853b4b91 [projections] Change the interface (namespaces) and relocate parts of the code.
The interface:
- boost::geometry::projection<>
- boost::geometry::proj_exception
- boost::geometry::srs::dynamic
- boost::geometry::srs::proj4
- boost::geometry::srs::epsg
- boost::geometry::srs::static_proj4<>
- boost::geometry::srs::static_epsg<>
- boost::geoemtry::srs::proj::*
- boost::geometry::srs::ellps::*
2017-04-22 03:42:31 +02:00
Adam Wulkiewicz
26fcc420c4 [core][srs][geometry] Move srs::spheroid and srs::sphere from core/ to srs/ directory. 2017-04-22 02:19:27 +02:00
Adam Wulkiewicz
c6663973fd [projections] Replace point types tparams LL and XY with one CalculationType tparam.
- CalculationType is double by default.
- Integral fundamental types and float are promoted to double.
- Pass Parameters type into the internals properly - remove default tparam
  projections::parameters.
2017-04-20 17:03:34 +02:00
Barend Gehrels
7d17bd1e8a Merge branch 'develop' into feature/intvalid 2017-04-20 15:35:34 +02:00
Barend Gehrels
feae471d71 [overlay] Add missing include 2017-04-20 13:17:09 +02:00
Barend Gehrels
dfbb2604bd [sort_by_side] pass OverlayType (TODO item necessary to correctly
handle self-turns)
2017-04-20 12:50:16 +02:00
Barend Gehrels
081860e8dd [sort_by_side] fix (rare) cases where two froms arrive at a turn,
but only one leaves the next turn. This simplifies state to just a boolean.
This fixes cases like case_recursive_boxes_46 for union
2017-04-19 16:32:40 +02:00
Adam Wulkiewicz
4323322472 [projections] Remove explicit keyword from projection<> ctors to allow simpler initialization. 2017-04-18 23:07:46 +02:00
Adam Wulkiewicz
be9f31c6b8 [projections] Improve consistency of dynamic and static projections.
- Initialize default parameters of 3 projections in both static and
  dynamic versions. In static version use projection tags in conditions.
- Add missing lagrng proj. default and WGS84 ellipsoid default to make it
  consistent with the original Proj4.
- In static version initialize ellipsoid Proj4 params directly from passed
  object instead of string parameters.
- Move proj4, epsg, static_proj4 and static_epsg to parameters.hpp
- Remove projections::init() functions.
2017-04-18 23:04:12 +02:00
Adam Wulkiewicz
3089f4d1a4 [projections] In projection<> improve creation of dynamic projection and use detail::pj_init_plus() internally. 2017-04-18 18:21:05 +02:00
Adam Wulkiewicz
5ee0aed7f6 [projections] Derive proj_exception from geometry::exception and override what() function. 2017-04-18 18:19:49 +02:00
Adam Wulkiewicz
2254d869a2 [projections] Throw exception in projection<> ctor if dynamic projection is not created correctly. 2017-04-18 17:54:47 +02:00
Adam Wulkiewicz
29e059ae5d [projections] Add static ellps definitions and fix error in static proj4 projection<>. 2017-04-18 17:45:37 +02:00
Adam Wulkiewicz
02cf69fdfb [core] In radius_access change assertion to Dim < 3 for both sphere and spheroid. 2017-04-18 17:44:21 +02:00
Adam Wulkiewicz
6d478e1489 [projections] Specialize epsg_traits for all already implemented run-time EPSG codes.
- Add specializations into epsg_traits.hpp file.
- Remove specializations from proj/*.hpp files
- Add macro simplifying the specialization
- Remove Point types and Params template parameters from epsg_traits, take
  only EPSG.
- in epsg_traits define proj4 projection tag and SRS sphere/spheroid tag
- in projection<> use these to get the static projection
2017-04-18 03:50:15 +02:00
Adam Wulkiewicz
8af802f3ff [extensions][projections] Add static tags for all projections. 2017-04-18 02:45:17 +02:00
Adam Wulkiewicz
eab7a82880 [extensions][projections] Implement new projection interface.
- Use projections::projection<> as a general projection representation
  both compile-time and run-time.
- Add proj4, epsg, static_proj4, static_epsg parameters passable into
  projection<> either as ctor parameter or template parameter and
  defining type of projection and parameters.
- Don't require creation of factory or proj4 parameters explicitly in the
  code.
- In the implementation of tmerc projection add specializations of newly
  added traits for getting compile-time projection implementation from
  projection tag and SRS model.
- Derive dynamic projections from base_v<> type instead of projection<>.
2017-04-17 16:08:50 +02:00
Adam Wulkiewicz
2780c9dc28 [overlay] In select_rings/update_ring_selection use within instead of covered_by. This fixes dissolve. 2017-04-14 14:40:03 +02:00
Adam Wulkiewicz
f428b9cc8f [extensions][dissolve] Pass strategies into the overlay internals and envelope. 2017-04-14 03:59:45 +02:00
Adam Wulkiewicz
87a1a941f2 Merge branch 'develop' into feature/geographic 2017-04-14 01:39:05 +02:00
Adam Wulkiewicz
dc8ff59096 [extensions][dissolve] Add support for intersection strategy. 2017-04-14 01:07:30 +02:00
Adam Wulkiewicz
6586f6e7b7 [overlay][buffer][test] Use within/covered_by and envelope strategies.
- Pass intersection strategy into range_in_geometry and internally get
  point_in_geometry strategy.
- Add required intersection strategy passing into overlay and buffer
  internals.
- Use envelope strategy in assign_parents.
2017-04-11 00:24:21 +02:00
Adam Wulkiewicz
354ce9a376 [overlay][follow] Check covered_by with strategy. 2017-04-11 00:23:33 +02:00
Adam Wulkiewicz
02f149f012 [is_valid] Check point in polygon exterior ring with strategy. 2017-04-11 00:19:57 +02:00
Adam Wulkiewicz
e3ac044400 [equals][test] Make collect_vectors Ring-order-invariant with normalized_view. 2017-04-09 11:33:00 +02:00
Adam Wulkiewicz
657a5c8090 [equals][test] Fix collect_vectors for open Rings with closeable_view. 2017-04-09 01:46:46 +02:00
Vissarion Fysikopoulos
842a121cf6 [vertex_longitude] [test] Unit tests and corner cases for vertex_longitude formula 2017-04-07 18:07:29 +03:00
Barend Gehrels
9d13a668da Merge branch 'develop' into feature/intvalid 2017-04-05 09:51:21 +02:00
Vissarion Fysikopoulos
d02616948c [formula] [vertex_longitude] Fixing ellipsoidal formula 2017-04-04 18:03:57 +03:00
Adam Wulkiewicz
a29281d143 [strategies] Add missing const and explicit keywords. 2017-03-30 18:20:41 +02:00
Adam Wulkiewicz
8419c27f40 [overlay] Always use first point of a geometry returned by point_on_border().
- In the internals of point_on_border() get Midpoint as template parameter.
- Remove midpoint argument from point_on_border() parameters forcing to
  always return the first point.
- Add range_in_geometry() algorithm checking passed boundary point and/or
  points of a geometry for overlap with the interior/exterior of another
  geometry. This way it's possible to detect if a ring is inside or
  outside another ring even if the first point of a ring is overlapping
  the boundary of another geometry. Note tht this was also possible with
  midpoint.
- Enlarge the ring bounding box by epsilon in order to make the covered_by
  envelope check consistent with corresponding point_in_geometry check.
- Replace covered_by(Pt, Ring) with range_in_geometry() calling
  point_in_geometry().
2017-03-27 19:02:00 +02:00
Barend Gehrels
7f8cb5a1aa Merge branch 'develop' into feature/intvalid 2017-03-26 12:57:28 +02:00
Barend Gehrels
b320ddf8e6 [buffer] Fix segmentation fault for rings (start/finish ring was not called),
including new unit test
2017-03-26 12:49:48 +02:00
Barend Gehrels
20005d6e47 Merge branch 'develop' into feature/intvalid 2017-03-26 11:33:13 +02:00
Barend Gehrels
90c51c21f0 [traverse] combine conditions 2017-03-22 22:30:23 +01:00
Barend Gehrels
042b7124f8 [enrich] remove now redundant code (uu is now always discarded for intersection operations)
and change order, update comment
2017-03-22 22:29:25 +01:00
Barend Gehrels
a96b1da5cc [overlay] fix case (#recursive_boxes_45) where wrong decision was made based on a ux turn 2017-03-22 22:28:16 +01:00
Adam Wulkiewicz
e5dd98482a [algorithms] Pass envelope and disjoint-seg-box strategies into partition in disjoint, is_valid and overlay. 2017-03-22 21:02:11 +01:00
Adam Wulkiewicz
51694bfb0c [get_turns] Pass envelope strategy into sectionalize. 2017-03-22 21:00:55 +01:00
Adam Wulkiewicz
f09e33a30e [sectionalize] Support custom envelope strategy. 2017-03-22 20:58:43 +01:00
Adam Wulkiewicz
3ff1382c61 [strategies] Add envelope-seg and disjoint-seg-box getters to intersection, side and within strategies. 2017-03-22 20:57:35 +01:00
Adam Wulkiewicz
f3f312e42b [strategies][azimuth] Fix apply() function arguments types, replace CalculationType which can be void. 2017-03-22 19:43:29 +01:00
Adam Wulkiewicz
cefe1d04f7 [strategies] Add missing includes in envelope and disjoint strategies. 2017-03-22 19:41:32 +01:00
Adam Wulkiewicz
237bfdbe25 [disjoint] In Seg/Box fix the condition and replace covered_by with disjoint_point_box. 2017-03-22 19:38:34 +01:00
Barend Gehrels
16f2bcf357 [overlay] fix case where a union is traveled. As it now appears, due
to new cluster handling, all uu turns can (and should) be discarded for intersections
2017-03-22 15:10:28 +01:00
barendgehrels
ff79fe7bd0 [traverse][debug] change debug info for candidates and re-add them in cc 2017-03-22 12:08:29 +01:00
barendgehrels
273d1bf4a1 [overlay] pending commit, add strategy to self_turns 2017-03-22 11:51:51 +01:00
barendgehrels
0f9ab8b23a [traverse] Fix remaining distance, like when starting, cc should get first
turn (#mysql_23023665 in buffer).
This also fixes overriding when traverse is not possible (no testcase)
2017-03-22 11:50:36 +01:00
barendgehrels
ace8bdb7f0 [overlay] discard ii turns where two interior rings touch, for union operations.
This fixes case #80. Also, added case #105, testing that in a different way
(limiting solutions)
2017-03-18 20:17:22 +01:00
Adam Wulkiewicz
ed78fc3164 Merge pull request #384 from awulkiew/fix/throwing
Throw exceptions using BOOST_THROW_EXCEPTION.
2017-03-14 19:17:10 +01:00
Adam Wulkiewicz
7bba50172e Merge pull request #380 from vissarion/feature/disjoint_geo_new
Feature/disjoint geo new
2017-03-14 19:15:34 +01:00
Adam Wulkiewicz
0e281523c9 Merge branch 'develop' of github.com:boostorg/geometry into develop 2017-03-14 15:02:51 +01:00
Adam Wulkiewicz
4c6ccc0395 [formulas] Handle vertical geodesics in Sjoberg (intersection at the pole). 2017-03-14 15:01:37 +01:00
barendgehrels
404bd889f5 [traverse] fix case #129/rec boxes_4 by avoiding finalized operations in aggregation 2017-03-13 17:44:28 +01:00
barendgehrels
3cb3d373fb [traverse] remove unused visited_regions parameter 2017-03-13 17:29:37 +01:00
barendgehrels
f9e2119d32 Merge branch 'develop' into feature/intvalid
# Conflicts:
#	include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
#	test/algorithms/set_operations/intersection/test_intersection.hpp
2017-03-13 16:22:58 +01:00
barendgehrels
a826d5b536 [get_turns] fix: fix distance_measure 2017-03-13 16:09:18 +01:00
barendgehrels
32c422f745 [traverse] fix case #130, starting with cc, using remaining_distance 2017-03-13 15:36:13 +01:00
barendgehrels
5fbf6358bd [overlay] move get_next_turn_index to method of enrichment info, to reuse it later 2017-03-13 15:33:14 +01:00
barendgehrels
1b5fb4444e [traverse] Major commit. Avoid discarding ii turn on interior rings. Detect isolatated
regions (usually inner rings) differently: only once instead of on the
fly, and store it. Set visited in clusters for all parts of the cluster.
2017-03-13 10:52:27 +01:00
Adam Wulkiewicz
51f85b6fe2 [partition] Replace size()==0 with empty() and size()>0 with !empty(). 2017-03-12 00:04:07 +01:00
Adam Wulkiewicz
fd72a1aa16 [algorithms] Support interruption of partition().
- partition() is interrupted if visitor.apply() returns false.
- This mechanism is used instead of throwing self_ip_exception in
  1-geometry (self) get_turns implementation.
2017-03-09 05:40:20 +01:00
Adam Wulkiewicz
4e1c644563 [algorithms][io] Throw exceptions using BOOST_THROW_EXCEPTION. 2017-03-08 22:39:08 +01:00
Vissarion Fysikopoulos
207098b2ff Merging with develop 2017-03-08 18:37:11 +02:00
Vissarion Fysikopoulos
79e9857823 Merge with develop 2017-03-08 17:16:26 +02:00
Adam Wulkiewicz
d857009750 Merge branch 'develop' into bg-prepare 2017-03-08 16:00:42 +01:00
Adam Wulkiewicz
7b5db5b06b [strategies] Replace InverseFormula with FormulaPolicy in geographic strategies.
- Add strategy::andoyer, strategy::thomas and strategy::vincenty policies.
- By default use strategy::andoyer in all strategies consistently.
- Further improve the consistency of parameters by adding default
  Spheroid = srs::spheroid<double> where it's missing.
2017-03-07 20:09:37 +01:00
Adam Wulkiewicz
5985e49d2b [strategies] Rename files in order to make them more consistent across coordinate systems.
CS/algorithm_CS.hpp -> CS/algorithm.hpp
cartesian/cart_intersect.hpp -> cartesian/intersection.hpp
geographic/intersection.hpp -> geographic/intersection_elliptic.hpp
geographic/geodesic_intersection.hpp -> geographic/intersection.hpp
2017-03-07 17:52:54 +01:00
Adam Wulkiewicz
d113eb8cfd [strategies] Improve consistency of strategies.
- In every geographic strategy use the same order of template parameters:
  Formula[, Order], Spheroid, CalculationType.
- Calculate default Order based on Formula.
- Remove ExpandEpsN and LongSegment from template parameters.
- Make strategies' constructors explicit
- Rename relate_cartesian_segments to cartesian_segments,
  relate_geodesic_segments to geographic_segments,
  relate_spherical_segments to spherical_segments, etc.
- Use radius 1 by default in area::spherical strategy for backward
  compatibility.
2017-03-07 16:54:09 +01:00
Adam Wulkiewicz
95a982e492 [core] Improve accuracy of default srs::sphere radius being mean Earth's radius. 2017-03-07 16:49:25 +01:00
Adam Wulkiewicz
95bb1eacc0 Merge branch 'develop' into feature/disjoint_geo_new 2017-03-05 23:43:45 +01:00
Adam Wulkiewicz
62acebb640 [algorithms] Update doc-related description of set operations, is_simple and is_valid.
Distinguish between versions taking and not taking strategies.
2017-03-05 20:22:01 +01:00
Adam Wulkiewicz
db052113a8 [area][strategies] Update doc-related description of area() and related strategies. 2017-03-05 20:19:12 +01:00
Adam Wulkiewicz
d8513265a2 [strategies] Fix compilation errors in geodesic_intersection.
Remove static keyword from strategies getters.
Rename template parameter to avoid shadowing.
2017-03-02 19:24:05 +01:00
Adam Wulkiewicz
a06e6bbb79 [strategies] Rename strategy side::detail::by_azimuth to side::geographic. 2017-03-02 19:23:31 +01:00
Adam Wulkiewicz
6f733b64a9 [index] Add explicit modifier to dynamic_* parameters ctors. 2017-03-02 19:20:49 +01:00
Adam Wulkiewicz
bdd2d2c60c [formula] Fix errors in inverse formulas (manifesting near poles).
vincenty - fix error in formula (missing sqr)
differential_quantities - fix error in formula (wrong equation and lack of normalization)
andoyer - wrong azimuth at south pole
2017-03-02 16:54:36 +01:00
Vissarion Fysikopoulos
f67998885f [core] [disjoint] More radian_access functions for box or segment to radian_access.hpp 2017-03-01 13:44:08 +02:00
Vissarion Fysikopoulos
67759ab979 [disjoint] Fixing coordinate systems degree/radian issue 2017-03-01 13:09:23 +02:00
Adam Wulkiewicz
3f7b2ecb35 [strategies] Add area and distance strategies getters to geodesic intersection strategy.
Also fix typos.
2017-02-27 19:30:02 +01:00
Adam Wulkiewicz
98546ec1dd [strategies] Add general geographic distance strategy taking formula and use it in existing strategies. 2017-02-27 19:12:41 +01:00
Adam Wulkiewicz
0e0f432f27 Merge branch 'develop' into feature/geo_intersection2 2017-02-27 14:44:18 +01:00
Adam Wulkiewicz
447db8358b Merge pull request #381 from awulkiew/feature/setops_strategies
Strategies and variant support in set operations, is_valid and is_simple.
2017-02-27 14:35:16 +01:00
barendgehrels
5e6bb32741 Merge branch 'develop' into bg-prepare
# Conflicts:
#	extensions/test/Jamfile.v2
#	extensions/test/gis/io/wkb/read_wkb.cpp
#	extensions/test/gis/io/wkb/write_wkb.cpp
#	extensions/test/gis/latlong/cross_track.cpp
#	extensions/test/nsphere/nsphere-circle.cpp
#	include/boost/geometry/extensions/contrib/ttmath_stub.hpp
#	include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp
#	include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp
#	include/boost/geometry/extensions/gis/io/wkb/read_wkb.hpp
#	test/arithmetic/cross_product.cpp
2017-02-26 21:24:37 +01:00
Adam Wulkiewicz
54e29a5157 Merge pull request #322 from meastp/add_read_multi_wkb
Support for reading and writing Multi-geometries
2017-02-26 20:09:49 +01:00
Adam Wulkiewicz
f9d9cc2178 [relops] Alter doc comments (versions taking strategies). 2017-02-26 01:37:54 +01:00
barendgehrels
e2781e147a Merge branch 'develop' into feature/intvalid
# Conflicts:
#	include/boost/geometry/algorithms/detail/overlay/overlay.hpp
#	include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
#	include/boost/geometry/algorithms/intersects.hpp
#	include/boost/geometry/algorithms/touches.hpp
2017-02-25 20:01:08 +01:00
Adam Wulkiewicz
b03da047a8 [index] Add workaround for libstdc++ bug (gcc 4.8.2) - segfault in nth_element. 2017-02-25 18:50:13 +01:00
barendgehrels
676aa45c6c Minor changes 2017-02-22 09:40:44 +01:00
barendgehrels
caf0b9f7e9 [traverse] fix validity when two holes meet eachother and exlude an
area which should become a separate ring (#43), by passing the already visited
region_ids (which make them less local). It does not solve #35 yet.
2017-02-18 13:32:46 +01:00
barendgehrels
0d95185060 [traverse] fix cases where isolated regions have more turns in between
(cases #41/#128)
2017-02-17 16:24:52 +01:00
barendgehrels
5223efcd58 [traverse] fix operation index 2017-02-17 16:14:45 +01:00
barendgehrels
3fa70829d3 [traverse] fix bug in new code, should have been rwd.turn_index 2017-02-17 11:27:32 +01:00
Adam Wulkiewicz
682cb65f62 [equals] Use area and distance strategies in equals() TrivialCheck. 2017-02-17 05:04:03 +01:00
Adam Wulkiewicz
b3da05740a [is_valid] Add support for strategies. 2017-02-17 05:03:11 +01:00
Adam Wulkiewicz
6bd28d96e6 [is_simple] Add support for strategies. 2017-02-17 05:02:57 +01:00
Adam Wulkiewicz
6f7beaf01a [setops] Support strategies in intersection, difference, sym_difference and union_. 2017-02-17 05:00:57 +01:00
Adam Wulkiewicz
e95d85c552 [strategies] Add area and pt-pt distance strategies getters to intersection strategies. 2017-02-17 04:58:45 +01:00
Vissarion Fysikopoulos
6a2b202eb6 [disjoint] [test] Code cleaning 2017-02-16 16:43:52 +02:00
Vissarion Fysikopoulos
2ef3f99fc3 [disjoint] [test] Strategy inteface, more unit tests, code cleaning 2017-02-16 13:54:14 +02:00
Vissarion Fysikopoulos
1f952671e9 [disjoint] [test] Disjoint algorithm and tests for spherical and geographic systems 2017-02-14 23:48:08 +02:00
Vissarion Fysikopoulos
19de8148e8 [disjoint] Disjoint strategy for spherical 2017-02-11 00:35:09 +02:00
Adam Wulkiewicz
376f777f58 [strategies] Fix compilation error in spherical area strategy. 2017-02-09 16:42:08 +01:00
Adam Wulkiewicz
18a2ed317d Merge pull request #379 from vissarion/feature/fix_envelope
[envelope] [test] Fix the envelope algorithm and add corrected values to tests
2017-02-08 14:32:45 +01:00
Vissarion Fysikopoulos
410536e331 [envelope] [test] Fix the envelope algorithm and add corrected values to tests 2017-02-08 15:18:49 +02:00
Adam Wulkiewicz
7a76400754 [strategies] Store and use Spheroid model object in relate_geodesic_segments strategy. 2017-02-07 23:59:50 +01:00
Adam Wulkiewicz
40cb0f9490 Merge branch 'develop' into feature/geo_intersection2
Conflicts:
	include/boost/geometry/algorithms/detail/azimuth.hpp
	include/boost/geometry/formulas/spherical.hpp
	include/boost/geometry/strategies/spherical/intersection.hpp
	include/boost/geometry/strategies/strategies.hpp
	test/strategies/segment_intersection_sph.cpp

Also modify the interface of relate_geodesic_segments intersection
strategy - take Policy by apply() function argument.
2017-02-07 23:21:26 +01:00
Adam Wulkiewicz
98a655bf42 Merge pull request #378 from awulkiew/feature/relops_strategies
Support for strategies in relational operations.
2017-02-07 20:13:58 +01:00
Adam Wulkiewicz
fe2bdfd169 [disjoint] Rename PiGStrategy to Strategy. 2017-02-07 20:11:45 +01:00
Adam Wulkiewicz
6a1d758416 [formulas][strategies] Propagate Spheroid model from envelope strategy to vertex_latitude formula. 2017-02-07 14:22:33 +01:00
Adam Wulkiewicz
cb35d55b9e [algorithms] Add missing header in detail/azimuth. 2017-02-07 14:21:24 +01:00
Adam Wulkiewicz
98dfb5c349 [formulas] Fix std::min and std::max calls in area_formulas. 2017-02-07 14:20:34 +01:00
Adam Wulkiewicz
13199da09e [envelope] Fix return_envelope, pass missing strategy to resolve_variant:✉️:apply(). 2017-02-07 03:52:33 +01:00
Adam Wulkiewicz
99221ba09c Merge pull request #367 from vissarion/feature/envelope_expand_geo
Feature/envelope expand geo
2017-02-06 22:54:20 +01:00
Adam Wulkiewicz
4e80fab8d9 [strategies] Replace get_radius member function with free function call in geographic area strategy. 2017-02-06 13:52:02 +01:00
Vissarion Fisikopoulos
436c589f41 Merge branch 'develop' into feature/envelope_expand_geo 2017-02-02 13:41:34 +02:00
Vissarion Fysikopoulos
dbe31d9428 [envelope] Resolve conflicts 2017-02-02 13:25:56 +02:00
Adam Wulkiewicz
c277a6c99a Merge pull request #359 from vissarion/feature/area
Feature/area
2017-02-02 00:49:33 +01:00
Vissarion Fysikopoulos
cbf0dd77bf [area] Minor clean of comment 2017-02-01 20:15:42 +02:00
barendgehrels
136f65a039 [traverse] improve getting isolated regions by checking next regions 2017-02-01 16:14:54 +01:00
barendgehrels
33220370dc [traversal] fix take indicated operation 2017-02-01 13:21:28 +01:00
barendgehrels
c8fbb8120d [traverse] remove unused argument 2017-02-01 12:33:37 +01:00
barendgehrels
ec407f4c16 [traversal] move check to separate method, to be extended 2017-02-01 12:21:41 +01:00
barendgehrels
fd55383036 [traversal] work in progress, remove the district (I used temporarily)
with region used elsewhere for the same
2017-02-01 12:00:50 +01:00
barendgehrels
04f4a1de34 [traversal] fix, remove district if it returns 2017-02-01 11:52:18 +01:00
barendgehrels
d299ae23bc [traverse] pending commit, change indentation and small changes in algorithm
of isolated district detection
2017-02-01 11:51:57 +01:00
barendgehrels
cad48a5179 [traverse] remove new isolated (was unused) 2017-02-01 11:49:32 +01:00
Vissarion Fysikopoulos
fd12b69ee6 [area] Addressing comments 2017-01-31 17:55:00 +02:00
Vissarion Fysikopoulos
99c001873d [envelope] Move envelope computation back to algorithm level 2017-01-31 17:35:48 +02:00
Adam Wulkiewicz
55e30d6ad9 Merge branch 'develop' into feature/relops_strategies
Conflicts:
	test/iterators/point_iterator.cpp
2017-01-30 03:07:35 +01:00
Adam Wulkiewicz
d067073c69 [algorithms][strategies] Add missing includes, suppress warnings. 2017-01-29 13:20:05 +01:00
Adam Wulkiewicz
cd14e16b0c [buffer] Adapt buffer to the new interfaces of internal utilities.
Internals being default_strategy services, get_turns and partition.
2017-01-28 04:08:32 +01:00
Adam Wulkiewicz
c62cc56df2 [algorithms] Adapt overlay and set operations to new interfaces of internals.
Internals being default_strategy services, get_turns and partition.
2017-01-28 04:07:00 +01:00
Adam Wulkiewicz
85ea847ee1 [algorithms][strategies] Add support for strategies in relational operations.
- add overloads for all relational operations taking strategy.
- change the interface of get_turns, take strategy.
- change the interface of partition, take overlap and expand policies as
  function parameters instead of struct template parameters.
- specialize collect vectors by Side strategy and use this equals()
  optimization only if it's compatible with passed side strategy.
- move the implementation of disjoint Segment/Box from algorithm to
  strategy.
- add default_strategy service for relate, defining intersection or
  within/covered_by strategies depending on input geometries.
- add default strategy service for disjoint, defining relate or specific
  disjoint strategies.
2017-01-28 04:02:31 +01:00
Adam Wulkiewicz
569da3cc53 [strategies] Modify the interface of winding strategy and tweak within/covered_by default_strategy service.
Winding strategy now takes side strategy as template parameter and in
constructor.
default_strategy now casts geometry tags for both geometries and into more
tags so strategies may be dispatched more conveniently.
2017-01-28 03:46:28 +01:00
Adam Wulkiewicz
d70b1ce843 [strategies] Change interface of intersection strategies.
Instead of taking Policy as struct template parameter take it as apply()
method parameter.
Add members defining types of and returning point_in_geometry and side
strategies.
Make intersection strategies default within/covered_by strategies for L/L,
L/A and A/A geometries.
2017-01-28 02:40:59 +01:00
Vissarion Fysikopoulos
930719bad3 [area] Rename area strategy namespace 2017-01-27 19:41:27 +02:00
barendgehrels
ce42bd91da [traverse] change approach, remove only_turn_on_ring, replace
with assigning region_id to enrichment info, change dection of regions
for intersection operations
and handle differently (still temporarily)
2017-01-25 15:32:30 +01:00
Vissarion Fysikopoulos
d4f08cbcc3 [envelope] Move CS related computation from algorithm to strategy 2017-01-23 15:23:38 +02:00
Vissarion Fysikopoulos
021be6636d [envelope] [expand] MBR strategy for envelope and expand 2017-01-19 17:27:05 +02:00
barendgehrels
177da0d6cb Merge branch 'develop' into feature/intvalid 2017-01-18 10:07:12 +01:00
barendgehrels
8fa80c52b4 Rename op to turn_op to avoid warning 2017-01-18 10:05:56 +01:00
Vissarion Fysikopoulos
42e7a33134 [envelope] Resolve strategy stage for envelope and expand 2017-01-17 17:30:39 +02:00
barendgehrels
0e95caa36d [overlay] skip ii outgoing/returning when, after that, a cc continues.
Plus extra testcase needing this (if self-turns are considered)
2017-01-11 16:56:15 +01:00
barendgehrels
a537112403 Merge branch 'develop' into feature/intvalid 2017-01-11 10:07:41 +01:00
Adam Wulkiewicz
0421a06af5 [policies] Always use FP type for approximation in segment_ratio. 2017-01-06 00:13:01 +01:00
Adam Wulkiewicz
4a488821ab [strategies] Add missing QVM include in matrix_transformers.hpp. 2017-01-04 17:27:03 +01:00
barendgehrels
14b7e142c8 Merge branch 'develop' into feature/intvalid 2017-01-04 15:50:25 +01:00
barendgehrels
f334af7d78 [transform] rename ublas_transformer to matrix_transformer 2017-01-04 15:38:43 +01:00
barendgehrels
ecb87a434b Merge branch 'develop' into feature/intvalid 2017-01-04 12:17:57 +01:00
barendgehrels
138879adb9 [transform] use qvm instead of ublas 2017-01-04 11:55:56 +01:00
Oliver Keyes
2be2272e86 Grammar fix
Should presumably be 'too many tokens' rather than 'too much tokens'
2017-01-01 11:50:19 -08:00
barendgehrels
5113197bbd [overlay] handle self-turns (now conditionally) 2016-12-28 17:46:14 +01:00
barendgehrels
5456e8685d [overlay] take ring size into account for segment distance 2016-12-28 13:08:05 +01:00
barendgehrels
d5b14545a3 [overlay] move logic to determine origin to sort_by_side, taking
into account that there might be more turns on one ring
2016-12-28 11:44:08 +01:00
Adam Wulkiewicz
676e061978 [index] Add missing equals<> specialization in details of equal_to<>. 2016-12-28 03:44:12 +01:00
Adam Wulkiewicz
b8b1cc5c6b [index] Add missing #includes in parameters.hpp 2016-12-27 16:29:19 +01:00
Adam Wulkiewicz
c5b7468291 [relate] Fix compilation error when both geometries use different point types. 2016-12-27 15:21:24 +01:00
barendgehrels
e00ea57e58 [overlay] fix origin calculations for self-turns 2016-12-21 15:17:53 +01:00
barendgehrels
ad2a0a92f1 [overlay] add missing includes 2016-12-21 15:04:45 +01:00
barendgehrels
cb5143c96f Add new parameter to two self intersection calls 2016-12-16 18:42:02 +01:00
barendgehrels
f0dbe24754 Switch-source, if it is the same source (self-turn), always switch (at least for now) 2016-12-16 15:28:34 +01:00
barendgehrels
5cbbd05a69 Add self-turns to the turn collection (still not enabled) 2016-12-16 15:26:53 +01:00
barendgehrels
5bdbfb4c31 Add optional source_index to self_turn_points 2016-12-16 15:25:23 +01:00
Adam Wulkiewicz
88ee4250f0 [strategies] Improve robustness of geodesic intersection strategy.
Reverse segments before analysing them if needed. Make sure the segments
are going from S to N. This way the intersection point calculated by
Sjoberg's intersection formula is always the same for equal but reversed
segments. The latitude is taken into account because this way the accuracy
of result's longitudes is greater.
2016-12-11 01:37:55 +01:00
Adam Wulkiewicz
3abef7e1ea [strategies] Fix a small error on Clang. 2016-12-07 14:00:28 +01:00
Adam Wulkiewicz
b9f6bc7332 [formulas] Fix warnings on Clang. 2016-12-07 13:59:36 +01:00
barendgehrels
d865894234 Merge branch 'develop' into bg-prepare 2016-12-07 13:34:07 +01:00
barendgehrels
57250a3fdd [overlay] fix regression (duplicate polygons) due to last enhancements
in validity of intersections
2016-12-07 13:12:03 +01:00
barendgehrels
8d64bb39c2 [overlay] minor, fix indentation 2016-12-07 13:08:11 +01:00
Adam Wulkiewicz
ee63de6993 [strategies] Add geodesic_intersection geographic strategy.
The strategy use sjoberg intersection (crossing segments intersection
point) formula and chosen inverse formula (sides and distances).
2016-12-06 00:22:06 +01:00
Adam Wulkiewicz
941590b975 [core] Initialize spheroid by default with more precise WGS84 minor axis. 2016-12-06 00:21:03 +01:00
barendgehrels
9a3bb9bf45 [cleanup] remove extensions/inverse.hpp, committed by accident to master 2016-12-04 16:47:29 +01:00
barendgehrels
a6b294a648 Merge branch 'develop' into bg-prepare
# Conflicts:
#	include/boost/geometry/extensions/gis/projections/proj/healpix.hpp
#	include/boost/geometry/extensions/gis/projections/proj/isea.hpp
2016-12-04 16:42:32 +01:00
barendgehrels
809e48ae63 Merge branch 'feature/intvalid' into develop 2016-11-30 13:32:37 +01:00
barendgehrels
efecc02866 [traverse] fix certain cases to recognize starting point during intersection
in a broader context
2016-11-30 12:56:48 +01:00
Adam Wulkiewicz
3d76cde688 [util] Add/modify functions bounded() and longitude_interval_distance_signed(). 2016-11-23 17:44:34 +01:00
barendgehrels
3c58f15105 [traversal] handle non clustered ii turns using sort-by-side 2016-11-23 17:35:29 +01:00
Adam Wulkiewicz
fadd77ff7a [formulas] Improve robustness of sjoberg_intersection formula.
Handle special cases like vertical segments or intersection points behind the geodesic vertex.
Calculate starting point of approximation with Sjoberg02 spherical intersection formula.
First try to use Sjoberg02 Newton's method, if it's unable to calculate the result use more robust Sjoberg07 method.
Add the sjoberg_geodesic representation and enclose geodesic formulas inside.
Use this representation consistently in various methods in sjoberg_intersection.
2016-11-23 17:31:23 +01:00
Barend Gehrels
954bd1b847 Fix github issue #365 : duplicate symbols
Reported as https://github.com/boostorg/geometry/issues/365
2016-11-09 10:18:28 +01:00
Barend Gehrels
36dada3938 Merge branch 'develop' into bg-prepare 2016-11-09 09:36:11 +01:00
Barend Gehrels
9b7ddf85cc [overlay] avoid warning about same_multi1 which is technically redundant
because of template parameter values
2016-11-09 09:30:53 +01:00
Vissarion Fysikopoulos
3fda39ded1 [vertex latitude] Simplify formulas 2016-11-08 13:02:37 +02:00
Barend Gehrels
d2abc37625 Merge branch 'develop' into bg-prepare 2016-11-02 16:39:20 +01:00
Barend Gehrels
71d1d75835 add comment 2016-11-02 15:55:54 +01:00
Barend Gehrels
70e20ddd27 [overlay] fix some validity cases for intersection/difference 2016-11-02 15:55:30 +01:00
Barend Gehrels
794b168817 [overlay] add information about if it is the only turn on a ring, to each op (enriched) 2016-11-02 12:52:46 +01:00
Vissarion Fysikopoulos
b073703fd2 [formulas] comment out and clear some code 2016-10-27 13:57:35 +03:00
Patrick J. LoPresti
decd1dad72 Silence unused parameter warning from GCC/Clang. 2016-10-21 14:53:10 -07:00
Barend Gehrels
843ddb79bf [overlay] add all_to to ragne aggregation 2016-10-19 17:12:51 +02:00
Barend Gehrels
121db33f47 [overlay] add new algorithm to aggregate sort_by_side output per rank, using
incoming/outgoing rings. Usage of this algorithm not yet committed.
2016-10-12 17:58:26 +02:00
Barend Gehrels
c0fdfb3ceb Merge pull request #357 from norbertwenzel/std_array_point_adaptor
Add C++11 std::array point adaptor
2016-10-05 23:34:25 +02:00
Norbert Wenzel
87cc067e04 Add std::array point geometry adaptor
Copied geometries/adapted/boost_array.hpp to std_array.hpp and changed
array type. No checks for availability of std::array are done. Simply
do not include that file when there is no C++11 std::array available.
2016-10-02 12:21:17 +02:00
Adam Wulkiewicz
98d755614c [util] Add longitude_distance_directed() function calculating Lon/LonInterval distance. 2016-09-30 15:32:48 +02:00
Adam Wulkiewicz
8e1bafb0b9 [formulas] Move spherical azimuth and azimuth side code to formulas. 2016-09-30 15:31:13 +02:00
Barend Gehrels
26ae7f5bfa [validity] set is_touching for intersection too. Reverse should be done
for intersection too, but that does not work yet.
2016-09-28 15:41:01 +02:00
Barend Gehrels
9201064990 [validity] fix zone count for intersection operations 2016-09-28 12:22:52 +02:00
Vissarion Fysikopoulos
af2b0c680e [envelope] [expand] [algorithms] [test] Tests for spheroid. 2016-09-19 18:02:35 +03:00
Vissarion Fysikopoulos
dde8368bc7 [envelope] [expand] [algorithms] [test] Code cleaning and copyright info. 2016-09-19 13:52:59 +03:00
Vissarion Fysikopoulos
36af2b870f [envelope] [expand] [algorithms] [test] Envelope and expand algorithms with strategies 2016-09-19 13:37:17 +03:00
Vissarion Fysikopoulos
81e073434c [envelope] Envelope of a segment with strategies 2016-09-13 18:07:52 +03:00
Adam Wulkiewicz
c328e12e7f [formulas] Handle vertical segments and other special cases in sjoberg intersection formula. 2016-09-07 00:03:38 +02:00
Vissarion Fysikopoulos
4c787629ba [area] [formulas] Minor changes. 2016-09-06 18:31:17 +03:00
Vissarion Fysikopoulos
c9d6796b65 [area] [formulas] More accurate spherical term computation; only one azimuth computation call 2016-09-06 17:58:30 +03:00
Mats Taraldsvik
f41ec1880f [io][wkb] Implement support for writing Multi-geometries 2016-09-05 20:17:13 +02:00
Mats Taraldsvik
7555eb3ccc [io][wkb] Implement support for reading Multi-geometries
Adds support for reading Multi-geometries in the WKB data format.
2016-09-05 20:17:13 +02:00
Mats Taraldsvik
a40bbbc69c [algorithms] Added equals for MultiPoint 2016-09-05 20:17:13 +02:00
Vissarion Fysikopoulos
86fbf6a204 [formulas] [vertex_latitude] Method returns both min and max vertex latitude at once. 2016-09-02 17:40:30 +03:00
Vissarion Fysikopoulos
12d99a1827 [formulas] [vertex_latitude] Fix a typo in spehrical and add spherical tests 2016-09-02 15:01:37 +03:00
Vissarion Fysikopoulos
2ba4c0b23a [formulas] Vertex latitude in spherical using spherical_azimuth formulas 2016-09-01 17:08:15 +03:00
Vissarion Fysikopoulos
3aaef83dee [test] [formulas] [vertex_latitude] Fixes and more tests. 2016-09-01 12:17:28 +03:00
Vissarion Fysikopoulos
c74ddfd4d6 [area] Change interface; inverse formula as template template parameter 2016-08-31 18:41:48 +03:00
Barend Gehrels
0d5cf50d97 [colocations] handle todo item, use count from ranked point 2016-08-31 14:07:37 +02:00
Barend Gehrels
e3b424940c [traverse] handle ii as uu for switch_source,
this makes several intersection testcases valid,
and makes one difference case invalid
2016-08-31 13:43:59 +02:00
Vissarion Fysikopoulos
87516b0495 [test] [formulas] Tests for vertex latitude algorithm. 2016-08-31 12:47:40 +03:00
Barend Gehrels
0ece0dfc75 [intersection] remove the two passes because this is now handled before
by the traversal_switch_detector
2016-08-31 11:44:32 +02:00
Vissarion Fysikopoulos
2fdf75333e [formulas] Algorithm for vertex latitude. 2016-08-30 16:58:26 +03:00
Adam Wulkiewicz
0fb9e297ac [algorithms] Fix covered_by() Point/Box and Box/Box in geographic CS. 2016-08-27 02:33:52 +02:00
Adam Wulkiewicz
d4bcd80322 Merge branch 'develop' into feature/geo_intersection2
Conflicts:
	include/boost/geometry/strategies/spherical/intersection.hpp
	Caused by the change of the namespace concept to concepts.
2016-08-24 17:55:27 +02:00
Adam Wulkiewicz
4d9d2714c3 [strategies] Move geographic policies of ECEF intersection strategy into a separate file. 2016-08-24 17:46:58 +02:00
Adam Wulkiewicz
a97d85a31e [strategies] Make agnostic ECEF intersection strategy from spherical intersection strategy.
Implement CalcPolicies used to define the behavior of this strategy:
- great circles intersection
- great elliptic arcs intersection
- experimental elliptic arcs intersection
2016-08-24 17:03:54 +02:00
Adam Wulkiewicz
883fb13511 [formulas] Divide geographic (elliptic arcs) formulas into smaller, more reusable ones. 2016-08-24 16:51:39 +02:00
Adam Wulkiewicz
2f45b5a403 [index] Remove unnecessary includes cycle. 2016-08-22 13:41:56 +02:00
Vissarion Fysikopoulos
93b70ace53 [area] Second round of changes. Spherical area gets srs sphere as parameter and keep a constructor with radius for backward compatibility. 2016-08-19 13:58:47 +03:00
Vissarion Fysikopoulos
64725caeda [area] first round of changes 2016-08-18 14:01:26 +03:00
Vissarion Fysikopoulos
8b555cf1cd [area] LongSegment support 2016-08-17 15:06:30 +03:00
Adam Wulkiewicz
0e9603c4fd [formulas] Handle special cases (degenerated segments, parallel planes, rays missing spheroid) 2016-08-16 03:05:06 +02:00
Vissarion Fysikopoulos
d1c21baf60 merge and resolve conflicts 2016-08-15 19:38:46 +03:00
Vissarion Fysikopoulos
982c58c073 [area] [test] tests for spherical and geographic area 2016-08-15 18:48:40 +03:00
Vissarion Fysikopoulos
1a483d28c2 [area] [formulas] minor changes to improve performance 2016-08-15 12:44:31 +03:00
Adam Wulkiewicz
613fcedd7a [formulas] Add elliptic intersection and improve projected_to_surface(). 2016-08-15 04:32:37 +02:00
Adam Wulkiewicz
509cb089a5 Merge pull request #355 from awulkiew/feature/geo_intersection
Geographic formulas
2016-08-13 19:38:50 +02:00
Vissarion Fysikopoulos
62facdfe86 [area] fix accuracy (normalize sin cos) 2016-08-13 15:31:28 +03:00
Vissarion Fysikopoulos
fb092ca86d [area] maxima code; Clenshaw and Horner algorithms; fix an error (reduced length) 2016-08-12 21:58:24 +03:00
Barend Gehrels
7fc45bef3f Avoid using std::cout (unless we debug), ticket #12289 2016-08-12 10:24:50 +02:00
Barend Gehrels
d8ebd49a70 Remove warnings about operation_index, cluster_index 2016-08-12 10:08:20 +02:00
Adam Wulkiewicz
0f7a923272 Merge branch 'feature/geo_intersection' into feature/geo_intersection2 2016-08-11 18:31:32 +02:00
Adam Wulkiewicz
41346c1534 [formulas] Handle special cases, replace temporary constants.
Suppress warnings.
Improve style.
2016-08-11 17:27:25 +02:00
Adam Wulkiewicz
b30806971a [formulas] Add projected_to_surface() function calculating the intersection of 3d ray and surface of unit spheroid 2016-08-10 23:15:52 +02:00
Adam Wulkiewicz
84e3ae417a [formulas] Add projected_to_xy() function for 3d point on ellipsoid.
A function calculates the coordinates of the intersection of a line
perpendicular to the surface of ellipsoid and intersecting XY plane at
geodesic latitude angle.
2016-08-10 13:55:06 +02:00
Vissarion Fysikopoulos
31235117f4 [area] series evaluation for spherical and geographic area 2016-08-10 12:29:14 +03:00
Barend Gehrels
8b4c1da2c6 Merge branch 'develop' into bg-prepare
Conflicts:
	extensions/example/gis/projections/p03_projmap_example.cpp
	extensions/test/algorithms/dissolve.cpp
	include/boost/geometry/extensions/algebra/algorithms/assign.hpp
	include/boost/geometry/extensions/algebra/algorithms/rotation.hpp
	include/boost/geometry/extensions/algebra/algorithms/transform_geometrically.hpp
	include/boost/geometry/extensions/algebra/algorithms/translation.hpp
	include/boost/geometry/extensions/algebra/geometries/concepts/check.hpp
	include/boost/geometry/extensions/algebra/geometries/concepts/matrix_concept.hpp
	include/boost/geometry/extensions/algebra/geometries/concepts/quaternion_concept.hpp
	include/boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp
	include/boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp
	include/boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp
	include/boost/geometry/extensions/algebra/geometries/matrix.hpp
	include/boost/geometry/extensions/algebra/geometries/quaternion.hpp
	include/boost/geometry/extensions/algebra/geometries/rotation_matrix.hpp
	include/boost/geometry/extensions/algebra/geometries/rotation_quaternion.hpp
	include/boost/geometry/extensions/algebra/geometries/vector.hpp
	include/boost/geometry/extensions/algorithms/connect.hpp
	include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp
	include/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp
	include/boost/geometry/extensions/algorithms/dissolve.hpp
	include/boost/geometry/extensions/algorithms/distance_info.hpp
	include/boost/geometry/extensions/algorithms/midpoints.hpp
	include/boost/geometry/extensions/algorithms/offset.hpp
	include/boost/geometry/extensions/algorithms/parse.hpp
	include/boost/geometry/extensions/algorithms/remove_holes_if.hpp
	include/boost/geometry/extensions/algorithms/remove_marked.hpp
	include/boost/geometry/extensions/algorithms/selected.hpp
	include/boost/geometry/extensions/gis/io/veshape/write_veshape.hpp
	include/boost/geometry/extensions/nsphere/geometries/concepts/check.hpp
	include/boost/geometry/extensions/nsphere/geometries/concepts/nsphere_concept.hpp
	include/boost/geometry/extensions/nsphere/geometries/nsphere.hpp
2016-08-10 10:06:50 +02:00
Barend Gehrels
3ce8872b68 [traverse] remove uused type warning 2016-08-10 09:54:57 +02:00
Adam Wulkiewicz
65bb0dcb41 [formulas] Add geo_to_cart3d() calculating north and east vectors together with converted point. 2016-08-09 21:02:54 +02:00
Adam Wulkiewicz
9a63204ac8 [formulas] Add eccentricity_sqr() and geo<->cart3d conversions. 2016-08-06 13:48:15 +02:00
Adam Wulkiewicz
5868367628 [formulas] Move flattening() from algorithms/detail to formulas. 2016-08-06 13:45:59 +02:00
Barend Gehrels
25dbd863e1 Merge pull request #353 from jhunold/set_type
Fix int vs. signed_size_type mismatch
2016-08-03 08:18:13 +02:00
Adam Wulkiewicz
4524125c7f [formulas] Suppress unused variable warnings. 2016-08-02 21:53:30 +02:00
Vissarion Fysikopoulos
597efb93e5 [area] functional functions for spherical and geographic area 2016-08-02 18:15:51 +03:00
Adam Wulkiewicz
640e91c96a [formulas] Fix and improve accuracy of thomas_direct formula.
Handle special case of azimuth12 in {0, -180, 180} deg.
If |azimuth12| > pi flip the geodesic vertically to keep the azimuth
closer to 0.
Tests showed that if azimuth12 is close to 180 the accuracy is low.
2016-08-02 16:44:19 +02:00
Adam Wulkiewicz
fc1b50b6ef [formulas] Add geographic segments intersection formula using spheroidal gnomonic projection. 2016-07-31 02:48:05 +02:00
Adam Wulkiewicz
39ea7f4bc8 [formulas] Handle geodesics lying on equator in Thomas direct. 2016-07-30 04:20:13 +02:00
Adam Wulkiewicz
2a426d2211 [formulas] Handle segments lying on equator in Sjoberg's intersection. 2016-07-30 04:16:40 +02:00
Adam Wulkiewicz
36f64790df [formulas] Improve diff quantities formula.
Expand integral to 3rd order.
Take Order as template parameter.
Implement 2 expansions: in f and in e'^2.
2016-07-29 20:55:38 +02:00
Adam Wulkiewicz
154fc83814 [formulas] Add Sjoberg's geodesics' intersection formula. 2016-07-28 01:59:27 +02:00
Barend Gehrels
f8d4abbef5 [doc] fix doxygen warning, document clusters parameter 2016-07-27 18:12:29 +02:00
Barend Gehrels
3e4396fc23 [colocations] remove unused type 2016-07-27 17:39:51 +02:00
Barend Gehrels
77afac2e15 Make double the default type for SVG svg-point-types (SVG supports floating point) 2016-07-27 17:05:01 +02:00
Barend Gehrels
d3e572ede3 Rename namespace concept to concepts, because concept is a new keyword 2016-07-27 15:51:28 +02:00
Jürgen Hunold
8ac1d499a7 Fix int vs. signed_size_type mismatch
Introduced in f5b4e4a9fa
2016-07-26 08:48:14 +02:00
Barend Gehrels
912c263dbb [dissolve] take the dissolve overlay type (which is neater, but
for the rest does not change anything for dissolve yet)
2016-07-20 17:31:20 +02:00
Barend Gehrels
ae2a127e91 [dissolve] fix compilation after several changes in overlay implementation 2016-07-20 16:54:06 +02:00
Barend Gehrels
bd2e08ce1f [debug] add info about switch result 2016-07-20 10:37:18 +02:00
Barend Gehrels
5ec0bc52d4 [colocations] handle exception for difference in another way 2016-07-20 10:35:36 +02:00
Vissarion Fysikopoulos
9e3f1c6982 remove files to resilve conflict 2016-07-18 13:33:10 +03:00
Vissarion Fysikopoulos
271f427bde [area] formulas for spherical and geographic areas 2016-07-18 12:03:26 +03:00
Adam Wulkiewicz
50d9fe37d8 [formulas] Add thomas_direct and move result_direct into separate file. 2016-07-15 03:05:02 +02:00
Adam Wulkiewicz
86932c34e2 [formulas] Fix error in ellipsoidal gnomonic projection (switched lon and lat). 2016-07-15 03:03:58 +02:00
Adam Wulkiewicz
1d8938d53f [formulas] Add ellipsoidal gnomonic projection.
The projection was proposed by C.F.F. Karney in "Algorithms for geodesics".
On ellipsoid of revolution (spheroid).

The projection takes geodesic inverse and direct formulas used internally
as template parameters.
2016-07-14 20:56:07 +02:00
Adam Wulkiewicz
a31669b958 [formulas] Add calculation of differential quantities to vincenty_direct. 2016-07-14 20:51:48 +02:00
Adam Wulkiewicz
3b0c885575 [formulas] Add and use new differential_quantities<...>::apply() overload. 2016-07-14 18:03:24 +02:00
Adam Wulkiewicz
6818ad7bae [formulas] Enable 2nd order approximation components in thomas_inverse. 2016-07-14 17:54:55 +02:00
Adam Wulkiewicz
ca1a911576 [formulas][strategies] Move formulas from algorithms/detail to formulas directory. 2016-07-14 02:04:00 +02:00
Adam Wulkiewicz
08ca335416 [strategies] Use new bg::formula namespace. 2016-07-14 00:57:54 +02:00
Adam Wulkiewicz
1244ec6a09 [formulas] Add results into vincenty direct and inverse.
Add reverse azimuth to vincenty_direct.
Add reduced length and geodesic scale to vincenty_inverse.

Change the namespace containing direct and inverse formulas from bg::detail to bg::formula.
Change the name of inverse_differential_quantities to differential_quantities.
2016-07-14 00:53:17 +02:00
Barend Gehrels
e51512d9cd [buffer] fix compilation by adding specialization for pointorder on buffered ring collections 2016-07-13 10:40:14 +02:00
Adam Wulkiewicz
3ac8b12d20 [formulas] Add reverse azimuth, reduced length and geodesic scale calc in vincenty inverse. 2016-07-09 04:41:09 +02:00
Adam Wulkiewicz
c8a1e75570 [formulas] Add reverse azimuth, reduced length and geodesic scale calc in andoyer and thomas inverse. 2016-07-08 16:04:33 +02:00
Vissarion Fysikopoulos
3a2ecb68c1 [area] trapezoidal strategy and some fixes for huiller 2016-07-08 11:34:55 +03:00
Barend Gehrels
389887eaaa [colocations] fix the issue for ccw 2016-07-06 14:25:30 +02:00
Barend Gehrels
08f87517b7 [colocations] also discard interior-ring turns with a ux 2016-07-06 13:31:11 +02:00
Barend Gehrels
ff330e364a Merge branch 'develop' into feature/cluster_touch 2016-07-06 12:30:50 +02:00
Barend Gehrels
cacb8c4af5 [buffer] discard turns instead of setting them to blocked, because that
might discard valid turns during the colocation check
2016-07-06 12:29:10 +02:00
Barend Gehrels
d62705303a [overlay] minor debug addition 2016-07-06 12:01:24 +02:00
Barend Gehrels
b46805107b Merge branch 'develop' into feature/cluster_touch
Conflicts:
	include/boost/geometry/algorithms/detail/overlay/handle_touch.hpp
	test/algorithms/overlay/Jamfile.v2
	test/algorithms/set_operations/difference/difference.cpp
	test/algorithms/set_operations/union/union.cpp
2016-06-29 13:18:51 +02:00
Barend Gehrels
5317769686 [traverse] skip/fix switching decision for uu-turns in buffer, where (for deflate)
region approach does not work.
This might result in invalid polygons, but keeping it might result in
incorrect output
2016-06-29 13:07:03 +02:00
Barend Gehrels
a7a86f63bd [traverse] replace member variable by type for buffer 2016-06-29 13:05:58 +02:00
Barend Gehrels
2d0a00fb72 [overlay] add overlay_buffer (to be splitted into inflate/deflate), pass
it to traverse, add metafunction to convert from overlay_type to operation_type
2016-06-29 12:51:49 +02:00
Barend Gehrels
9d78bc6c2d [traverse] add toto comment 2016-06-29 11:51:05 +02:00
Barend Gehrels
f5b4e4a9fa [traverse] extract propagation of regions to a separate method
and other minor refactoring
2016-06-29 11:50:45 +02:00
Barend Gehrels
1033a77205 [colocations] make implementation/exception for difference (Reverse) 2016-06-29 11:47:37 +02:00
Adam Wulkiewicz
4fd9329305 [geometry] Change #include's filename in geometry.hpp 2016-06-23 15:08:35 +02:00
Adam Wulkiewicz
9f1b921368 Merge pull request #352 from awulkiew/feature/svg_variant
Add variant support for SVG
2016-06-23 14:36:29 +02:00
Barend Gehrels
0879dccc81 [traversal] handle clustered turns with interior/exterior touching point by
discarding those turn_points (because detecting that in cluster or switch
and adapt behaviour is way more complex)
2016-06-22 18:44:17 +02:00
Adam Wulkiewicz
7ec2706d50 [index] Fix invalid bounds check for contains() predicate. 2016-06-21 22:11:17 +02:00
Adam Wulkiewicz
8147014095 Merge branch 'develop' into feature/sph_seg_inters
Conflicts:
	test/algorithms/overlay/overlay_cases.hpp
2016-06-21 16:53:33 +02:00
Adam Wulkiewicz
2442cdd1e3 [algorithms][detail] Fix compile error in azimuth() using vincenty formula. 2016-06-20 02:49:01 +02:00
Adam Wulkiewicz
bc56e81701 [io][svg] Add variant support for SVG writer.
Rename the file write_svg.hpp to write.hpp for consistency with other IOs.
Move dispatches for multi geometries to write.hpp.
Leave the old files for backward compatibility.
2016-06-15 15:34:30 +01:00
Adam Wulkiewicz
819919c913 Merge branch 'develop' into feature/sph_seg_inters
Conflicts:
	include/boost/geometry/strategies/cartesian/cart_intersect.hpp
2016-06-13 09:50:06 +01:00
Adam Wulkiewicz
a529c3d73c Merge pull request #351 from awulkiew/fix/cart_intersect_different_points
Fix/cart intersect for different RobustPoint types
2016-06-13 10:25:47 +02:00
Barend Gehrels
3d5906f1e8 [traversal] revised switch detector because could not get previous approach
working for the last cases and for newly created connected interior rings. The new approach is much simpler and based
on regions (connected rings, connected via interiors) and works for almost
all cases including newly created connected interiors. Last cases still to
be checked though.

It does not traverse through turns, but instead navigates through rings
2016-06-08 14:53:49 +02:00
Adam Wulkiewicz
54de9f96a1 [strategies] Support different RobustPoint types. 2016-06-06 21:14:00 +02:00
Norbert Wenzel
49dd3bb627 Remove extraneous semicolon 2016-06-05 15:40:27 +02:00
Adam Wulkiewicz
203e980c93 [strategies] In spherical intersection check normals dot product result only if needed. 2016-06-03 02:06:09 +02:00
Adam Wulkiewicz
d732fd575c [equals] Support non-cartesian CSes in collect_vectors() and equals() variants using this function. 2016-06-03 01:53:43 +02:00
Barend Gehrels
421be3ca7f [test] make the input of a dozen of testcases valid 2016-06-01 13:35:43 +02:00
Barend Gehrels
1b5efbaeb7 [traverse] fix switch cases on first visit by extracting that code
to separate method and call it twice
2016-06-01 12:36:08 +02:00
Barend Gehrels
f62503c2d4 [traverse] implement zones in traversal switch detections 2016-06-01 10:34:00 +02:00
Adam Wulkiewicz
92c134a378 Merge pull request #347 from plopresti/warnings
Silence unused parameter warnings (GCC/Clang -Wextra).
2016-05-28 23:47:38 +02:00
Adam Wulkiewicz
080a545cf5 [equals] Support Mpoly/Ring combination. 2016-05-28 14:06:25 +02:00
Adam Wulkiewicz
56730cea69 [touches] Support missing geometry combinations (Areal/Linear). 2016-05-26 22:42:28 +02:00
Adam Wulkiewicz
86a17004ad [policies] Increase the segment_ratio approximation equal distance threshold. 2016-05-20 00:15:57 +02:00
Adam Wulkiewicz
9a3b80cdba [strategies][policies] If the IP is at segment's endpoint assign the original endpoint. 2016-05-20 00:15:11 +02:00
Barend Gehrels
fd5ee4a9cc [sort_by_side] add zone and zone detection (a zone is an area between
open spaces in a clustered uu turn)
2016-05-18 15:01:21 +02:00
Barend Gehrels
c278bdec69 [sort_by_side] rename also counts to align with same properties in
turn_info
2016-05-18 13:06:00 +02:00
Barend Gehrels
2af29c96c0 [sort_by_side] rename before extending structure 2016-05-18 12:59:49 +02:00
Barend Gehrels
dc63848782 [traverse] check other ring while determining switches 2016-05-18 12:20:17 +02:00
Barend Gehrels
1d273e223b [traverse] touch detection for clusters, implemented partly.
This still causes some regressions and fixes other (about equally amount) cases
2016-05-11 14:09:03 +02:00
Barend Gehrels
65f0c8cb1a [buffer] fix compilation after recent change to cluster_info 2016-05-05 12:50:37 +02:00
Barend Gehrels
1e99b1adf9 [traverse] use switch_source in clusters 2016-05-05 12:25:20 +02:00
Barend Gehrels
378e266bc3 [cluster] move open_count to cluster_info itself to avoid calculating
it multiple times. Rename assign_startable... to gather_cluster_properties
2016-04-27 14:27:39 +02:00
Barend Gehrels
258183d7aa [traverse] move counting open spaces to sort_by_side structure 2016-04-27 14:18:47 +02:00
Barend Gehrels
0ec737c6a2 [cluster] set switch_source but don't yet use it 2016-04-27 13:57:57 +02:00
Barend Gehrels
a2a0586abf [cluster] instead of a plain set, cluster info is now moved to a separate
structure, and a switch_source is added (not yet used)
2016-04-27 13:20:00 +02:00
Barend Gehrels
df9a97dea8 [traverse] enhance validity by checking touching (uu or combined turns creating a touch)
in clusters.
2016-04-27 11:39:40 +02:00
Barend Gehrels
5178c4e241 [traverse] rename method with duplicate name 2016-04-27 11:23:27 +02:00
Adam Wulkiewicz
eb8219e152 [sectionalize] In non-cartesian CSes calculate section box using segments. 2016-04-24 03:18:50 +02:00
Adam Wulkiewicz
c241d51bc4 [get_turns][relate] Use default side strategy for each CS.
Previously side_by_triangle was used in all CSes since there were also
only one, cartesan relate_cartesian_segments intersection strategy.
2016-04-22 17:41:03 +02:00
Adam Wulkiewicz
cf4cf03ff8 [strategies] Remove unused parameters in relate_spherical_segments intersection strategy. 2016-04-22 17:40:19 +02:00
Adam Wulkiewicz
e377bf3a9f [strategies] Fix constant and add missing apply() overload in relate_spherical_segments strategy. 2016-04-21 01:07:21 +02:00
Adam Wulkiewicz
5cd01e087c Merge branch 'develop' into feature/sph_seg_inters 2016-04-20 17:36:43 +02:00
Barend Gehrels
950c2644e5 [traverse] reimplement touch the same way as traversal, but don't create rings
there but detect source-switching

This fixes several touching-cases (clusters with uu not yet handled)
2016-04-20 14:13:09 +02:00
Barend Gehrels
7e35cdc1c8 [handle_touch] rename to traversal_switch_detector 2016-04-20 14:05:29 +02:00
Barend Gehrels
88d83634cb Merge branch 'develop' into bg-prepare 2016-04-15 19:41:47 +02:00
Patrick J. LoPresti
823af75c25 Silence unused parameter warnings (GCC/Clang -Wextra). 2016-04-13 15:01:03 -07:00
Barend Gehrels
01d24f0ae7 [traverse] split more into a traversal creating rings, and a base class
which will be used later from a traversal determing uu switch properties
2016-04-13 13:57:53 +02:00
Barend Gehrels
87f194d233 [traverse] extract traversal class to separate file 2016-04-13 13:21:55 +02:00
Barend Gehrels
c9a2dc0769 [traverse] extract functionality to separate method 2016-04-13 10:57:20 +02:00
Barend Gehrels
62bdbbadf7 Merge branch 'develop' into feature/cluster_touch 2016-04-13 10:33:42 +02:00
Barend Gehrels
ee6167d07e [overlay] remove obsolete condition, giving warning on on systems,
in 'move'  method
2016-04-13 10:31:56 +02:00
Adam Wulkiewicz
83b4473ad3 [algorithms][strategies][index][extension] Enable spherical intersection strategy.
Rename strategy_intersection (containing intersection and side strategies)
to intersection_strategies.

Rename strategies/intersection.hpp containing intersection_strategies
implementation to strategies/intersection_strategies.hpp

Add new strategies/intersection.hpp and implement
intersection::services::default_strategy there.

Add specializations of intersection::services::default_strategy for
cartesian_tag system for relate_cartesian_segments strategy and for
spherical_equatorial_tag and geographic_tag for relate_spherical_segments
strategy.

Use the intersection::services::default_strategy in
intersection_strategies.

Also fix a warning in relate_spherical_segments strategy.
2016-04-12 03:19:57 +02:00
Adam Wulkiewicz
d13c2db139 [strategies] Improve spherical intersection strategy.
Make sure that for crossing segments the resulting intersection point and
distances ratios are consistent with sides.
2016-04-11 20:08:40 +02:00
Barend Gehrels
fdfc474fa1 [traverse] make is-buffer a member variable and don' t pass point to
select_turn_from_cluster, but use the originating segment for it
2016-04-06 21:40:23 +02:00
Barend Gehrels
55a61bee55 [traverse] rename seg_id and don't pass it at main level 2016-04-06 20:11:31 +02:00
Barend Gehrels
2163564d29 [traverse] extract selection of next turn-index to separate method 2016-04-06 14:24:31 +02:00
Barend Gehrels
f19af89712 [traverse] minor, make const 2016-04-06 14:22:34 +02:00
Barend Gehrels
cfe67d11ab [traverse] another small tweak. At the point after both_finished, now,
a uu-turn always returns in a switch in select_operation
2016-04-06 11:11:15 +02:00
Barend Gehrels
70a3d8341c [traverse] change order in traversal 2016-04-06 11:02:00 +02:00
Barend Gehrels
afd007ef85 [traverse] split select_operation on higher level between cc/non cc 2016-04-06 10:46:45 +02:00
Barend Gehrels
94755117b3 [traverse] extract functionality from select_operation and make it const 2016-04-06 10:36:44 +02:00
Barend Gehrels
7fee72257d [traverse] split condition to cc / non cc 2016-04-06 10:17:31 +02:00
Barend Gehrels
c8fd07fd6f [traverse] add is_visited is separate method to later tweak this behaviour 2016-04-06 09:55:38 +02:00
Barend Gehrels
558e69d717 [traverse] move block upwards (move only) 2016-04-06 09:46:47 +02:00
Barend Gehrels
cfa0c184f8 Merge branch 'develop' into feature/cluster_touch 2016-04-06 09:38:08 +02:00
Adam Wulkiewicz
ba1e487a68 Merge branch 'develop' into feature/sph_seg_inters 2016-04-05 21:04:17 +02:00
Adam Wulkiewicz
ef6861ad37 [math] Add missing include. 2016-04-05 19:17:41 +02:00
Adam Wulkiewicz
1cf0db5e68 [envelope] Use the original units in the implementation for Segment when possible. 2016-04-05 01:07:29 +02:00
Adam Wulkiewicz
88c49a9c7a [math] Add math::as_radian and math::from_radian utilities. 2016-04-05 00:56:37 +02:00
Adam Wulkiewicz
3b605afaa7 [envelope] Fix envelope for specific cases of spherical Segments.
Remove invalid assertions failing for short segments (ticket 12106).
Ensure MIN <= MAX for segments where difference of coordinates is lesser than machine epsilon by replacing comparisons using epsilon with strict operator calls.
2016-04-03 02:25:06 +02:00
Barend Gehrels
d653ae19c7 Merge branch 'develop' into bg-prepare 2016-04-02 14:23:46 +02:00
Adam Wulkiewicz
bc9655ba0b [strategies] Improve robustness of segments intersection strategy.
For intersection points near the endpoints check the endpoints explicitly.
Still small precision in some cases for crossing (i) case.

Use newly added spherical formulas instead of the ones implemented
internally in this strategy.
2016-03-31 04:24:49 +02:00
Adam Wulkiewicz
b901b32811 [formulas] Add spherical_equatorial<->cartesian3d conversions and spherical side util. 2016-03-31 04:22:44 +02:00
Barend Gehrels
c7ea07dfb9 [traverse] fix turn index, it should not be next turn but current turn index.
It is not necessary to port this back to 1.61, because turn is
currently only used determining a union and any turn will do
2016-03-30 13:03:35 +02:00
Adam Wulkiewicz
9401406b6e [strategies] Improve the robustness of relate_spherical_segments strategy.
Normalize intersection points.
If IP is close to an endpoint explicitly compare the original points.
Use consistent ratios for special cases of collinear segments.
2016-03-26 03:23:50 +01:00
Barend Gehrels
b1cd00eea4 Merge branch 'develop' into bg-prepare
Conflicts:
	include/boost/geometry/extensions/gis/geographic/strategies/distance_cross_track.hpp
2016-03-24 21:37:57 +01:00
Adam Wulkiewicz
6e1a76dfc8 [strategy] Implement spherical Segment/Segment intersection strategy.
Ignoring robustness policy.
2016-03-24 04:05:57 +01:00
Adam Wulkiewicz
c3249735cd [arithmetic][extensions] Move cross_product from extensions and change the arguments. 2016-03-24 04:04:33 +01:00
Adam Wulkiewicz
dee3d1d97d [strategies][policies] Move segment_intersection_info to intersection strategy.
In order to implement CS-specific segment_intersection_info picking
segments and assigning points differently for each CS.
2016-03-24 04:00:11 +01:00
Barend Gehrels
85e0755ccd [traverse][fix] use two passes, in first pass avoid uu turns to get
the interior rings right at starting points. Second pass use uu, but
only switch source if there are only uu turns found. This fixes most
of the simple cases (complex cases can still go wrong)
2016-03-23 13:25:30 +01:00
Barend Gehrels
7186c46f02 [traverse] split new method iterate into two parts 2016-03-23 12:09:12 +01:00
Barend Gehrels
999f3c96a8 [traverse] move iteration to traversal class, to later split it more
and reuse it
2016-03-23 12:00:08 +01:00
Barend Gehrels
2db89e5985 Merge branch 'develop' of https://github.com/boostorg/geometry into develop 2016-03-16 17:54:56 +01:00
Barend Gehrels
588d102b19 [union] same solution as for intersection should be applied for union,
but not in case of uu or similar
2016-03-16 17:54:03 +01:00
Adam Wulkiewicz
0e83cbce5d [util] Add missing include (range_reference). 2016-03-16 16:22:53 +01:00
Adam Wulkiewicz
5c3b606dd4 Merge branch 'develop' of github.com:boostorg/geometry into develop 2016-03-16 16:09:19 +01:00
Adam Wulkiewicz
75ad78a21c [core] Refactor the includes, remove unneeded dependencies. 2016-03-16 16:09:02 +01:00
Barend Gehrels
7d3d0dd69f [traverse] revise last weeks fix, make it more general. It should just
skip finalized arcs. This fixes the robustness test almost completely
2016-03-16 14:46:05 +01:00
Barend Gehrels
c9b9c6950f [traverse] merge method calls 2016-03-16 12:08:13 +01:00
Barend Gehrels
b468a369e8 [traverse] remove unintentionally committed extra debug info 2016-03-16 12:07:35 +01:00
Adam Wulkiewicz
2f1f29acb6 [core] Add missing include (type_traits). 2016-03-16 04:26:54 +01:00
Adam Wulkiewicz
54fcaf8273 [extensions] Cleanup include (type_traits). 2016-03-16 01:19:39 +01:00
Adam Wulkiewicz
3a688340dd [io] Cleanup includes (type_traits, range). 2016-03-16 01:19:13 +01:00
Adam Wulkiewicz
fbf5bcd3f3 [policies] Cleanup includes (type_traits). 2016-03-16 01:18:40 +01:00
Adam Wulkiewicz
6208fd9556 [core] Cleanup includes (type_traits, mpl). 2016-03-16 01:18:00 +01:00
Adam Wulkiewicz
ad916f108d [strategies] Cleanup includes (type_traits, mpl). 2016-03-16 01:17:02 +01:00
Adam Wulkiewicz
b791e1eede [algorithms] Cleanup includes (type_traits, range). 2016-03-16 01:16:16 +01:00
Adam Wulkiewicz
e79b50c60d [util] Cleanup includes (type_traits, range). 2016-03-16 01:15:21 +01:00
Barend Gehrels
61a9b3e8e6 Merge branch 'develop' into bg-prepare (before branch closing)
Conflicts:
	include/boost/geometry/algorithms/detail/overlay/traverse.hpp
	test/algorithms/overlay/multi_overlay_cases.hpp
	test/algorithms/set_operations/intersection/intersection_multi.cpp
2016-03-09 18:08:54 +01:00
Adam Wulkiewicz
3ba3a76263 Merge pull request #345 from awulkiew/feature/xxx_in_box
Point/Box and Box/Box spatial relations in non-cartesian coordinate systems.
2016-03-09 17:50:28 +01:00
Adam Wulkiewicz
016dc66a68 [strategies] Refactor non-cartesian box_in_box and point_in_box (guidelines, avoiding duplication). 2016-03-09 17:07:08 +01:00
Adam Wulkiewicz
fa300f4089 [disjoint] Refactor non-cartesian box_box implementation (guidelines, avoiding duplication). 2016-03-09 17:06:25 +01:00
Adam Wulkiewicz
65cc553e31 [util] Add math::longitude_distance_signed and math::longitude_distance_unsigned functions. 2016-03-09 17:05:22 +01:00
Barend Gehrels
5383c24b34 [traverse][cluster] fix cases where it selected wrong arc at cluster,
a pseudo interior ring
2016-03-09 11:51:12 +01:00
Adam Wulkiewicz
4444357697 [disjoint] Support non-cartesian CSes for Pt/Box and Box/Box.
For Point/Box use part of the implementation of point_in_box covered_by
strategy.
2016-03-09 04:25:02 +01:00
Adam Wulkiewicz
8f14bf15c0 [strategies] In point_in_box support non-cartesian CSes and make this strategy it default.
The reason is that width of a Box may be greater than 180 deg. Side
strategy won't give the correct result in that case. For edges greater
than 180 deg the result of a side calculation is the opposite to expected.
2016-03-09 04:21:39 +01:00
Adam Wulkiewicz
97fae7d1dd [strategies] Remove unneeded default_strtegy specializations for box_in_box strategy. 2016-03-09 04:20:10 +01:00
Adam Wulkiewicz
62eaf3a24d [strategies] In ssf strategy check result WRT epsilon. 2016-03-08 14:46:20 +01:00
Adam Wulkiewicz
d04acacc74 [strategies] Support non-cartesian CSes in box_in_box strategy. 2016-03-08 04:38:48 +01:00
Adam Wulkiewicz
183d32f2e3 [strategies] In winding strategy use normalize_longitude() to avoid using dummy argument to normalize_spheroidal_coordinates(). 2016-03-08 04:32:49 +01:00
Adam Wulkiewicz
49e90b204b [util] Add normalize_longitude() function. 2016-03-08 04:31:20 +01:00
Adam Wulkiewicz
b5250287f6 [relate] Update copyright info. 2016-03-07 03:28:52 +01:00
Adam Wulkiewicz
a9ea6dcd48 [relate] Remove unused/broken ctors of result handlers. 2016-03-07 03:23:28 +01:00
Adam Wulkiewicz
175496f4f5 Merge pull request #343 from awulkiew/fix/winding
Fix winding strategy for spherical and geographic system.
2016-03-06 22:45:47 +01:00
Adam Wulkiewicz
463a085698 Merge pull request #341 from awulkiew/fix/rescale_policy
Enable rescale policy only in cartesian coordinate system.
2016-03-06 22:41:39 +01:00
Adam Wulkiewicz
a0f3058910 [winding][within] Fix winding strategy for some special cases near poles. 2016-03-03 15:43:59 +01:00
Adam Wulkiewicz
a64e23b64d [within][winding] Support special cases (poles).
Segments traversing poles, segment endpoints on poles, point on pole.
2016-03-03 04:18:30 +01:00
Adam Wulkiewicz
9617f99513 [buffer] Adjust the buffer WRT recent changes in winding strategy.
In order to check if a point is inside rings buffer instead of calling
within() has optimization manually checking the sides of monotonous
sections in some cases. Since now the winding strategy scans X-dimension
the dimension used in optimization must also be X.
2016-03-03 01:21:03 +01:00
Adam Wulkiewicz
7e26469fb1 [strategies][within] Fix winding strategy for non-cartesian CS.
E.g. in spherical CS if a point has the same latitude as both points of
a segment it doesn't mean that it lies on the segment. This change fixes
this edge case by scanning 0-dimension instead of 1-dimension. In
spherical and geographic it's guaranteed that if longitude is the same a
point lies on a segment. Segments going through poles are not yet
supported.
2016-03-03 01:15:33 +01:00
Barend Gehrels
9258d04b42 Merge branch 'develop' into bg-prepare 2016-03-02 21:50:45 +01:00
Adam Wulkiewicz
69e32e2b20 [overlay] Remove unused typedef. 2016-03-02 15:28:12 +01:00
Barend Gehrels
6b0af591af [colocations] remove debug info which was committed unintentional 2016-03-02 13:10:11 +01:00
Barend Gehrels
a5f5fa6425 [traverse] dont check for self intersections anymore 2016-03-02 13:09:50 +01:00
Barend Gehrels
dfda1ccbc3 [buffer] fix last cases, in cases where the same offsetted ring is self-intersecting,
the approach using multi_index does not work. We need an extra idenfication
to check the 'sources' of the turns in clusters. Added piece_index for
this purpose.
This can be templated later (so only used for buffer)
2016-03-02 13:09:25 +01:00
Barend Gehrels
438ee64956 [buffer][traverse] fix condition and added image to explain 2016-03-02 10:36:19 +01:00
Barend Gehrels
91223c5c98 Merge branch 'feature/cluster' into develop 2016-03-01 21:40:45 +01:00
Barend Gehrels
3f9505e3e6 [colocations] apply counts only to the "to" cases
(I used this already longer time but it was not yet committed)
2016-02-28 09:19:52 +01:00
Barend Gehrels
d4620e56b3 [traverse] fix case which was traversing twice;
this fixes all testcases for difference
2016-02-27 18:20:34 +01:00
Barend Gehrels
577c3bcfe4 [traverse] use same method for finding index; this fixes
the last uu case in union_multi (and is better anyways)
2016-02-27 18:16:19 +01:00
Barend Gehrels
83320f528e [traverse] move loop to separate method to be shared later 2016-02-27 18:08:18 +01:00
Barend Gehrels
0bd3944652 [traverse] don't travel again over visited arcs in clusters. This fixes
(again, after breaking) all cases for difference/intersection and no new
errors for union/buffer
2016-02-26 18:50:34 +01:00
Barend Gehrels
778b3063f5 Merge branch 'develop' into bg-prepare 2016-02-24 10:26:16 +01:00
Barend Gehrels
d0f584e6f3 [traverse] fix cases where there is a choice between two equally suited
arcs from a cluster - if one is the starting point, take that one
2016-02-17 14:26:56 +01:00
Barend Gehrels
05c789e77e [buffer][traverse] fix uu for buffer 2016-02-17 12:38:34 +01:00
Barend Gehrels
e30fd1ca4c [traverse] fix case for buffer having only cc (in the whole cluster).
For a cc operation, main_rank 0 is OK
2016-02-17 11:43:01 +01:00
Barend Gehrels
c4c180bb7d [union] instead of checking uu, count open spaces to support also
conbined touching turns without a uu
2016-02-10 20:34:37 +01:00
Barend Gehrels
41518b6ac3 [traverse] use count_left/count_right to get first requested turn
in clusters
2016-02-10 13:23:09 +01:00
Adam Wulkiewicz
80d2bb09ca [io] Add support for all geometries to svg() and use it in svg_mapper. 2016-02-09 14:04:07 +01:00
Adam Wulkiewicz
dc3c5416f4 [io] Fix compilation error in write_svg for box and non-int coordinate type. 2016-02-09 01:39:10 +01:00
Adam Wulkiewicz
556bed04a5 [policies] Enable rescaling only for cartesian CS. 2016-02-04 16:32:45 +01:00
Barend Gehrels
1ea05c3539 [traverse] fix subject/origin, which did not work for buffer
Now the previous point is taken (this might in theory be colocated!)
2016-02-03 14:03:10 +01:00
Barend Gehrels
5a35924616 [traverse] use index instead of source_index to determine subject
(in relation with previous commit: use indexes instead of iterators, part 2)
2016-02-03 12:33:35 +01:00
Barend Gehrels
24908b7636 [traverse] go to index instead of iterator (part 1) 2016-02-03 12:10:54 +01:00
Barend Gehrels
34db67d51d Merge branch 'develop' into feature/cluster 2016-02-03 11:12:33 +01:00
Adam Wulkiewicz
c018acfb4a [strategies] Improve the accuracy of surveyor area strategy by using slightly different formula. 2016-01-28 14:46:54 +01:00
Barend Gehrels
e619ec6dfe [overlay][buffer] make find_open generic for usage in both overlay
and buffer
2016-01-27 13:35:17 +01:00
Barend Gehrels
19747bea88 [buffer] use specific visiting policy for buffer 2016-01-27 13:33:57 +01:00
Barend Gehrels
18a893d2c0 [buffer][test] adaptions to make clusters visible in buffer SVG maps 2016-01-27 11:44:48 +01:00
Barend Gehrels
dc6b102b1f [buffer] add three specializations necessary to include
buffered ring collections in SVG maps
2016-01-27 11:43:46 +01:00
Adam Wulkiewicz
5764489256 [formulas] Add a workaround for GCC bug (causing error: parse error in template argument list) in andoyer_inverse. 2016-01-25 21:11:55 +01:00
Adam Wulkiewicz
68fa4e5f0c [adapted] Suppress unused parameter warning in Boost.Polygon adaptation. 2016-01-25 20:04:54 +01:00
Adam Wulkiewicz
e482a86b74 Merge pull request #340 from awulkiew/fix/back_inserter
Add range::back_inserter() and use it in algorithms when needed.
2016-01-25 19:46:08 +01:00
Adam Wulkiewicz
33982c9ae6 Merge pull request #339 from awulkiew/fix/andoyer
Fix andoyer
2016-01-25 19:39:57 +01:00
Adam Wulkiewicz
53d7dca308 [strategies] Use andoyer_inverse formula in andoyer distance strategy. 2016-01-25 19:34:20 +01:00
Adam Wulkiewicz
edc3c7851d [algorithms] Use range::back_inserter() if points are added to geometries. 2016-01-23 13:57:49 +01:00
Adam Wulkiewicz
972b667525 [range] Add back_insert_iterator using traits and back_inserter(). 2016-01-23 13:47:24 +01:00
Adam Wulkiewicz
cc5d0efc55 Merge pull request #332 from awulkiew/fix/intersects_bs
Fix special case of intersects(Segment, Box)
2016-01-20 16:53:05 +01:00
Barend Gehrels
b55eec5b7e [buffer] fix new traverse approach for buffer, it should take the
first segment if encountering an early finish
2016-01-20 14:45:46 +01:00
Barend Gehrels
ed6db710ce [buffer] repair compiling: adapt buffer backtrack policy to recent change,
and fix SVG
2016-01-20 10:37:20 +01:00
Adam Wulkiewicz
5df1a05e34 [formulas] Make the andoyer_inverse formula more robust. 2016-01-19 00:30:50 +01:00
Adam Wulkiewicz
eba433ee06 [formulas] Fix/improve andoyer_inverse formula for antipodal and nearly antipodal points.
The results returned by this formula are now also consistent in a way that the closer points are to being antipodal the closer are the results to edge-case results.
2016-01-18 18:08:32 +01:00
Barend Gehrels
a236ba3391 [overlay] add counts to enrichtment info, this avoids it to be redone,
and use it in traverse omitting the operation condition
2016-01-13 15:58:51 +01:00
Barend Gehrels
8364aed91b [intersection] fix cases where intersection has to travel through uu/ux 2016-01-13 12:49:47 +01:00
Barend Gehrels
d256e57487 [overlay] now we can/need to remove functionality to discard turns
colocated with uu and the same ring.
This breaks one case (# case_recursive_boxes_23) but repairs many (about 50%
of the wrong cases in robustness test)
2016-01-13 10:52:04 +01:00
Barend Gehrels
c268bb2fd4 Minor change, check on cluster ids 2016-01-10 19:14:31 +01:00
Barend Gehrels
c74ff4c0df [overlay] remove functionality for colocated cc turns, recently added,
but now redundant again.
(In hindsight I should have added the "startable" functionality first)
2016-01-10 19:12:55 +01:00
Barend Gehrels
5f028b0b04 [overlay] split polygon_count in left_count/right_count, this is necessary
for some cases (ex. #case_recursive_boxes_29). Also, necessary, now that
startable is defined, don't discard colocated cc in clusters, they are
sometimes necessary.
2016-01-10 19:06:34 +01:00
Barend Gehrels
01df9eacbb [overlay] fix implementation of startable flag, it should start if there
are 1 (union) or 2 (intersection) polygons on right hand
2016-01-10 13:32:08 +01:00
Barend Gehrels
e4624dad28 [union] remove discarded lonely uu turns from cluster 2016-01-09 20:09:35 +01:00
Barend Gehrels
7931e0445b [intersection] now discarded uu turns outside clusters, they block traversal 2016-01-09 19:31:19 +01:00
Barend Gehrels
3a9713b267 [sort by side] fix index 2016-01-09 19:15:44 +01:00
Barend Gehrels
b7a16976c9 [overlay] handle startable functionality for traverse w.r.t. clusters
This has a small regression on 5 cases in multi_difference, to be inspected,
and can change the number of holes due to commenting handle_touch
2016-01-09 13:39:28 +01:00
Barend Gehrels
df2c1f35bc [sort by side] remove rank, not used anymore 2016-01-09 10:16:48 +01:00
Barend Gehrels
f377eebf8c [traverse] instead of combination uu/ux for specific behaviour,
now check on uu/* (any turn in combination with uu) for unionts
2016-01-08 18:28:38 +01:00
Barend Gehrels
0d3ef5e3e9 [intersection] discard turns colocated with uu too (these turns are based on
invalid input)
2016-01-07 19:34:08 +01:00
Barend Gehrels
59125adb8d [intersection] don't exclude ux for intersection because it is necessary
to block certain paths
2016-01-07 18:59:05 +01:00
Barend Gehrels
98f26765e7 [union] change solution for reversed clusters (uu/ux only),
this fixes the new case #case_recursive_boxes21

This fixes again all current multi union/intersection/difference and all union
2016-01-06 22:29:52 +01:00
Barend Gehrels
71fbcd8aaf [traverse] remove now redundant condition, clusters never have discarded turns 2016-01-06 18:19:40 +01:00
Barend Gehrels
32ddae6c0d [union] handle clusters with uu-only and halfway incoming arcs 2016-01-06 18:18:18 +01:00
Barend Gehrels
c9836ca17f [union] handle clusters with uu/ux combined 2016-01-06 17:18:05 +01:00
Barend Gehrels
2c1a7b7f40 [union] fix simple cases having two colocated uu turns
(appearing now that uu turns are included)
2016-01-06 16:52:19 +01:00
Barend Gehrels
b272e9f615 [intersection] also for intersection, uu turns have to be included to
make proper decisions on clusters.
This also removes switch_source initialization (which is false anyway)

This fixes all known cases for multi union/intersection again,
except for the number of clips. Difference still has one area error
2016-01-06 13:54:07 +01:00
Barend Gehrels
e7606cc0cd [handle_touch] stop recursion at completion 2016-01-06 12:53:17 +01:00
Barend Gehrels
429a6af590 [handle_touch] add temporary conditions to stop recursion 2016-01-06 12:23:30 +01:00
Barend Gehrels
655b4f887a [debug] add visitor to handle_touch
and some parameter renamings
2016-01-06 12:23:07 +01:00
Barend Gehrels
1ced3357d9 [overlay] changes in names of types/parameters to make them more
concise and consistent (mainly TurnPoints -> Turns)
2016-01-06 11:32:12 +01:00
Barend Gehrels
c2f4347a7f minor changes in layout/constness 2016-01-06 11:09:05 +01:00
Barend Gehrels
72356703fe [colocations] fix cases where uu turns are colocated with cc turns,
and are the only ones left, they should be removed in some cases
2016-01-06 11:08:09 +01:00
Barend Gehrels
0d6f2e5285 [overlay] use colocated for colocated cc turns, and if it is like that,
include it in turn_info_map to mark it as traversed
2016-01-03 14:44:12 +01:00
Barend Gehrels
f803c0cae2 [overlay] stop discarding uu turns. Discard cc turns colocated with uu turns.
Including uu turns is necessary to handle cases as in #recursive_boxes_17 and also for
validity of output polygons.
This also makes code simpler for now, removing the separate uu handling from
for example select_rings
2016-01-03 13:17:17 +01:00
Barend Gehrels
63b667aa82 Merge branch 'feature/handle_touch' into feature/cluster
Conflicts:
	include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
	include/boost/geometry/algorithms/detail/overlay/overlay.hpp
	include/boost/geometry/algorithms/detail/overlay/traverse.hpp
	include/boost/geometry/algorithms/detail/overlay/turn_info.hpp
	test/algorithms/overlay/Jamfile.v2

Skipped some files in merging:
unit tests, test cases, less_by_segment_index

Turned off the handling of touch (so this is merge only)
2016-01-03 11:47:19 +01:00
Barend Gehrels
fe5264ef00 [traverse] fix selection of operation in case of continue: do not
select a continue operation if next turn is a dead end
2016-01-01 11:09:21 +01:00
Barend Gehrels
f803a5ad8e [traverse] small changes on next_turn_index and remove redundant condition
(! result was already checked a few lines before)
2016-01-01 10:51:07 +01:00
Barend Gehrels
e059715a2a [traverse] fix selecting invalid arc in cluster 2015-12-31 18:09:10 +01:00
Barend Gehrels
f63573d58b [colocations] fix assigning discarded turns for clusters 2015-12-31 15:55:00 +01:00
Barend Gehrels
5dda03ac46 [enrich] remove debug info 2015-12-31 14:56:31 +01:00
Barend Gehrels
716fe421e0 [enrich] fix cluster behaviour, only point to next turn if clusters
are also on
2015-12-31 14:55:31 +01:00
Barend Gehrels
44917ea227 [traverse] remove commented output 2015-12-31 12:50:29 +01:00
Barend Gehrels
ca2123646c [overlay] remove unused typedef 2015-12-31 12:49:53 +01:00
Barend Gehrels
3633402bf8 [colocations] handle todo item, discard colocated uu turns conditionally
based on ordering turns
2015-12-31 12:49:24 +01:00
Barend Gehrels
92dd2295ed [cololocations] simplified clustering, less merging necessary 2015-12-30 20:27:10 +01:00
Barend Gehrels
eee10489ad [traverse] fix, take the right operation in a cluster instead of using
select_operation
2015-12-30 15:18:54 +01:00
Barend Gehrels
dbb92e7088 [traverse] move logic of select_operation to inside traverse_to_next_turn,
to prepare using selected cluster operation later
2015-12-29 19:33:33 +01:00
Barend Gehrels
d104e7175f [traverse] small improvements w.r.t. using objects instead of iterators 2015-12-29 19:03:29 +01:00
Barend Gehrels
1436dc0afd [traverse] simplify loop because backtrack now just rejects, finalized
rings are preserved
2015-12-29 18:33:32 +01:00
Barend Gehrels
07a3cc3506 [traverse] minor changes in names and simplified main loop 2015-12-28 19:44:44 +01:00
Barend Gehrels
e882f5e224 [traverse] fix registration of start which should be done immediately,
to get correct early finish for ii turns
2015-12-27 18:42:39 +01:00
Barend Gehrels
2777d57961 [enrich] remove old block now that discarding uu is moved after
handling colocations
2015-12-24 18:35:42 +01:00
Barend Gehrels
aaae44d041 [overlay] change debug info 2015-12-24 18:34:38 +01:00
Barend Gehrels
5e6ba5ed06 [colocations] fix #case_recursive_boxes3 by adding condition
that turn should not be collinear (to be found out why)
2015-12-24 18:32:02 +01:00
Barend Gehrels
5c18dd370f [colocations] don't discard ring if it is blocked
(fixes #case_recursive_boxes_4)
2015-12-24 18:20:50 +01:00
Barend Gehrels
4878e7c34c [enrich] move discarding uu until after clustering, and within
clustering discarding turns colocated with uu on the same ring.
This breaks 2 cases, to be solved later, and fixes case_recursive_boxes_12
2015-12-24 17:05:05 +01:00
Barend Gehrels
e14d7fcd88 [traverse] in case of no outgoing arcs, always return false
This fixes all current union_multi testcases
2015-12-24 14:55:23 +01:00
Barend Gehrels
00fca1e961 [traverse] select right operation from first outgoing arcs, in case there
are multiple
2015-12-24 14:08:01 +01:00
Barend Gehrels
7614b1bce6 [traverse] add warning for subject 2015-12-24 13:42:02 +01:00
Barend Gehrels
65a3eeb804 [traverse] don't select starting points from clusters which are build in 2015-12-24 13:41:30 +01:00
Barend Gehrels
afd2599bc9 [overlay] instead of traversing through cluster, the next turn index
is determined in enrich_intersection_points
2015-12-24 13:38:48 +01:00
Barend Gehrels
aa230c7f71 [traverse] make visitor/robust policy also member, and call visitor
from other visit
2015-12-23 18:43:42 +01:00
Barend Gehrels
f5e8d4d7ec [traverse] rename turn/op to start_... 2015-12-23 18:29:53 +01:00
Barend Gehrels
9e8ae09824 [traverse] slight changes in looping / returning from traverse 2015-12-23 18:18:58 +01:00
Barend Gehrels
4ecd4386fc [traverse] add set_visited instead of set_visited_for_continue,
doing both
2015-12-23 18:07:36 +01:00
Barend Gehrels
a5593b1dad [traverse] remove redundant typenames 2015-12-23 18:06:35 +01:00
Barend Gehrels
994d497225 [traverse] remove duplicate debug information, visitor can be used
for debugging
2015-12-23 17:53:35 +01:00
Barend Gehrels
b0684c4e08 [traverse] move traversal itself to traversal structure, only doing
one traversal. Currently returns error code for backtracking.
2015-12-23 17:48:51 +01:00
Barend Gehrels
7890d29184 [traverse] move selection functions to traversal struct 2015-12-23 16:47:34 +01:00
Barend Gehrels
cf4f827d07 [traverse] make traversal stateful object to simplify calling;
rename assign_next_ip to travel_to_next_turn
2015-12-23 16:36:35 +01:00
Barend Gehrels
4b91272809 [traverse][backtrack] create a finalize method to keep successfully
traversed rings, also if one of next rings fails
2015-12-23 11:54:34 +01:00
Barend Gehrels
6f5677a003 [traverse] move registration of visit information 2015-12-23 11:27:56 +01:00
Barend Gehrels
5c2e678740 [traverse] fix types/names in set_visited_for_continue (the calls were OK) 2015-12-23 10:59:11 +01:00
Barend Gehrels
03cb54bd84 [traverse] fix warning 2015-12-23 10:32:00 +01:00
Barend Gehrels
16b88d5565 [traverse] restructure and reverse conditions
(first select next, then finish early)
2015-12-23 10:24:58 +01:00
Barend Gehrels
d588a35354 [traverse] use the_turn/the_op for now instead of iterators 2015-12-22 20:05:31 +01:00
Barend Gehrels
194f3bf67c [overlay] add check on next turn index, if -1 take next one
to avoid dead ends
2015-12-20 19:05:30 +01:00
Barend Gehrels
5b1fcf78c2 [overlay/clusters] remove clusters with only 1 turn left 2015-12-20 13:10:50 +01:00
Barend Gehrels
64943c0911 [intersection] fix sort_by_side order for non-colinear points on same side 2015-12-20 13:09:39 +01:00
Barend Gehrels
aa14cad2b9 [buffer] add clusters to enrich/traverse from buffer 2015-12-20 12:07:31 +01:00
Barend Gehrels
f6ad756076 [union] make the side-comparison operation dependent on operation type
because for intersection we will need ccw
2015-12-20 11:57:33 +01:00
Barend Gehrels
f2319263a0 [union] fix known cases using clustering and sort_by_side during traversal 2015-12-19 18:10:34 +01:00
Barend Gehrels
6240c540bd [tangencies] clean up sorting per pair of turns, it has to be considered
more globally
2015-12-16 17:25:46 +01:00
Barend Gehrels
c15ca98aa1 Remove obsolete comment 2015-12-11 22:17:16 +01:00
Barend Gehrels
e7e425f8de [overlay] fix #recursive_boxes by enabling 0,4 as tight corner too.
This introduces a ccw method, called by tight functions.
Note that it does NOT work for the two other similar methods using ranks
2015-12-11 22:00:32 +01:00
Barend Gehrels
33ada1d6e8 [fix] Fix cases by correct ordering left/right using sorted side information
This fixes #recursive_boxes 6, 10, 11

Debug cases added to overlay.cpp (10, 11)
2015-12-10 20:14:10 +01:00
Barend Gehrels
a0fc7307ac [fix] use intersection point for sorting, the "both" is sometimes wrong
This fixes #recursive_boxes_8
2015-12-09 18:40:28 +01:00
Barend Gehrels
378bee678a [fix] use sort_by_side now also for ordering of ii/non_ii turns
This fixes cases #101, #102 and #107 for difference (and corresponding
inverse versions for intersection)
2015-12-08 18:35:38 +01:00
Barend Gehrels
6de8d91942 [fix] fix newly added case and get rid of different code for
intersection/difference
2015-12-07 22:45:29 +01:00
Barend Gehrels
36ddec97f8 sort_by_side: fix comments 2015-12-07 20:18:05 +01:00
Barend Gehrels
9302c9f02f [extensions][test] add inverse algorithm to calculate the inverse (in extensions)
and use it in overlay unit test
2015-12-07 20:17:31 +01:00
Barend Gehrels
70db900f16 replace interior/exterior condition with generic code using geometry of segments,
and looking if the non-ii turn is independent from the ii turn.

The side_sorter will be used later for other purposes too
2015-12-07 15:17:02 +01:00
Barend Gehrels
5b8be328b3 Create new helper function direction_code, using code from point_is_spike_or_equal 2015-12-07 15:11:48 +01:00
Barend Gehrels
51e41c5238 [fix] fix buffer backtrack policy and traverse call for new visitor 2015-12-06 19:57:02 +01:00
Barend Gehrels
dd8911c1eb Remove now deprecated handle_tangencies 2015-12-06 19:30:40 +01:00
Barend Gehrels
555061dd9c [fix] fix includes of the recently changed copy_segment_point algorithm 2015-12-06 19:27:48 +01:00
Barend Gehrels
11844b6b74 [test] extend visitor with traversal information 2015-12-06 19:21:50 +01:00
Barend Gehrels
4a491fd77d [overlay][test] add test visitor for overlay operation including turn and turn-order 2015-12-06 18:45:21 +01:00
Barend Gehrels
4f90bcd4a5 [fix] handle ix/ix as ux/ux
This fixes case #77; case #72 is fixed by earlier changes
2015-12-06 18:21:35 +01:00
Barend Gehrels
99045b5c47 [fix] handle_colocations, discard_colocated was not refreshed 2015-12-06 18:07:48 +01:00
Barend Gehrels
0c9d365d4b [fix] copy_segment_points did not use reverse, fixed. It is now similar to
copy_segments
This somehow influences one unit test case but that will be handled later.
2015-12-06 18:01:19 +01:00
Barend Gehrels
90485acf79 Merge branch 'develop' into feature/fix_tangencies 2015-12-06 17:45:12 +01:00
Adam Wulkiewicz
5d02ff6aed [index] Add workarounds for uninitialized variable warnings reported by GCC-4.4 -O2. 2015-12-01 23:46:11 +01:00
Barend Gehrels
285e0ad61d Merge branch 'develop' into feature/fix_tangencies 2015-11-28 09:10:28 +01:00
Barend Gehrels
c220373473 Merge branch 'develop' into bg-prepare
Conflicts:
	include/boost/geometry/extensions/algorithms/dissolve.hpp
2015-11-27 19:37:14 +01:00
Menelaos Karavelas
beabe33efc [strategies][distance][spherical equatorial] fix comment written in Greek characters 2015-11-27 12:29:34 +02:00
Menelaos Karavelas
4dedae6eb7 Merge pull request #335 from mkaravel/fix/is_valid_invalid_coordinates
Boost.Trac ticket 11711
2015-11-26 23:30:58 +02:00
Barend Gehrels
fa202f7821 [enrich] remove now obsolete flag for clustered 2015-11-22 14:11:05 +01:00
Barend Gehrels
17c83298d4 [overlay] remove (handling of) discarded in enrich/traverse.
Discarded is still there but not used or assigned in any sorting
2015-11-22 14:10:02 +01:00
Barend Gehrels
2945201838 [overlay] pass inverse flag for difference and use it
to reverse condition on interior/exterior touch
2015-11-22 14:01:05 +01:00
Barend Gehrels
fdcf6df915 typo 2015-11-21 19:02:00 +01:00
Barend Gehrels
939bf656f9 [intersection/enrich] don' t skip after ii if it is about interior rings,
they should be traversed. This fixes case mysql_21965285_b_inv
and helps for cases #58 (no backtracking)
2015-11-21 19:01:51 +01:00
Barend Gehrels
6fb034581a [traverse] fix situations for ii by checking if in a cc case (where either
one can be selected normally) one of the options leads to the starting turn.

This, together with previous commit (finish early), fixes the many
variants of case #58
2015-11-21 18:56:40 +01:00
Barend Gehrels
88d2276b69 [traverse] fix situations for ii by checking if current ring is
finished immediately (without switching to other source as ii does)
2015-11-21 18:54:00 +01:00
Barend Gehrels
a9903f8c7f [overlay] fix ordering ii-turns and skip turns afterwards 2015-11-18 17:33:23 +01:00
Barend Gehrels
67ac81e5b2 [overlay] fix cases where intersection point is in the middle of the
first segment, and not at the endpoint
2015-11-18 14:53:00 +01:00
Barend Gehrels
a48a935064 [overlay] self-tangencies, similarly as handling side left/right,
handle cases where one leg continues collinearly
2015-11-18 11:14:35 +01:00
Menelaos Karavelas
348b7f7f56 [algorithms][is_valid] check invalid floating-point coordinates using
boost::math::isfinite instead of boost::math::isnan and boost::math::isinfinite;
2015-11-18 10:46:58 +02:00
Menelaos Karavelas
719d0f6f49 [util] apply coding rules 2015-11-18 10:27:20 +02:00
Menelaos Karavelas
045522d9cb Merge branch 'develop' of github.com:boostorg/geometry into fix/is_valid_invalid_coordinates 2015-11-18 09:58:37 +02:00
Barend Gehrels
2e7e21dd31 [overlay] don' t discard for difference too 2015-11-15 12:33:13 +01:00
Barend Gehrels
e2764a795b [overlay] sort on cc too. Also, sort/fix cases where ux is considered for intersection too.
They are discarded now, besides the sorting order is fixed (but that
alone does not help)
2015-11-15 11:55:13 +01:00
Barend Gehrels
c7d419785e [overlay] in less_by_segment_ratio, sort turns where operation occurs
(and not in the other turn) first
2015-11-14 11:23:37 +01:00
Barend Gehrels
d038e58f16 [overlay] check for sides w.r.t. both, this fixes two cases for
intersection
2015-11-13 20:08:14 +01:00
Barend Gehrels
b891bbe741 [overlay] use same functionality also for intersection 2015-11-13 19:29:55 +01:00
Barend Gehrels
e97bbb4da1 [overlay] fix cases where IP is not at endpoint. This fixes the last
union/buffer cases with less_by_segment_ratio instead of handle_tangencies
2015-11-12 19:46:29 +01:00
Jiri Drbalek
cb9c581365 [algorithms][centroid] Fix crash when multi-geometry contains empty geometry 2015-11-11 21:24:26 +00:00
Barend Gehrels
242c619b35 [overlay] handle ux/ui and ui/ui in a more generic way, for union,
checking the relative sides of the outgoing segments (in the sorting)
2015-11-11 21:50:34 +01:00
Barend Gehrels
529b8e804c [overlay] fix ux/ux cases by sort order
(instead of handle tangencies)
2015-11-11 16:18:19 +01:00
Barend Gehrels
6b0be79ff3 [enrich] move indexed_turn_operation/sort to separate source file to
reuse it for handle_touch

Also, remove the unused member variable m_strategy from it

Conflicts:
	include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
2015-11-11 15:54:47 +01:00
Barend Gehrels
4a05869d2f [overlay] turn off handle_tangencies 2015-11-11 15:43:29 +01:00
Barend Gehrels
9ec7e5f3d3 Merge branch 'develop' of https://github.com/boostorg/geometry into develop 2015-11-11 10:27:42 +01:00
Menelaos Karavelas
d9317bdba6 Merge pull request #334 from mkaravel/fix/is_simple_for_empty_geometries
Boost.Trac tickets 11709 and 11710
2015-11-10 08:06:17 +02:00
Adam Wulkiewicz
450cfb42be [arithmetic] Add missing include in determinant.hpp 2015-11-08 05:30:07 +01:00
Menelaos Karavelas
a69456a7e3 [algorithms][is_valid] check if the coordinates of a geometry are valid or not;
coordinates are considered invalid if they are off floating point type and either
NaN or infinite;
2015-11-06 12:16:07 +02:00
Menelaos Karavelas
80c706df39 [algorithms][is_simple] patch the is_simple algorithm to address Boost.trac tickets
11709 and 11710;

Ticket 11709 (is_simple segfault): modify the is_simple algorithm to check a linestring
for emptiness; if an empty linestring is discovered, return false; the actual return
value does not really matter as empty linestrings are considered as invalid, which means
that the behavior of is_simple for empty linestrings is undefined; on the other hand,
we do want to avoid segfaults, which is achieved with the patch; the same approach has
been applied to emtpy rings, and as a result to empty polygons;

Ticket 11710 (empty geometry logic): modify the behavior of the is_simple algorithm with
respect to empty multi-geometries; the old behavior was considering empty multi-geometries
as non-simple, whereas the current behavior is the opposite; this change has been made in
order to be consistent with the fact that empty multi-geometries are considered as valid;
2015-11-05 14:56:18 +02:00
Barend Gehrels
cd6bfc54d4 [colocations] extract code to separate function 2015-11-04 13:22:41 +01:00
Barend Gehrels
7ee6bd99b1 [buffer] prefix traits::detail namespace 2015-11-01 11:17:32 +01:00
Barend Gehrels
085d641dab [difference] fix colocations 2015-10-31 20:06:39 +01:00
Barend Gehrels
c1aeab008b [enrich] add overlay_type template parameter
which will be used later
2015-10-31 19:35:18 +01:00
Barend Gehrels
d6b7e052ba [union] fix new case #80 to discard i/i turn of interior ring with
interior ring, in case of a colocation
2015-10-31 18:53:55 +01:00
Barend Gehrels
4cc8112544 [colocations] fix: the condition to select on uu or ux should be there 2015-10-31 12:26:09 +01:00
Barend Gehrels
013420fd07 [colocations] fix debug info 2015-10-31 11:00:41 +01:00
Barend Gehrels
7cfe3dc337 [union] instead of checking on u/u, sort/check
on exterior ring/interior rings such that also cases with u/x are handled

This fixes case mysql_21964049
2015-10-31 10:56:27 +01:00
Barend Gehrels
ac5bc527e7 [union] fix cases where a polygon is touching the interior ring of another
polygon at a point where that interior ring touches its exterior ring
2015-10-28 19:48:34 +01:00
Barend Gehrels
653f6f32ec Merge branch 'develop' into bg-prepare
Conflicts:
	include/boost/geometry/extensions/algorithms/offset.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp
	include/boost/geometry/extensions/iterators/section_iterators.hpp
	include/boost/geometry/extensions/nsphere/algorithms/disjoint.hpp
	include/boost/geometry/extensions/nsphere/algorithms/within.hpp
	include/boost/geometry/extensions/nsphere/nsphere.hpp
	include/boost/geometry/extensions/nsphere/strategies/cartesian/nsphere_in_box.hpp
	include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp
2015-10-28 10:11:24 +01:00
Adam Wulkiewicz
1305c06b3c [disjoint][intersects] Fix special case for Segment/Box.
When the difference between coordinates of Segment's points is 0 for some
dimension and the Segment is disjoint return the result stright away. In
this case both relative distances are infinite and their signs are the
same.
2015-10-21 02:25:57 +02:00
Barend Gehrels
f98e0ed947 Merge pull request #324 from jeremy-murphy/pj_units
Split pj units at divisor, support fractional multipliers.
2015-10-17 10:42:57 +02:00
Adam Wulkiewicz
3e22205687 Merge pull request #329 from springmeyer/fix-lineclip-int
[algorithms][intersection] Fixes liang_barsky for integral data
2015-10-14 23:41:08 +02:00
Dane Springmeyer
6f214c54c6 use select_most_precise + better naming of TemplateType 2015-10-14 11:36:50 -07:00
Barend Gehrels
533543e86b [traverse][robustness] in case of cc, instead of arbitrary candidate,
take candidate with largest remaining distance. This fixes some
errors if rescaling is turned off.
2015-10-14 17:15:53 +02:00
Barend Gehrels
4c29a2f7d5 [buffer] initialize intersection point to avoid warning 2015-10-14 12:58:05 +02:00
Barend Gehrels
ec017da3f0 [buffer] move same code fragments to finish_ring 2015-10-14 12:57:46 +02:00
Barend Gehrels
71143c1b68 [buffer][fix] Fix case where side calculation fails because of length 2015-10-14 12:14:38 +02:00
Menelaos Karavelas
b029641604 [algorithms][detail][point_is_spike_or_equal] fix inconsistency between sideness/collinearity
test and check for direction of vectors;

Problem: when checking whether a point q creates a spike or not with respect to two (ordered)
points a and b, the first check performed is whether q, a and b are collinear; if so, then it
is determined whether the vectors q-b and b-a have the same direction or not; for points with
floating-point coordinates, due to rounding errors as well as due to the fact that equality to
zero is checked using some tolerance, the three points may be detected as collinear; however,
when the directions of the two vectors are checked, computations are done without taking into
account any tolerance and this can lead to inconsistent results;

Fix: when checking the directions of the vectors q-b and b-a, compute signs of differences using
numerical tolerances, that is using math::equals() instead of plain comparison operators;
2015-10-12 12:07:10 +03:00
Jeremy W. Murphy
013ed09a55 [projections] Use lexical_cast, check for zeroes.
-99 is a placeholder.
2015-10-11 23:36:22 +11:00
Jeremy W. Murphy
37b3487a0d [projections] Punctuation and naming. 2015-10-11 18:13:22 +11:00
Adam Wulkiewicz
605d6d2e9b [relate] Comment-out unused variable to suppress compiler warning. 2015-10-09 17:04:38 +02:00
Adam Wulkiewicz
51d683c737 Merge pull request #321 from awulkiew/fix/rtree_eps2
Enlarge nodes boxes in the rtree WRT epsilon when non-Box values are indexed.
2015-10-09 15:54:03 +02:00
Menelaos Karavelas
8614c403f0 Merge pull request #325 from mkaravel/fix/difference_intersection_linear_areal
Fix/difference intersection linear areal
2015-10-09 08:13:52 +03:00
Menelaos Karavelas
49b7be215e [algorithms][intersection] use more descriptive name for method;
change template parameter name to something more descreptive;
2015-10-09 08:11:39 +03:00
Adam Wulkiewicz
350e75bfc2 Merge pull request #328 from jeremy-murphy/redefined_macro
[transform][strategies] Don't clobber BOOST_UBLAS_TYPE_CHECK macro.
2015-10-09 02:26:00 +02:00
Adam Wulkiewicz
bef1a98d2e [index] Add #ifdef for conditional enabling of Values' bounds in the rtree. 2015-10-08 19:01:00 +02:00
Adam Wulkiewicz
25d9f9c195 [distance] Fix assertion failure in distance(Pt, Box) for NaN coordinates.
If there are NaN coordinates the conditions cannot be reasonably
calculated, therefore if the condition isn't met check if NaN coordinates
were not involved. This is consistent with the general policy WRT invalid
geometries, the algorithm don't fail but may generate invalid result.
2015-10-08 17:39:16 +02:00
Adam Wulkiewicz
d518688486 [relate][touches] Fix bugs in relate(A,A) and use it in touches(A,A)
Bugs are related to the handling of interior rings intersecting the second
geometry.

touches(A,A) now calls relate(A,A) besides a Ring/Ring case bcause Rings
have no holes so the simpified version may be used.
2015-10-08 13:55:11 +02:00
Dane Springmeyer
eb7613e703 [algorithms][intersection] Fixes liang_barsky for integer coordinate types
- Fixes an integer division bug which caused incorrect clipping results when
   a geometry is clipped by a box and the coordinate type is integral
 - Refs https://github.com/mapbox/mapnik-vector-tile/pull/102
2015-10-06 13:58:18 -07:00
Menelaos Karavelas
b3be70aee2 [algorithms][overlay][exception] move inconsistent_turns_exception to a separate file 2015-10-05 14:06:58 +03:00
Menelaos Karavelas
7f5f894535 [algorithms][overlay][exception] move inconsistent_turns_exception to a separate file 2015-10-05 12:24:31 +03:00
Jeremy W. Murphy
2c9cf6cc5f [transform][strategies] Don't clobber BOOST_UBLAS_TYPE_CHECK macro.
This macro is also defined in boost/numeric/ublas/detail/config.hpp.
2015-09-27 19:50:15 +10:00
Menelaos Karavelas
c8b1095eea [algorithms][is_valid] fix issue with use of std::cout only in debug mode:
originally reported by Jeremy Murphy (GitHub PR #326); the problem is that
when debug_print_complement_graph() is called, std::cout needs to be defined
which requires the inclusion of <iostream> even in non-debug mode; with this
commit the call to debug_print_complement_graph() is guarded by the appropriate
macro and the use inclusion of <iostream> is no longer needed in non-debug mode;
2015-09-17 09:28:55 +03:00
Jeremy W. Murphy
cb78622a8e Merge branch 'develop' into pj_units 2015-09-07 23:44:29 +10:00
Adam Wulkiewicz
a71aaa3617 [core] Make geometry::exception::what() public. 2015-09-07 14:03:54 +02:00
Barend Gehrels
e8785f63dc [handle_touch] check on uu index 2015-09-06 20:25:41 +02:00
Barend Gehrels
b0262c163e [handle_touch] remove map, because now that u/u turns contain travel information
we can start just there and don' t have to start on another turn on the same
input rings. This simplifies the code
2015-09-06 19:47:56 +02:00
Barend Gehrels
eb3880991e [handle_touch] add logic to set the selectable_start flag to true 2015-09-06 15:43:43 +02:00
Barend Gehrels
93481dc289 [union] include handle_touch in operation, handle switch_source, and add corresponding testcases
(from Menelaos' unmerged PR).
Regression in one case (case_recursive_boxes_3)
2015-09-06 14:52:28 +02:00
Barend Gehrels
9977478aec [handle_touch] split can_reach function and add more conditions to check
reachability via u/u turn. Which fixes the issues in unit test
2015-09-06 12:30:08 +02:00
Barend Gehrels
5b4ff7dc7f [handle_touch] remove the insert_into_sequence method because it is
way more convenient to do that in enrich
(not complete yet - union test still fails for some cases)
2015-09-04 23:25:49 +02:00
Barend Gehrels
ad2524d245 [traverse] handle u/u differently such that it is not discarded
for a union operation
2015-09-04 23:13:28 +02:00
Menelaos Karavelas
68611a159c [algorithms][intersection][difference] fix bug in determining whether a turn
is a crossing turn or not (as part of the bug-fix the logic now determines is the
turn is a crossing turn, as opposed to a non-crossing turn)
2015-09-04 10:50:03 +03:00
Barend Gehrels
77c2a32503 [handle_touch] add start sorting to re-assign index of non-discarded u/u turn 2015-09-03 23:35:32 +02:00
Barend Gehrels
9a6695c825 [enrich] move indexed_turn_operation/sort to separate source file to
reuse it for handle_touch

Also, remove the unused member variable m_strategy from it
2015-09-03 23:17:44 +02:00
Menelaos Karavelas
3b12d520ac [util][math] fix possible unused variable warning 2015-09-03 20:04:55 +03:00
Menelaos Karavelas
290688c502 [algorithms][difference][intersection] modify intersection and difference algorithm
for L and A geometries to keep (instead of discarding) spikes of liear geometries
2015-09-03 15:04:00 +03:00
Barend Gehrels
45f32bee3b [handle_touch] process operation_continue and added corresponding testcases,
and test cases having u/u from union_multi.cpp
2015-09-02 16:09:49 +02:00
Barend Gehrels
16967cc7f8 [overlay] add handle_touch to examine u/u turns
First phase: check if a u/u turn should be traversed or discarded, including
unit test
2015-09-02 14:27:19 +02:00
Jeremy W. Murphy
a830e16723 Split pj units at divisor, support fractional multipliers.
Use std::atof rather than global namespace atof.
2015-08-30 18:41:41 +10:00
Adam Wulkiewicz
5daa5a78a3 Merge branch 'develop' into fix/rtree_eps2 2015-08-25 16:43:47 +02:00
Adam Wulkiewicz
3dd8d1e689 Merge pull request #320 from awulkiew/fix/box_eps
Different approach for handling Boxes WRT machine epsilon
2015-08-25 16:40:55 +02:00
Adam Wulkiewicz
069316c591 [extensions][nsphere][index] Update index-related nsphere code accoring to the latest changes in the rtree. 2015-08-23 15:03:16 +02:00
Adam Wulkiewicz
1084a124de [index] Enlarge leafs' boxes WRT epsilon for non-Box Values. 2015-08-23 15:03:16 +02:00
Adam Wulkiewicz
342306bf9e [index] Add values_box() and is_leaf_element.
The function values_box() enlarges the box WRT epsilon if the elements are
not of bounding geometry type, so Point or Segment.
2015-08-23 15:03:15 +02:00
Adam Wulkiewicz
f39d37f195 [index] Add is_bounding_geometry and relocate is_indexable. 2015-08-23 15:03:15 +02:00
Adam Wulkiewicz
0addcbb330 [math] In detail::scaled_epsilon call detail::abs instead of math::abs. 2015-08-22 17:36:54 +02:00
Adam Wulkiewicz
4a15918915 [extensions][nsphere][relops] Use raw comparison operators instead of math:: functions. 2015-08-21 20:00:13 +02:00
Adam Wulkiewicz
035a49d417 [extensions][sections] Use raw comparison operators instead of math:: functions. 2015-08-21 19:59:40 +02:00
Adam Wulkiewicz
3dcfb86cb9 [touches] For Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:54:57 +02:00
Adam Wulkiewicz
0d5c18ea56 [overlaps] For Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:54:28 +02:00
Adam Wulkiewicz
7636aa1a9e [intersection] For Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:54:02 +02:00
Adam Wulkiewicz
c8e65b5082 [within][strategies] For Point/Box and Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:53:18 +02:00
Adam Wulkiewicz
b3c9d963a3 [disjoint] For Point/Box and Box/Box use operators (e.g. < instead of math::smaller). 2015-08-21 19:52:11 +02:00
Adam Wulkiewicz
b22a3c0530 [sections] Enlarge section bounding Boxes WRT epsilon.
This allows the algorithms using sections to check spatial predicates
using raw operators < (e.g. in Box/Box disjoint). There is no need to
use less performant calls to math::smaller.

Replace math::smaller usage in section functions preceeding() and
exceeding() and therefore revert the change done recently.
2015-08-21 19:41:01 +02:00
Adam Wulkiewicz
d248323369 [math][algorithms] Add expand_by_epsilon()
Add math::scaled_epsilon().
Optimize math::smaller().
2015-08-21 19:38:51 +02:00
Adam Wulkiewicz
8f7af3cf63 Merge pull request #319 from awulkiew/fix/nan_coordinates
Take special care of NaN coordinates in relate for MultiLinestring
2015-08-20 14:05:15 +02:00
Adam Wulkiewicz
7aa3dd47f8 Merge pull request #318 from awulkiew/fix/box_eps
Take into account machine epsilon when handling Boxes in various algorithms.
2015-08-19 02:41:26 +02:00
Adam Wulkiewicz
12ba76ff70 [relate][util] Take special care about NaN coordinates in relate for MultiLinestring.
In places where a check must be performed, if a Point is one of the
endpoints of a Linestring contained in a MultiLinestring, std::sort() and
std::equal_range() algorithms are used. With MSVC the assertion in
std::equal_range() fails if the elements cannot be reliably compared, i.e.
in the case when Points has NaN coordinates.

Add has_nan_coordinate() utility and use it in boundary_checker and
topology_check in relate() implementation.
2015-08-14 17:50:31 +02:00
Adam Wulkiewicz
8ba5a7f02a [touches] Remove spaces according to coding guidelines. 2015-08-13 21:42:37 +02:00
Adam Wulkiewicz
8fcbb8e370 [index] Fix the removal of value from an empty rtree.
- Instead of assertion failure there is no effect and 0 is returned.
- Handle the NULL root in a similar way in insert, remove and count.
- Add runtime asserts.
2015-08-13 21:02:30 +02:00
Adam Wulkiewicz
098279e739 [index] Fix rtree removal for min elements == 1
Support 0-element range in elements_box() helper function.
Handle special case in remove visitor - root node containing 0 elements after underflow.
2015-08-13 00:44:33 +02:00
Adam Wulkiewicz
94b198e23f [extensions][iterators] In section_iterator take into account machine epsilon. 2015-08-05 01:02:17 +02:00
Adam Wulkiewicz
3a522f11f6 [extensions][nsphere][within][strategies] For NSphere/Box and Point/Nsphere take into account machine epsilon. 2015-08-05 00:59:48 +02:00
Adam Wulkiewicz
9d4c806994 [extensions][nsphere][disjoint] For Box/NSphere take into account machine epsilon. 2015-08-05 00:59:05 +02:00
Adam Wulkiewicz
fdc3a6870f [algorithms][sections] Take into account machine epsilon in preceding() and exceeding() functions. 2015-08-05 00:57:03 +02:00
Adam Wulkiewicz
36cdd25674 [intersection] For Box/Box take into account machine epsilon. 2015-08-05 00:55:21 +02:00
Adam Wulkiewicz
1449373a33 [strategies][within][covered_by] For Box/Box and Point/Box take into account machine epsilon. 2015-08-05 00:54:24 +02:00
Adam Wulkiewicz
121d4312d8 [touches] For Box/Box take into account machine epsilon. 2015-08-05 00:53:40 +02:00
Adam Wulkiewicz
172fff9f08 [overlaps] For Box/Box take into account machine epsilon. 2015-08-05 00:53:01 +02:00
Adam Wulkiewicz
cfbbbca0ee [disjoint] For Box/Box and Point/Box take into account machine epsilon. 2015-08-05 00:50:23 +02:00
Adam Wulkiewicz
74855a4951 [util] Add functions math::smaller_or_equals() and math::larger_or_equals(). 2015-08-05 00:33:26 +02:00
Barend Gehrels
19a88b4a17 Merge branch 'develop' into bg-prepare 2015-07-31 18:16:59 +02:00
Barend Gehrels
49add55205 [buffer] Fix assertion for cases with extreme coordinates.
In case of numerical errors, the started ring should be aborted to avoid doing
calculations with them.
2015-07-31 12:40:01 +02:00
Menelaos Karavelas
21c143e226 [algorithms][relate] modify the less functor for turns in relate so that
equality (using math::equals) for turn fractions is called before operator<;
this is done for consistency with how turns are computed in L/L set operations
and also to make sure that turns in relate are computed in a consistent way;
2015-07-28 21:37:37 +03:00
Menelaos Karavelas
c9ad6530ae [algorithms][turns] minor change (coding style) 2015-07-28 21:36:56 +03:00
Menelaos Karavelas
6e4ea5f23f [algorithms][turns] fix problem with less functor for turns;
In the previous implementation the fractions of the two turns where
compared first using operator< and then tested for equality using
math::equals; the consequence of this implementation is that it could
be possible to have two turns t1 and t2 whose fractions satisfied both
operator< and math::equals, which lead to the possibility of having both
less(t1, t2) and less(t2, t1) true; this behavior for less is wrong and
has produced failures on various compilers (especially when sorting);

The solution is to rearrange the code in the less functor so that
math::equals for the two fractions is checked first, that is before
the operator< is called; this makes the outcomes of less(t1, t2) and
less(t2, t1) always consistent with each other;
2015-07-24 10:27:04 +03:00
Menelaos Karavelas
4ce94fb33e [algorithms][turns] polish code (remove unnecessary commas in print-out) 2015-07-23 09:41:22 +03:00
Adam Wulkiewicz
5a1e553c75 [math] In the impl. of abs() for FP types use std::fabs() if possible.
This fixes the function for long double on some compilers.

For all FP types non-std fabs() was called. This function is defined
only for double. On compilers supporting long double type more precise
than double (GCC, Clang, etc.) this resulted in truncation of the result.
2015-07-22 04:41:34 +02:00
Adam Wulkiewicz
a90f9dc769 [concepts] Suppress GCC4.4 warning (unused variable). 2015-07-21 19:20:03 +02:00
Adam Wulkiewicz
1500dc3644 [algorithms][io] Explicitly specify namespaces for apply_visitor and algorithms functions. 2015-07-21 16:27:48 +02:00
Adam Wulkiewicz
39859171ce [transform] Explicitly specify namespaces to avoid ambiguities. 2015-07-20 20:40:43 +02:00
Adam Wulkiewicz
275ae8f4db [views] Suppress signed/unsigned comparison warnings in two_dimensional_view. 2015-07-20 15:43:10 +02:00
Barend Gehrels
921def4cd6 Merge branch 'develop' into bg-prepare 2015-07-19 15:11:38 +02:00
Barend Gehrels
647fedb3e2 [turns] fix conventions: no _t, line length, spurious spaces between if, missing curly braces 2015-07-18 20:16:04 +02:00
Menelaos Karavelas
eb43220e5d Merge pull request #315 from mkaravel/fix/possible_infinite_loop_in_has_spikes
Fix: possible infinite loop in has_spikes
2015-07-14 20:44:19 +03:00
Menelaos Karavelas
4e5da910af [algorithms][is_valid] rename method find_not_equal to find_different_from_first (for clarity) 2015-07-14 20:42:16 +03:00
Menelaos Karavelas
cb02dd8e8d Merge pull request #302 from mkaravel/feature/envelope_and_expand_for_spherical_cs
Envelope and expand for spherical coordinate systems
2015-07-10 07:42:16 +03:00
Menelaos Karavelas
78296da4a2 [algorithms][is_valid] replace BOOST_ASSERT by BOOST_GEOMETRY_ASSERT 2015-07-10 07:32:51 +03:00
Adam Wulkiewicz
db2a7b0afb Merge pull request #314 from awulkiew/feature/optimize_cart_intersect
[get_turns][strategies] Optimize get_turns().
2015-07-09 13:21:47 +02:00
Menelaos Karavelas
ee906b2f40 [algorithms][is_valid] avoid potential infinite loop in has_spikes
(such an infinite loop can happen if the points in the range have NaN coordinates)
2015-07-09 11:50:59 +03:00
Menelaos Karavelas
327df52ec5 [algorithms][envelope] enrich comments regarding the implementation of
envelope_multi_range_on_spheroid
2015-07-09 11:32:40 +03:00
Menelaos Karavelas
388c77cf25 [algorithms][envelope] update copyright headers to follow latest license-related wording;
rewrite envelope_multi_range and envelope_multi_range_on_spheroid algorithms in a more
clear form;
2015-07-09 11:21:53 +03:00
Menelaos Karavelas
7947be9bf5 [algorithms][expand] update copyright headers to follow latest license-related wording 2015-07-09 11:21:07 +03:00
Barend Gehrels
91ccb7e6e3 [buffer] re-enable support for no-robustness policy
Influence on polygon geometries is limited (countries also little influence)
2015-07-08 20:34:07 +02:00
Barend Gehrels
6f6fef46f4 Merge branch 'develop' into bg-prepare 2015-07-08 09:28:12 +02:00
Menelaos Karavelas
1bfae2e79e Merge pull request #313 from mkaravel/fix/sym_difference_areal
Fix/sym difference areal
2015-07-07 07:41:26 +03:00
Menelaos Karavelas
ba8bc966b1 [algorithms][envelope] merge implementation of envelope for linestrings
and multilinestrings into a single file for linear geometries
2015-07-07 04:32:30 +03:00
Menelaos Karavelas
fc7ed8f7ab [algorithms][envelope] remove Dimension and DimensionCount template parameters from bg::dispatch::envelope 2015-07-07 04:29:58 +03:00
Menelaos Karavelas
b376567de9 [algorithms][expand] remove Dimension and DimensionCount template parameters from
bg::dispatch::expand
2015-07-07 04:11:21 +03:00
Adam Wulkiewicz
db3474943b [algorithms][strategies] Simplify the geographic geodesic formulas.
Get rid of formulas objects and implement the formulas as a struct
template taking parameters enabling the formula parts (e.g. distance
and/or azimuth) with apply() static member function. This way the code is
more clear as all temporary values are created directly in the algorithms.
Furthermore there are no uninitialized values and it's not required to
keep a flag indicating if the distance or azimuth can be calculated.

Use the new implementation of formulas in geographic distance and side
strategies.

Alter the unit test.
2015-07-06 17:12:02 +02:00
Adam Wulkiewicz
eec0091bc0 [get_turns][strategies] Optimize get_turns().
The optimization is based on the fact that in the most cases the segments
handled in the TurnInfoPolicy are disjoint. For disjoint segments first
the points are rescaled, then the test for disjoint is run, next the
TurnInfoPolicy just returns and the next pair of segments is handled.
Therefore to optimze the get_turns() this commit changes two things:
1. the cart_intersect strategy may return just after the calculation of sides
   for the first segment (2 sides calculation instead of 4),
2. the points are rescaled only one time in the intersection_helper,
   already rescaled points are passed into the intersection strategy
2015-07-03 21:38:43 +02:00
Menelaos Karavelas
67c33b68bb Merge branch 'develop' of github.com:boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-07-03 02:28:13 +03:00
Menelaos Karavelas
bfe3279990 [algorithms][envelope] initialize consistently with assign_inverse() 2015-07-03 00:26:06 +03:00
Menelaos Karavelas
4bd96072bc [algorithms][sym_difference] re-factor common code 2015-07-02 20:51:36 +03:00
Adam Wulkiewicz
2e43017894 [math][policies] Rename round to rounding_cast and remove the use of boost::math::round() for performance reasons. 2015-07-02 12:02:12 +02:00
Menelaos Karavelas
8b282aeaf8 [algorithms][sym_difference] implement symmetric difference for areal geometries as follows:
* step 1: compute difference(g1, g2)
* step 2: compute difference(g2, g1)
* step 3: return the union of the two differences in previous two steps (as opposed to returning
          the concatenation of the previous two steps)
2015-07-02 00:43:38 +03:00
Adam Wulkiewicz
18ff29297e [index] Add a comment about the Box initialization in pack_create. 2015-07-01 02:55:14 +02:00
black-tomato
8be10f33a3 Without boost::geometry:: compiler try to use distance defined in my custom point class.
Microsoft Visual Studio 2008
2015-06-29 12:26:16 +03:00
barendgehrels
8dfe494f94 Merge branch 'develop' into bg-prepare
Conflicts:
	extensions/test/Jamfile.v2
	extensions/test/gis/Jamfile.v2
	extensions/test/gis/io/wkb/read_wkb.cpp
	extensions/test/gis/projections/Jamfile.v2
	extensions/test/gis/projections/projection_epsg.cpp
	extensions/test/gis/projections/projections.cpp
	include/boost/geometry/extensions/contrib/ttmath_stub.hpp
	include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp
	include/boost/geometry/extensions/gis/io/wkb/detail/ogc.hpp
	include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp
	include/boost/geometry/extensions/gis/io/wkb/utility.hpp
	include/boost/geometry/extensions/gis/projections/factory.hpp
	include/boost/geometry/extensions/gis/projections/impl/aasincos.hpp
	include/boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp
	include/boost/geometry/extensions/gis/projections/impl/base_static.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_auth.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_ell_set.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_fwd.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_gauss.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_init.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_inv.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_phi2.hpp
	include/boost/geometry/extensions/gis/projections/impl/pj_tsfn.hpp
	include/boost/geometry/extensions/gis/projections/impl/proj_mdist.hpp
	include/boost/geometry/extensions/gis/projections/impl/projects.hpp
	include/boost/geometry/extensions/gis/projections/proj/aea.hpp
	include/boost/geometry/extensions/gis/projections/proj/aeqd.hpp
	include/boost/geometry/extensions/gis/projections/proj/airy.hpp
	include/boost/geometry/extensions/gis/projections/proj/aitoff.hpp
	include/boost/geometry/extensions/gis/projections/proj/august.hpp
	include/boost/geometry/extensions/gis/projections/proj/bacon.hpp
	include/boost/geometry/extensions/gis/projections/proj/bipc.hpp
	include/boost/geometry/extensions/gis/projections/proj/boggs.hpp
	include/boost/geometry/extensions/gis/projections/proj/bonne.hpp
	include/boost/geometry/extensions/gis/projections/proj/cass.hpp
	include/boost/geometry/extensions/gis/projections/proj/cc.hpp
	include/boost/geometry/extensions/gis/projections/proj/cea.hpp
	include/boost/geometry/extensions/gis/projections/proj/chamb.hpp
	include/boost/geometry/extensions/gis/projections/proj/collg.hpp
	include/boost/geometry/extensions/gis/projections/proj/crast.hpp
	include/boost/geometry/extensions/gis/projections/proj/denoy.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck1.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck2.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck3.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck4.hpp
	include/boost/geometry/extensions/gis/projections/proj/eck5.hpp
	include/boost/geometry/extensions/gis/projections/proj/eqc.hpp
	include/boost/geometry/extensions/gis/projections/proj/eqdc.hpp
	include/boost/geometry/extensions/gis/projections/proj/fahey.hpp
	include/boost/geometry/extensions/gis/projections/proj/fouc_s.hpp
	include/boost/geometry/extensions/gis/projections/proj/gall.hpp
	include/boost/geometry/extensions/gis/projections/proj/geocent.hpp
	include/boost/geometry/extensions/gis/projections/proj/geos.hpp
	include/boost/geometry/extensions/gis/projections/proj/gins8.hpp
	include/boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp
	include/boost/geometry/extensions/gis/projections/proj/gnom.hpp
	include/boost/geometry/extensions/gis/projections/proj/goode.hpp
	include/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/hammer.hpp
	include/boost/geometry/extensions/gis/projections/proj/hatano.hpp
	include/boost/geometry/extensions/gis/projections/proj/imw_p.hpp
	include/boost/geometry/extensions/gis/projections/proj/krovak.hpp
	include/boost/geometry/extensions/gis/projections/proj/labrd.hpp
	include/boost/geometry/extensions/gis/projections/proj/laea.hpp
	include/boost/geometry/extensions/gis/projections/proj/lagrng.hpp
	include/boost/geometry/extensions/gis/projections/proj/larr.hpp
	include/boost/geometry/extensions/gis/projections/proj/lask.hpp
	include/boost/geometry/extensions/gis/projections/proj/latlong.hpp
	include/boost/geometry/extensions/gis/projections/proj/lcc.hpp
	include/boost/geometry/extensions/gis/projections/proj/lcca.hpp
	include/boost/geometry/extensions/gis/projections/proj/loxim.hpp
	include/boost/geometry/extensions/gis/projections/proj/lsat.hpp
	include/boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp
	include/boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp
	include/boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp
	include/boost/geometry/extensions/gis/projections/proj/merc.hpp
	include/boost/geometry/extensions/gis/projections/proj/mill.hpp
	include/boost/geometry/extensions/gis/projections/proj/mod_ster.hpp
	include/boost/geometry/extensions/gis/projections/proj/moll.hpp
	include/boost/geometry/extensions/gis/projections/proj/natearth.hpp
	include/boost/geometry/extensions/gis/projections/proj/nell.hpp
	include/boost/geometry/extensions/gis/projections/proj/nell_h.hpp
	include/boost/geometry/extensions/gis/projections/proj/nocol.hpp
	include/boost/geometry/extensions/gis/projections/proj/nsper.hpp
	include/boost/geometry/extensions/gis/projections/proj/nzmg.hpp
	include/boost/geometry/extensions/gis/projections/proj/ob_tran.hpp
	include/boost/geometry/extensions/gis/projections/proj/ocea.hpp
	include/boost/geometry/extensions/gis/projections/proj/oea.hpp
	include/boost/geometry/extensions/gis/projections/proj/omerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/ortho.hpp
	include/boost/geometry/extensions/gis/projections/proj/poly.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp2.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp3.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp4p.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp5.hpp
	include/boost/geometry/extensions/gis/projections/proj/putp6.hpp
	include/boost/geometry/extensions/gis/projections/proj/robin.hpp
	include/boost/geometry/extensions/gis/projections/proj/rouss.hpp
	include/boost/geometry/extensions/gis/projections/proj/rpoly.hpp
	include/boost/geometry/extensions/gis/projections/proj/sconics.hpp
	include/boost/geometry/extensions/gis/projections/proj/somerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/stere.hpp
	include/boost/geometry/extensions/gis/projections/proj/sterea.hpp
	include/boost/geometry/extensions/gis/projections/proj/sts.hpp
	include/boost/geometry/extensions/gis/projections/proj/tcc.hpp
	include/boost/geometry/extensions/gis/projections/proj/tcea.hpp
	include/boost/geometry/extensions/gis/projections/proj/tmerc.hpp
	include/boost/geometry/extensions/gis/projections/proj/tpeqd.hpp
	include/boost/geometry/extensions/gis/projections/proj/urm5.hpp
	include/boost/geometry/extensions/gis/projections/proj/urmfps.hpp
	include/boost/geometry/extensions/gis/projections/proj/vandg.hpp
	include/boost/geometry/extensions/gis/projections/proj/vandg2.hpp
	include/boost/geometry/extensions/gis/projections/proj/vandg4.hpp
	include/boost/geometry/extensions/gis/projections/proj/wag2.hpp
	include/boost/geometry/extensions/gis/projections/proj/wag3.hpp
	include/boost/geometry/extensions/gis/projections/proj/wag7.hpp
	include/boost/geometry/extensions/gis/projections/proj/wink1.hpp
	include/boost/geometry/extensions/gis/projections/proj/wink2.hpp
	include/boost/geometry/extensions/gis/projections/project_inverse_transformer.hpp
	include/boost/geometry/extensions/gis/projections/projection.hpp
	include/boost/geometry/extensions/index/rtree/rtree.hpp
	include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp
	include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp
	include/boost/geometry/extensions/nsphere/strategies/cartesian/point_in_nsphere.hpp
2015-06-27 12:35:52 +02:00
Adam Wulkiewicz
6d0be4db61 [policies] Round to the nearest integral value during rescaling. 2015-06-24 22:50:50 +02:00
barendgehrels
16aac54944 [robustness] check for infinite numbers in calculating the factor, and
only assert when really assigned
2015-06-24 11:45:41 +02:00
Adam Wulkiewicz
dd0e360146 [io][wkt] Optimize the usage of end tokenizer::iterator.
Create and return the end iterator in initialize() function the same way how
iterator `it` is, by output function argument passed by reference. Reuse it
inside this function.
In ..._parser::apply() functions reuse the end iterator, do not create it
each time it is needed.
Consistently pass the end iterator by const reference.
2015-06-22 22:58:05 +02:00
Adam Wulkiewicz
7910be94fd [relate] Add assertion and remove unneeded condition. 2015-06-22 22:33:07 +02:00
Menelaos Karavelas
a0ca615051 Merge pull request #311 from mkaravel/fix/distance_point_box_cross_track_strategy
Fix cross_track_point_box distance strategy
2015-06-22 00:13:11 +03:00
barendgehrels
283f0a2853 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-06-21 22:59:27 +02:00
barendgehrels
88be2948f3 Three minor various details 2015-06-21 22:55:09 +02:00
barendgehrels
ed103f777e intersection calculation: fix behaviour in rare cases where IP is taken from segment
A but segment B is much shorter, and IP is also at end-point of segment B.
The arbitrary decision (robust_ra < robust_rb) is changed into another
decision, based on closeness to end-points and on segment length, which leads
to more precise results
2015-06-21 22:50:40 +02:00
Menelaos Karavelas
933ed0791d [strategies][distance][cross track point box] re-factor code and make it more readable 2015-06-19 09:37:49 +03:00
Menelaos Karavelas
23addc2c06 [strategies][distance][cross track point box] optimize the computation of the
distance when the point's longitude does not belong to the longitude range of the
box: instead of computing the distances to both meridian segments of the box, determine
which one among the two box segments the point is closest to, and compute the distance
of the point to the closest segment found
2015-06-19 01:17:46 +03:00
Menelaos Karavelas
edf943696c Merge pull request #301 from mkaravel/fix/bounding_box_computation_in_get_rescale_policy
Fix: initialize the rescale policy only if the input geometries are non-empty
2015-06-15 15:32:00 +03:00
Menelaos Karavelas
21b9226562 [strategies][spherical][distance][cross track point box] add missing includes 2015-06-13 23:57:03 +03:00
Menelaos Karavelas
12e497f394 [strategies][distance][cross track point box] update cross track point-box
strategy to work with box seen as Cartesian products of intervals
2015-06-13 01:47:44 +03:00
Adam Wulkiewicz
843ef4eac8 [is_valid] Add optimization and suppress warnings.
Replace boost::size(...) > 0 with !boost::empty(...).
Suppress unused parameter and constant conditional expression msvc
warnings.
2015-06-12 16:37:58 +02:00
Menelaos Karavelas
00424e5a6d Merge pull request #294 from mkaravel/ext/fixes_for_ttmath_big
Extensions: fixes for ttmath::Big<Exponent, Mantissa> and ttmath_big
2015-06-12 10:05:07 +03:00
Menelaos Karavelas
355a9d0cf4 Merge pull request #308 from mkaravel/fix/distance_cross_track_radius_type
[strategies][distance][cross track] expose the radius type as a typedef
2015-06-12 08:55:55 +03:00
Adam Wulkiewicz
f3b4df8c82 [index] Rename member and tparam in expandable_box for better readability. 2015-06-11 23:14:00 +02:00
Adam Wulkiewicz
81d0442c3a Merge pull request #309 from awulkiew/fix/is_valid
[is_valid] Suppress unused parameter warnings.
2015-06-11 22:12:29 +02:00
Adam Wulkiewicz
5aedf7a20a Merge pull request #310 from awulkiew/fix/types2
Replace signed_index_type with signed_size_type.
2015-06-11 18:25:35 +02:00
Adam Wulkiewicz
fb624d5712 Merge pull request #307 from awulkiew/fix/types
Replace int with more suitable type (std::size_t, signed_size_type, template parameter).
2015-06-11 18:21:17 +02:00
Adam Wulkiewicz
d88e1511d4 Merge branch 'fix/rtree_envelope' into develop 2015-06-11 18:17:46 +02:00
Adam Wulkiewicz
1cf2969cf2 [is_valid] Suppress unused parameter warnings. 2015-06-11 17:54:34 +02:00
Adam Wulkiewicz
f1313b27bc [index] Improve support for non-cartesian segments.
Use envelope() when necessary.
Remove assign_inverse() calls.
2015-06-11 16:13:25 +02:00
Menelaos Karavelas
53b5ef3dff [strategies][distance][cross track] expose the radius type as a typedef
(same as for projected_point distance strategy)
2015-06-11 01:35:30 +03:00
Menelaos Karavelas
a38f7bf60b [algorithms][envelope] make the initial box the same as that returned by assign_inverse
(for consistency with older behavior; this might change in the future)
2015-06-11 01:13:47 +03:00
Menelaos Karavelas
1a4d2504af [algorithms][envelope] change how the envelope for polygons is implemented:
for polygons with empty exterior ring, look at the interior rings
2015-06-11 01:00:42 +03:00
Menelaos Karavelas
37564000d0 [algorithms][envelope] fix compilation errors in assertions 2015-06-11 00:18:06 +03:00
Menelaos Karavelas
6470261ec2 Merge branch 'develop' of github.com:boostorg/geometry into feature/envelope_and_expand_for_spherical_cs
Conflicts:
	include/boost/geometry/algorithms/detail/envelope/linestring.hpp
	include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp
2015-06-11 00:10:31 +03:00
Menelaos Karavelas
bc70826be4 Merge pull request #299 from mkaravel/feature/intersection_areal_areal_linear
New feature: support bg::intersection(areal, areal, linear)
2015-06-10 11:43:54 +03:00
Adam Wulkiewicz
68bac52fa4 [algorithms] Replace signed_index_type with signed_size_type. 2015-06-09 17:59:39 +02:00
Adam Wulkiewicz
18de7e1251 [index] Always implement the BOOST_GEOMETRY_INDEX_ASSERT() macro (using BOOST_GEOMETRY_ASSERT_MSG). 2015-06-09 15:57:51 +02:00
Adam Wulkiewicz
c5e9b2004d [buffer][strategies] Replace int with std::size_t in join_round strategy. 2015-06-09 11:41:06 +02:00
Adam Wulkiewicz
c0e390524b [sectionalize] Replace int with signed_size_type, std::size_t or template parameter. 2015-06-09 11:39:56 +02:00
Adam Wulkiewicz
1167e510db [relate] Replace int with std::size_t. 2015-06-09 11:38:18 +02:00
Adam Wulkiewicz
a6604a49a5 [overlay][get_turns] Replace int with signed_size_type or std::size_t. 2015-06-09 11:37:32 +02:00
Adam Wulkiewicz
49369fa5cc [buffer] Replace int with signed_size_type or std::size_t. 2015-06-09 11:36:01 +02:00
Menelaos Karavelas
f23b88d314 [views][boundary view] make the deallocator take the pointer at construction time 2015-06-09 01:27:02 +03:00
Menelaos Karavelas
6e7ae868ee [views][boundary view] replace BOOST_ASSERT by BOOST_GEOMETRY_ASSERT;
use flatten_iterator to get all rings of a multipolygon as a single range;
separate initializer from num_rings computation; use operator new/operator delete
for dynamic memory allocation of views' container; use automatic deallocator helper
class instead of try/catch block;
2015-06-09 00:50:26 +03:00
Menelaos Karavelas
a23d4c97f6 Merge branch 'develop' of github.com:boostorg/geometry into feature/intersection_areal_areal_linear 2015-06-08 23:52:05 +03:00
Adam Wulkiewicz
fb978458e9 [buffer] Replace int with signed_size_type. 2015-06-08 21:26:41 +02:00
Adam Wulkiewicz
e0a436b55b Merge branch 'develop' into fix/buffer
Conflicts:
	include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
2015-06-08 21:17:10 +02:00
Adam Wulkiewicz
30beddc7a7 [buffer] Rename signed types, for turn_index and counters use size_t. 2015-06-08 21:10:35 +02:00
Adam Wulkiewicz
dc6988ff60 [util] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:57 +02:00
Adam Wulkiewicz
3fe9dafa85 [strategies] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:44 +02:00
Adam Wulkiewicz
bee76d5f1f [policies] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:32 +02:00
Adam Wulkiewicz
a0ca11b96d [iterators] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:40:15 +02:00
Adam Wulkiewicz
ca279e691e [index] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:39:59 +02:00
Adam Wulkiewicz
0baad86394 [geometries] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:39:34 +02:00
Adam Wulkiewicz
a5f3400a2a [extensions] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:38:59 +02:00
Adam Wulkiewicz
55b474019e [algorithms] Replace BOOST_ASSERT with BOOST_GEOMETRY_ASSERT. 2015-06-08 13:38:34 +02:00
Adam Wulkiewicz
fce4263862 [core] Add BOOST_GEOMETRY_ASSERT and BOOST_GEOMETRY_ASSERT_MSG macros. 2015-06-08 13:36:39 +02:00
Menelaos Karavelas
e5ff16ddb7 [views][boundary view] change the type of the index in polygon_rings_iterator to that of the
size type of the interior rings range; refactor code for polygon and multipolygon boundary view
into a single class; make the initialization method for areal boundary safe against exceptions
thrown by constructors used inside std::uninitialized_copy;
2015-06-08 10:28:44 +03:00
Menelaos Karavelas
0bdee12041 [views][boundary view] use std::uninitialized_copy instead of placement new;
explicitly call destructors of elements of dynamically allocated array;
2015-06-07 17:34:15 +03:00
Adam Wulkiewicz
e9d0fe0ec6 [algorithms][detail] Improve single_geometry() and sub_range().
Support single geometries which are returned by non-true-reference.
Make the interface of sub_range() complete (Geometry const)
2015-06-07 12:20:41 +02:00
Menelaos Karavelas
c02761808d [views][boundary view] replace vector with dynamically allocated array and placement new 2015-06-06 12:30:40 +03:00
Menelaos Karavelas
6aa5d27754 [views][identity view][closeable view] restore them to the state previously to modifications
to make then copyable
2015-06-06 12:17:12 +03:00
Menelaos Karavelas
25cc004243 [algorithms][envelope] add missing doxygen macros; fix namespace closing comments; 2015-06-05 23:15:24 +03:00
Menelaos Karavelas
76d7f7316b [algorithms][envelope] modify implementation logic so as to always initialize the MBR 2015-06-05 23:09:30 +03:00
Adam Wulkiewicz
06c06dab25 [buffer] Replace int with signed_index_type. 2015-06-05 13:44:37 +02:00
Menelaos Karavelas
b3906f56a2 Merge branch 'develop' of github.com:boostorg/geometry into feature/envelope_and_expand_for_spherical_cs
Conflicts:
	include/boost/geometry/algorithms/detail/envelope/linestring.hpp
2015-06-03 19:55:28 +03:00
Menelaos Karavelas
3cc4ef17ca Merge pull request #304 from mkaravel/fix/replace_use_of_num_points_by_is_empty
Replace use of num_points by is_empty
2015-06-03 17:33:28 +03:00
Menelaos Karavelas
32cf691860 [policies][get_rescale_policy] replace use of num_points() by is_empty() 2015-06-03 17:31:45 +03:00
Menelaos Karavelas
5dbc792d0c Merge branch 'develop' of github.com:boostorg/geometry into fix/bounding_box_computation_in_get_rescale_policy 2015-06-03 17:24:57 +03:00
Menelaos Karavelas
45d27e9878 [geometry] replace instances of "num_points() == 0" with "is_empty()" 2015-06-03 17:07:34 +03:00
barendgehrels
d7814c160d [buffer] avoid MSVC warnings about size_t/int 2015-06-03 14:58:58 +02:00
barendgehrels
2b1dfaddb6 [buffer] use the new is_empty 2015-06-03 14:50:37 +02:00
Barend Gehrels
687997a35f Merge pull request #303 from mkaravel/feature/is_empty
New algorithm: is_empty
2015-06-03 14:46:55 +02:00
Menelaos Karavelas
f7a4546be2 [algorithms][is_empty] simplify implementation of polygon_is_empty::apply()
into a single statement
2015-06-03 15:43:50 +03:00
barendgehrels
dc576f3d32 [projections] add names 2015-06-03 14:40:36 +02:00
Menelaos Karavelas
8ce6727b89 [algorithms][is_empty] update polygon_is_empty class to check interior rings as well 2015-06-03 15:17:43 +03:00
barendgehrels
74f60c3fc0 [projections] add original function/macro plus comments, and extra comment 2015-06-03 13:22:46 +02:00
barendgehrels
bde1a3d1cd Add mpl where used and not yet included, 2015-06-03 12:11:03 +02:00
barendgehrels
0c0a870e3d Add range.hpp where used and not yet included, 2015-06-03 12:04:16 +02:00
barendgehrels
5a1255d677 [buffer] fix, if input geometry is empty, don't calculate envelope nor rescale
strategy. Just return.
2015-06-03 11:49:39 +02:00
Adam Wulkiewicz
1ef54bb437 Merge pull request #287 from awulkiew/fix/area_huiller
Fix/area huiller
2015-06-03 09:27:05 +02:00
Adam Wulkiewicz
66e27188c1 Merge pull request #201 from awulkiew/feature/geographic
Feature: New geographic distance and side strategies
2015-06-03 09:12:07 +02:00
Menelaos Karavelas
573aa372d6 [algorithms][is_empty] replace uses of boost::size() by boost::empty() 2015-06-03 01:27:25 +03:00
Menelaos Karavelas
bcf9d63568 [algorithms][is_empty] add new algorithm is_empty, which returns true if the
geometry is the empty set
2015-06-03 01:04:24 +03:00
Menelaos Karavelas
9c248b82b1 [algorithms][check_iterator_range] apply coding rules 2015-06-02 10:17:03 +03:00
Menelaos Karavelas
5b370fdeb5 [algorithms][buffer] update use of envelope_range<> (needs more template parameters) 2015-06-02 00:07:40 +03:00
Menelaos Karavelas
a8c1eeaab3 [algorithms][envelope] add range of dimensions as template parameters to dispatch::envelope<>;
update implementation to follow the design of implementing envelope wrt a range of dimensions;
2015-06-02 00:07:04 +03:00
Menelaos Karavelas
31fe43b5ef [algorithms][expand] add range of dimensions as template parameters to dispatch::expand<>;
update implementation to follow the design of implementing expand wrt a range of dimensions;
2015-06-02 00:01:52 +03:00
Menelaos Karavelas
da9b4c9939 [policies][rescale policy] apply coding rules; polish code; fix conditional expression;
add comment regarding the computation of the bounding box when the geometries are in
the spherical equatorial or geographic coordinate system;
2015-06-01 23:45:52 +03:00
barendgehrels
aca3a922fd [projections] fix healpix add brackets around min/max 2015-06-01 20:46:25 +02:00
Menelaos Karavelas
87052dceba [policies][rescale policy] compute number of points of each geometry only once 2015-06-01 16:21:27 +03:00
Menelaos Karavelas
2ecf2d393a [policies][rescale policy] initialize the rescale policy only if the input geometries are non-empty;
this fixes unit test failures (union, intersection, difference) when
BOOST_GEOMETRY_ENABLE_ACCESS_DEBUGGING is enabled;
2015-06-01 13:10:45 +03:00
barendgehrels
85a0b53413 [projection] remove now redundant constants 2015-05-31 17:17:29 +02:00
barendgehrels
882be35989 [projections] replace PI variants in generated code 2015-05-31 17:17:08 +02:00
barendgehrels
5229c7a1e3 [projections] replace PI variants in impl code 2015-05-31 17:12:43 +02:00
barendgehrels
b44a01b3c2 [projections] replace HALFPI 2015-05-31 16:50:08 +02:00
barendgehrels
ad2c45132d [projections] changes in replacements of M_PI 2015-05-31 16:40:34 +02:00
barendgehrels
c2fbdd8d83 [projections] change in generation, replace DEG_TO_RAD v.v. by d2r 2015-05-31 16:25:34 +02:00
barendgehrels
f88b1376b9 [projections] add more of original comment 2015-05-31 14:54:40 +02:00
barendgehrels
52ac821bde [projections] add per-file copyright messages 2015-05-31 14:34:09 +02:00
barendgehrels
147df5988f [projections] change in generation 2015-05-31 14:22:51 +02:00
barendgehrels
c3388d7398 [projections] add healpix 2015-05-31 13:26:25 +02:00
Menelaos Karavelas
92a02108de Merge pull request #298 from mkaravel/fix/ticket_11346
Fix for Boost Trac Ticket #11346
2015-05-30 19:35:11 +03:00
Adam Wulkiewicz
f00f4b14c4 [relate] Explicitly specify relate::set<> namespace.
Suppress GCC warnings by casting mpl::size value to std::size_t.
2015-05-30 00:09:08 +02:00
Adam Wulkiewicz
76455f347b Merge branch 'develop' into feature/geographic
Conflicts:
	test/strategies/Jamfile.v2
2015-05-29 16:29:50 +02:00
Menelaos Karavelas
4a396f710f [algorithms][overlay] fix copyright years 2015-05-29 08:56:47 +03:00
Menelaos Karavelas
7cf9a968c9 [algorithms][overlay][relate][turns] propagate the robustness policy
to the computation of turns for overlays of L/L geometries
2015-05-29 01:30:01 +03:00
barendgehrels
b69d9a8203 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-28 23:20:42 +02:00
barendgehrels
40d22d5858 [projections] ad missing includes 2015-05-28 23:18:53 +02:00
barendgehrels
368849319d [projections] resolve ambiguity for older MSVC versions in sqrt(2) 2015-05-28 23:18:23 +02:00
Menelaos Karavelas
c844000d0e Merge pull request #289 from mkaravel/feature/envelope_and_expand_for_spherical_cs
New feature: envelope and expand for spherical equatorial coordinate system
2015-05-28 21:04:06 +03:00
Menelaos Karavelas
2aec831e38 [view][detail][boundary view] fix copyright year 2015-05-28 13:15:09 +03:00
Menelaos Karavelas
6765cdc670 [views][detail][boundary view] add implementation for boundary view:
for areal geometries, i.e., ring, polygon and multi-polygon,
detail::boundary_view<Geometry> provides a view of the boundary of the
geometry as a linear geometry (for rings the boundary view's geometry type
is lineatring, whereas for the other two the boundary view's geometry type
is multilinestring)
2015-05-28 12:01:06 +03:00
Menelaos Karavelas
bf2362ed52 [algorithms][inbtersection] add dispatch implementation for intersection(areal, areal, linear) 2015-05-28 11:57:34 +03:00
Menelaos Karavelas
fdfd875a55 [views][identity view][closeable view] make indentity and closeable views copyable
(by storing a reference wrapper to the range instead of a range reference)
2015-05-28 11:54:53 +03:00
barendgehrels
099652b03c Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-27 23:32:15 +02:00
barendgehrels
ac529bc710 [projections] cast aperture for power (MSVC ambiguity) 2015-05-27 23:22:06 +02:00
barendgehrels
599b7bafb7 [projections] initialize possibly uninitialized variable 2015-05-27 23:21:27 +02:00
barendgehrels
5db1c0216f [projections] initialize possibly uninitialized variable 2015-05-27 23:01:11 +02:00
barendgehrels
dc9cbf1407 [projections] ignore set but unused variable 2015-05-27 23:00:44 +02:00
barendgehrels
355c677f97 [projection] change in generation - move ignore_unused function calls 2015-05-27 22:39:07 +02:00
Adam Wulkiewicz
8730f3741e [policies] Remove obsolete de9im intersection policy. 2015-05-27 15:12:14 +02:00
Adam Wulkiewicz
62f43a5c03 [relate][strategies] Pass StaticMask as function parameter. 2015-05-27 14:04:46 +02:00
barendgehrels
49b37bf4ad [warning] Avoid warning for gcc in svg generation 2015-05-27 13:07:03 +02:00
Menelaos Karavelas
6953933c9b Merge branch 'develop' of https://github.com/boostorg/geometry into fix/ticket_11346 2015-05-27 12:01:12 +03:00
barendgehrels
d506f1645d [buffer] add missing assert 2015-05-27 10:57:07 +02:00
barendgehrels
cdf014e35d [buffer] propagate error information from strategy to buffer inserter 2015-05-27 10:56:56 +02:00
Menelaos Karavelas
585b3bca50 [iterators][segment iterator] fix for boost trac ticket #11346
Problem: segment iterator does not work with point iterators that return
a value instead of a reference when dereferenced.
Fix: check the if the reference type of the point iterator is indeed a
reference or not and use a pointing_segment or a segment as the value type
of the segment iterator, respectively.
2015-05-27 09:19:08 +03:00
Adam Wulkiewicz
593521980a Merge branch 'develop' into feature/relate
Conflicts:
	doc/release_notes.qbk
2015-05-26 17:26:38 +02:00
Adam Wulkiewicz
3893f2085b Merge branch 'feature/relate' of github.com:awulkiew/geometry into feature/relate 2015-05-26 17:19:58 +02:00
Adam Wulkiewicz
79561464bf [relate] Change the order of template parameters (Mask at the end) and remove the mask default parameter. 2015-05-26 17:15:03 +02:00
Adam Wulkiewicz
1df894c44a [centroid][test] Update copyrights. 2015-05-26 00:44:56 +02:00
Adam Wulkiewicz
a7d8da4249 [centroid][strategies] Avoid filling centroid with NaN coordinates.
Check the intermediate results using math::isfinite().

Calculate the output directly using the distance_type/calculation_type
and casting at the end, without converting intermediate results to
coordinate_type.
2015-05-25 15:19:42 +02:00
Adam Wulkiewicz
1bff0ad9e9 [math] Fix equals() for INF and -INF. 2015-05-24 14:26:53 +02:00
Adam Wulkiewicz
b9ee6f0d51 [math] Include missing header and add missing namespace. 2015-05-24 13:48:22 +02:00
barendgehrels
ad088fcf02 [buffer] stop in case of numeric errors in side strategy 2015-05-24 11:22:45 +02:00
barendgehrels
5370e2494d [buffer][math] check for inf when checking on equals
This fixes an error in buffer for geometries with extreme coordinate differences
(though the generated buffer is not correct then)
2015-05-23 23:45:24 +02:00
barendgehrels
2227c30bb4 [buffer] check return value of iterate to avoid using uninitialized points
if iterate fails (this can happen by extreme differences in coordinates)
2015-05-23 22:40:48 +02:00
Menelaos Karavelas
b0290dd8e7 [geometries][helper geometry] add comment about the specialization of default_units
for the Cartesian coordinate system
2015-05-23 00:28:44 +03:00
Menelaos Karavelas
e58f535918 [views][indexed_point_view] fix namespace issue appearing in assign unit test:
Problem: the compiler sees detail::indexed_point_view used inside the traits namespace
and looks it up in traits::detail namespace;
Fix: qualify detail::indexed_point_view with geometry namespace
2015-05-22 10:08:48 +03:00
Menelaos Karavelas
2deae95273 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-05-22 10:06:35 +03:00
Menelaos Karavelas
144fca31b8 [algorithms][envelope][expand] replace use of convert_units<> by bg::transform() 2015-05-22 09:52:24 +03:00
Menelaos Karavelas
6c77395443 [test][algorithms][envelope] rearrange and clean up code 2015-05-22 09:48:04 +03:00
Adam Wulkiewicz
3c958e4200 [buffer][strategies] Replace metafunction pow and divisions with bitwise shifts. 2015-05-20 19:27:10 +02:00
Adam Wulkiewicz
a9f1e7fc3d [buffer][strategies] Fix multiplicable_integral::operator<. 2015-05-20 17:58:53 +02:00
Adam Wulkiewicz
7ffd9d32b2 Merge pull request #297 from awulkiew/fix/buffer
Buffer fixes.
2015-05-20 17:19:23 +02:00
barendgehrels
8f46b81dfa [projections] Ignore unused static functions 2015-05-20 16:57:03 +02:00
Adam Wulkiewicz
c5dd2fd613 [buffer][strategies] Improve style and add comments to multiplicable_integral used in side_of_intersection. 2015-05-20 16:52:59 +02:00
barendgehrels
9ed1ad8445 [buffer][fix] Fix creating ring_properties which are unassigned 2015-05-20 16:28:27 +02:00
barendgehrels
106f7258f6 [Projections] Change in generation (whitespace, comments) 2015-05-20 14:31:52 +02:00
barendgehrels
6c5d7a692a [projections] fix mutable (change in generation) 2015-05-20 12:59:10 +02:00
barendgehrels
571561524a [geometry] Avoid making methods which were static inline 2015-05-20 11:18:02 +02:00
barendgehrels
401b308a83 [projections] change in generation (white space only) 2015-05-20 11:14:33 +02:00
barendgehrels
d44e09f23e [projections] extend documentation (changes in generation) 2015-05-20 11:09:44 +02:00
Menelaos Karavelas
02f6f04107 [util][math] remove convert_on_spheroid.hpp file; functionality is available
via the new algorithm detail::convert_units();
2015-05-20 11:50:06 +03:00
Menelaos Karavelas
1d5a1dd9dd [algorithms][envelope][expand] polish code to follow coding rules;
make use of new detail::normalize() and detail::convert_units() algorithms;
re-implement algorithms so that they are geometry-centric rather that coordinate-centric;
2015-05-20 11:47:29 +03:00
barendgehrels
d1bb625a41 [projections] fix d2r / r2d to new approach 2015-05-20 10:45:18 +02:00
Menelaos Karavelas
b8644092c1 [util][math] deactivate normalization for latitude (it can be activated back if the
macro BOOST_GEOMETRY_NORMALIZE_LATITUDE is defined)
2015-05-20 11:29:50 +03:00
Menelaos Karavelas
ba93049547 [algorithms][disjoint] make use of detail::normalize() algorithm to normalize spherical
and geographic coordinates; also modify algorithm for points in the spherical equatorial
and geographic coordinate systems: check for disjointness also the coordinates with index 2 and above;
2015-05-20 11:27:14 +03:00
Menelaos Karavelas
896b67047d [algorithms][convert_units] add new algorithm detail::convert_units() :
this alghorithm converts the units of points and boxes from degrees to radians
and from radians to degrees (if input and output units are the same the geometry
is not modified)
2015-05-20 11:24:57 +03:00
Menelaos Karavelas
5fa14f06bc [algorithms][normalize] add algorithm detail::normalize() :
this algorithm normalizes the spherical equatorial and geographic coordinates
of points and boxes
2015-05-20 11:23:22 +03:00
Adam Wulkiewicz
b57def597f [buffer] Suppress msvc warnings. 2015-05-20 01:00:01 +02:00
Adam Wulkiewicz
8d3e2b180f [buffer] Replace Multiprecision with temporary solution. 2015-05-20 00:54:17 +02:00
Adam Wulkiewicz
aff4443f06 [relate] Check masks characters, both compile-time and run-time.
Compile-time mask is checked using BOOST_MPL_ASSERT_MSG.
Run-time mask constructors may throw an invalid_input_exception.
2015-05-18 19:09:05 +02:00
Adam Wulkiewicz
8262ee652a [core] Add invalid_input_exception. 2015-05-18 19:05:44 +02:00
Menelaos Karavelas
465fc75ece [util][math] remove unused code 2015-05-18 15:25:22 +03:00
Barend Gehrels
7379fc5094 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-17 09:07:07 +02:00
Menelaos Karavelas
e66f255acf Merge branch 'develop' of https://github.com/boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-05-14 12:23:19 +03:00
Barend Gehrels
f9589da717 [projections] Parse more characteristics 2015-05-13 21:01:47 +02:00
Barend Gehrels
a00979eca0 [projections] fix hypot in generation 2015-05-13 20:57:14 +02:00
Menelaos Karavelas
5a0ef46981 [util][math] add missing inlines in r2d<>() and d2r<>() 2015-05-13 19:30:20 +03:00
Barend Gehrels
9d9ee614a1 Merge branch 'develop' into feature/buffer 2015-05-13 18:01:32 +02:00
Adam Wulkiewicz
605031528d [relate] Fix style according to guidelines and remove unused code/comment. 2015-05-13 17:52:42 +02:00
Adam Wulkiewicz
f94e51ebe3 Merge branch 'develop' into feature/geographic
Conflicts:
	test/strategies/vincenty.cpp
2015-05-13 15:33:46 +02:00
Adam Wulkiewicz
dd2ff33b52 Merge pull request #292 from mkaravel/fix/degree_radian_converter
Fix degree_radian_converter
2015-05-13 14:12:24 +02:00
Adam Wulkiewicz
6029a4cd1b Merge pull request #271 from mkaravel/feature/disjoint_point_point_on_spheroid
New feature: disjoint(point, point) for points on a spheroid
2015-05-13 14:11:35 +02:00
Barend Gehrels
6158064410 [buffer] performance optimization: set the center point for buffers around
(multi)points, calculate min/max radius
and (when checking turn w.r.t. piece) check turn distance to center,
in most cases leave early

Including unit test. For multipoint_b_500k this increases performance with
a factor 6 (340 seconds -> 55 seconds)

Note, this is done for buffers around points but could be done for other
geometry types too (using e.g. centroid)
2015-05-13 13:08:22 +02:00
Barend Gehrels
61d3ae6b78 [buffer] performance improvement for point-pieces:
first check if it is in range

Including adaption of unit tests
Performance goes from 24 seconds (with side_of_intersection)
or 14 seconds (without) to 10 seconds (with side_of_intersection)
2015-05-13 10:58:07 +02:00
Barend Gehrels
b546a6fa21 Merge branch 'develop' into feature/buffer 2015-05-13 10:14:10 +02:00
Barend Gehrels
784a6bcb17 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-13 10:10:44 +02:00
Barend Gehrels
0d97706ffa [projections] fix isea (M_PI) 2015-05-13 10:10:09 +02:00
Adam Wulkiewicz
be0dde6f21 Merge pull request #293 from jeremy-murphy/develop
[projections] fix project_inverse_transformer::apply
2015-05-13 04:09:50 +02:00
Adam Wulkiewicz
e5a6e90280 [relate][strategies] Improve the consistency of implementation and style.
Rename relate_base to relate_impl.
Rename base_t to base_type.
Implement all predefined static masks as metafunction taking two
Geometries (consistency).
Add comments about reasons of commenting out some parts of the code.
2015-05-12 13:53:19 +02:00
Menelaos Karavelas
99788fba57 [algorithms][intersection] update copyright header 2015-05-11 13:38:09 +03:00
Menelaos Karavelas
926bbb8005 [algorithms][intersection] propagate robust policy to
detail::intersection::clip_range_with_box; this fixes Boost Trac ticket #11268;
2015-05-11 13:37:57 +03:00
Jeremy W. Murphy
ab7a00442e [projections] fix project_inverse_transformer::apply
The call to point_to_point was using the wrong namespace and function call.
2015-05-11 14:14:32 +10:00
Menelaos Karavelas
535a7049f9 [geometry] replace uses of constants math::d2r and math::r2d by corresponding free functions 2015-05-08 12:23:23 +03:00
Menelaos Karavelas
fbc568ed51 [strategies][transform] replace constants r2d and d2r by corresponding free functions;
to do so, make sure that the type passed to r2d<>() and d2r<>() is promoted to a
floating point number
2015-05-08 12:21:35 +03:00
Menelaos Karavelas
30f980519f [core][radian access] replace use of constants d2r and r2d by the corresponding free functions 2015-05-08 12:19:18 +03:00
Menelaos Karavelas
1deb1e2097 [util][math] replace constants d2r and r2d by free functions 2015-05-08 12:17:38 +03:00
Menelaos Karavelas
fad1ce69f0 [extensions][ttmath] add missing mathematical functions for ttmath_big
and specialize detail::math::equals for ttmath_big and ttmath::Big<E, M>
2015-05-07 14:00:10 +03:00
Menelaos Karavelas
6661fadf7e [core][radian access] modify implementation of degree_radian_converter
to use conversion constants that are consistent with the coordinate type
of the geometry
2015-05-06 12:50:22 +03:00
Barend Gehrels
9ca4930e6c [projections] fix gn_sinu, remove ellipsoid models for all but sinu
because they are marked as invalid and indeed do not work correctly
2015-05-05 20:37:25 +02:00
Barend Gehrels
50ac56e885 [projections] stere, tmerc: ordered differently (alphabetically per derived projection) 2015-05-05 20:13:18 +02:00
Barend Gehrels
1a1304188c [projections][minor] added whiteline in generation 2015-05-05 20:12:08 +02:00
Barend Gehrels
23d6464615 [projections] aeqd (guam): change in conditions 2015-05-05 20:11:38 +02:00
Barend Gehrels
d460ae8eb8 [buffer] enable side_of_intersection approach by default 2015-05-05 16:43:59 +02:00
Barend Gehrels
c5ef4f912d [buffer][fix] fix errors in multi_point cases
by using side_of_intersection in point_piece
2015-05-05 16:01:08 +02:00
Barend Gehrels
034a5461f0 Merge branch 'develop' into feature/buffer 2015-05-05 10:08:49 +02:00
Barend Gehrels
80da683b77 [projections] (fix in generation) enable dynamic entries of stere,tmerc 2015-05-04 22:51:25 +02:00
Menelaos Karavelas
e8f82e62ea [util][spheroid] add utilities for converting points and boxes on the spheroid
from one unit type to another
2015-05-04 11:10:22 +03:00
Menelaos Karavelas
f224dcc4e6 [algorithms][envelope] add new dispatch struct for envelope algorithm 2015-05-04 11:09:22 +03:00
Menelaos Karavelas
2682c8a370 [algorithms][envelope] fix error in implementation for envelope(ring, mbr) 2015-05-04 11:08:25 +03:00
Menelaos Karavelas
11cb594c19 [algorithms][envelope] when checking intersection with antimeridian, consider
only segments with longitude range strictly less than pi
2015-05-04 10:21:15 +03:00
Menelaos Karavelas
feb780facc [algorithms][buffer] update call to detail:✉️:envelope_range<>() following
the new implementation for envelope
2015-05-04 10:19:27 +03:00
Menelaos Karavelas
f7f9265682 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/envelope_and_expand_for_spherical_cs 2015-05-04 10:18:26 +03:00
Menelaos Karavelas
bb18c201c9 [algorithms][envelope] restore generic implementation for rings (until the implementation
is finished for the spherical equatorial coordinate system)
2015-05-04 10:12:16 +03:00
Menelaos Karavelas
4ce9883a25 [algorithms][expand] re-arrange implementation of the expand algorithm 2015-05-04 10:10:49 +03:00
Menelaos Karavelas
b34f620bc5 [algorithms][expand] move implementation for expand(box, box) to separate file
and add implementation for expand(box, box) in the spherical equatorial and
geographic coordinate systems
2015-05-04 10:09:05 +03:00
Menelaos Karavelas
b2ab23c8bc [algorithms][expand] move implementation for expand(box, segment) to separate
file and implement expand(box, segment) for segments in the spherical
equatorial coordinate system (by reducing to expand(box, box))
2015-05-04 10:06:46 +03:00
Menelaos Karavelas
4041f20114 [algorithms][expand] move implementation for indexed geometries to separate file 2015-05-04 10:06:20 +03:00
Menelaos Karavelas
4a66958b67 [algorithms][expand] move implementation for expand(box, point) to separate file
and add implementation for expand(box, point) for spherical equatorial and geographic
coordinate systems
2015-05-04 09:46:26 +03:00
Menelaos Karavelas
c196ef213c [algorithms][expand] re-implement dispatch struct for expand algorithm and
move it to algorithms/dispatch directory
2015-05-04 09:42:28 +03:00
Barend Gehrels
5e54fbc510 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-05-02 20:55:50 +02:00
Barend Gehrels
b126341d00 [projections] changes in generation, remove redundant empty preceding/trailing lines 2015-05-02 20:55:12 +02:00
Barend Gehrels
b7eb50c9ec [projections] add new projection igh from proj 4.9.1
including unit test in a new unit test using combined projections
2015-05-02 20:54:22 +02:00
Barend Gehrels
9befaa94e4 [projections] re-add empty lines where in original
This makes it closer to original
2015-05-02 20:37:37 +02:00
Barend Gehrels
9d6eb2befa [projections] changes in generation, remove commented fwd/inv/fac 2015-05-02 20:35:56 +02:00
Barend Gehrels
bf623b5d7c [projections] changes in generation - avoid splitting lines 2015-05-02 20:20:54 +02:00
Adam Wulkiewicz
178b0050d7 Merge pull request #257 from mkaravel/feature/set_ops_pointlike_linear
New feature: intersection and difference for pointlike/linear geometries
2015-05-02 04:05:18 +02:00
Adam Wulkiewicz
cb494c9a16 [relate] Fix run-time mask ctor taking a string and add another one.
The fix - prevent overflow.
New ctor taking zero-terminated string.
Furthermore add doxygen documentation for the matrix member functions.
2015-05-01 17:23:58 +02:00
Adam Wulkiewicz
85bcc0c51a [relate] Add relate() and relation() to geometry.hpp
Also adjust doxygen groups.
2015-05-01 02:55:25 +02:00
Adam Wulkiewicz
a461336ca2 [relate] Add variant support for relate() and relation(). 2015-05-01 02:20:30 +02:00
Adam Wulkiewicz
18cb2fe330 [relate] Divide relate() and relation() code into interface and implementation.
Separate the optional code, place it in the details.
2015-05-01 01:30:46 +02:00
Adam Wulkiewicz
7eab5672fa [relate] Move DE9IM-related code into separate file (de9im.hpp).
Move predefined static masks to namespace detail::de9im.
2015-04-30 18:50:12 +02:00
Adam Wulkiewicz
a7fee32a7e [relate] Move relate() code from details and refactor the code.
- Move relate() to geometry namespace and change its purpose slightly - always require a mask and check a relation.
- Implement relation() function returning a matrix (previously relate() did it).
- Move/rename matrix9, mask9 and static_mask to de9im::matrix, de9im::mask and de9im::static_mask respectively.
- Implement logical ORing of static masks with operator||
- Remove or comment-out unneeded code (e.g. comment out the unused de9im struct defined in overlay)
2015-04-30 16:39:37 +02:00
Barend Gehrels
42550568ee [projections] add etmerc (including unit tests) 2015-04-29 16:58:38 +02:00
Menelaos Karavelas
11f8679fb0 [algorithms][envelope] restructure file structure for the envelope algorithm 2015-04-29 17:33:08 +03:00
Adam Wulkiewicz
d2c5b03655 [strategies][huiller] Restore a comment about the subtraction of longitudes. 2015-04-29 16:31:08 +02:00
Menelaos Karavelas
02e7a6d948 [algorithms][envelope] move existing implementation for envelope(multipoint, mbr)
to new file and add implementation for envelope(multipoint, mbr) for the spherical equatorial
and geographic coordinate systems; the latter implementation is reduced to the
maximum gap problem
2015-04-29 17:29:14 +03:00
Menelaos Karavelas
55d4c0640b [algorithms][envelope][spherical] move existing implementation for
envelope(multilinestring, mbr) to new file, add dispatching for
implementation of envelope(multilinestring, mbr) for the spherical
equatorial coordinate system
2015-04-29 17:25:59 +03:00
Adam Wulkiewicz
9e005cb756 [strategy][huiller] Improve the style according to guidelines and use better names for variables. 2015-04-29 16:11:15 +02:00
Menelaos Karavelas
7b807c7b4c [algorithms][envelope][spherical] move existing implementation for
envelope(linestring, mbr) to separate file and add implementation
for envelope(linestring, mbr) for the spherical equatorial coordinate
system
2015-04-29 17:06:42 +03:00
Menelaos Karavelas
d619bd8b07 [algorithms][envelope] add implementation for finding the envelope of a
range of longitude intervals and range of boxes (needed for multi-geometries)
using the maximum gap algorithm for intervals
2015-04-29 17:00:18 +03:00
Menelaos Karavelas
aca2e0497c [algorithms][envelope] adapt old implementation of envelope for ranges
(in the new implementation assign_inverse is not used)
2015-04-29 16:54:21 +03:00
Menelaos Karavelas
ecbc99875a [algorithms][max interval gap] add implementation for the maximum gap
problem for ranges of intervals
2015-04-29 16:50:37 +03:00
Menelaos Karavelas
49fd71739f [algorithms][sweep] add generic visitor-based implementation for sweep-like algorithms 2015-04-29 16:24:39 +03:00
Menelaos Karavelas
c64404808c [algorithms][envelope][spherical] move implementation for envelope(segment, mbr)
to a different file and add implementation for envelope(segment, mbr) for the
spherical equatorial coordinate system
2015-04-29 16:20:27 +03:00
Menelaos Karavelas
ae08aac3a5 [algorithms][envelope][spherical] move existing implementation of
envelope(box, mbr) to separate file and add implementation for
envelope(box, mbr) for boxes in the spherical equatorial and geographic
coordinate systems
2015-04-29 16:10:27 +03:00
Menelaos Karavelas
0d4fb3d438 [algorithms][envelope][spherical] move existing implementation for
envelope(point, mbr) in separate file and implementation for envelope(point, mbr)
for the spherical equatorial and geographic coordinate system
2015-04-29 16:02:13 +03:00
Barend Gehrels
68eac273d3 [projections] expose error code 2015-04-29 14:56:48 +02:00
Menelaos Karavelas
3809006a6c [algorithms][envelope][spherical] implement struct that determines is a segment intersects the antimeridian 2015-04-29 15:54:11 +03:00
Menelaos Karavelas
932d2213ca [util][math][spherical][geographic][normalize] introduce free function
normalize_spheroidal_box_coordinates() that normalizes the coordinates
of a box in the spherical equatorial and geographic coordinate systems
2015-04-29 15:02:45 +03:00
Barend Gehrels
c6eb7748eb [projection] replace redundant comments 2015-04-29 13:46:26 +02:00
Barend Gehrels
2ad12a62f3 [projection] replace exit with throw 2015-04-29 13:40:54 +02:00
Barend Gehrels
c81255cf5e [projections] add new projection isa
include entry in unit test (tested with proj4.9.1)
2015-04-29 13:35:14 +02:00
Barend Gehrels
c5c4c90c87 [projections] omerc, remove now unused inlined function 2015-04-29 13:00:06 +02:00
Barend Gehrels
3937486a0f [projections] changes in white lines 2015-04-29 12:59:37 +02:00
Barend Gehrels
2d3d4780cc [projections] natearth, regeneration 2015-04-29 11:44:20 +02:00
Barend Gehrels
cc5f891b1a [projections] enable sphere for utm, which can be done if the throw
at non par.es is skipped
2015-04-29 11:07:59 +02:00
Barend Gehrels
ca9fa7260d [projections] added spheroid models skipped earlier 2015-04-29 10:51:42 +02:00
Adam Wulkiewicz
7513940369 [strategies] Fix area_huiller for polygons containing points with 0 longitude. 2015-04-29 03:22:24 +02:00
Menelaos Karavelas
a9eb7c648b [util][math][spherical] apply coding rules (put space after !) 2015-04-28 21:32:53 +03:00
Barend Gehrels
d868e4ad61 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-04-28 19:18:38 +02:00
Adam Wulkiewicz
c46eef0659 Merge pull request #284 from mkaravel/feature/add_two_pi_and_half_pi_constants
Add two-pi and half-pi constants
2015-04-28 14:00:26 +02:00
Adam Wulkiewicz
0c59d13c75 Merge pull request #285 from mkaravel/fix/use_disjoint_point_point_in_wkt_write
Reduce dependency on geometry::disjoint algorithm
2015-04-27 16:55:43 +02:00
Menelaos Karavelas
70cc7fdb47 [strategies][spherical][area][huiller] update the URL for one of the references 2015-04-27 17:47:29 +03:00
Barend Gehrels
6d3fb0f11b [projections] remove old variable warning protections 2015-04-27 15:50:18 +02:00
Barend Gehrels
a8282b5383 [projections] fix missing inline calls 2015-04-27 15:49:50 +02:00
Menelaos Karavelas
914c2e5f80 [io][wkt] reduce dependency on geometry::disjoint algorithm by calling
detail::disjoint::disjoint_point_point
2015-04-27 15:07:33 +03:00
Menelaos Karavelas
7031e84c95 [extensions][ttmath] fix wrong definition of pi and half-pi for ttmath::Big<> 2015-04-27 13:44:15 +03:00
Menelaos Karavelas
9c50c6f02c [util][math] use math::two_pi<>() and math::half_pi<>() instead of computing them from math::pi<>() 2015-04-27 12:58:35 +03:00
Menelaos Karavelas
3800cb4830 [strategies][spherical][area] use math::two_pi<>() and math::half_pi<>()
instead of computing them from math::pi<>()
2015-04-27 12:48:47 +03:00
Menelaos Karavelas
d895a12b96 [strategies][cartesian][buffer] use math::two_pi<>() instead of computing it from math::pi<>() 2015-04-27 12:48:02 +03:00
Menelaos Karavelas
1c3fba8b54 [extensions][ttmath] add specializations for define_two_pi and define_half_pi 2015-04-27 12:43:05 +03:00
Menelaos Karavelas
5c13b26592 [util][math] add free functions for recovering 2*pi and pi/2 2015-04-27 12:41:51 +03:00
Barend Gehrels
01b20f50da [projections] fixes in ignore_unused
Now checked by scanning if really (un)used
2015-04-26 23:18:15 +02:00
Barend Gehrels
eec5d4efd0 [projections] ob_tran, changes in generation 2015-04-26 18:02:35 +02:00
Barend Gehrels
0e06548aa6 [projections] small changes in generation (chamb/lcca) 2015-04-26 15:44:16 +02:00
Barend Gehrels
121f8b39c1 [projections] changes in includes, especially hypot, only necessary
in a few cases, and changes in order
2015-04-26 14:47:22 +02:00
Barend Gehrels
9f99289551 [projections] changes in mdist conform enfn/authset 2015-04-26 14:30:15 +02:00
Barend Gehrels
866aae97e0 [projections] changes in authset, conform enfn 2015-04-26 14:27:19 +02:00
Barend Gehrels
5607fa25b3 [projections] changes in generation (enfn)
result is closer to original
2015-04-26 12:36:59 +02:00
Barend Gehrels
9f9d59a515 [projections] add const (was accidentally removed in one function two commits away) 2015-04-26 10:56:15 +02:00
Barend Gehrels
e15b685a8d [projections] ONLY changes in empty lines (in generation) 2015-04-26 10:49:14 +02:00
Adam Wulkiewicz
105886e991 Merge pull request #283 from awulkiew/fix/arithmetic
Fix point arithmetic functions and centroid
2015-04-26 00:55:12 +02:00
Adam Wulkiewicz
a48df2a153 [extensions][wkb] Improve the coding style according to guidelines.
- use full names
- improve the indentation of template parameters lists
- comment-out the unused parameters names
2015-04-26 00:46:10 +02:00
Barend Gehrels
24f070a037 [projections][imw_p] changes in conversion (staying more close to original) 2015-04-25 20:58:02 +02:00
Barend Gehrels
3344766910 [projections] remove redundant return statements 2015-04-25 19:39:42 +02:00
Adam Wulkiewicz
ed7dc5f1df [arithmetic] Improve style according to guidelines.
- names
- lines length
2015-04-25 16:36:59 +02:00
Barend Gehrels
e4d49f1302 [projections] update to 4.9.1 (rest, no changes)
and removed some trailing spaces
2015-04-25 16:06:58 +02:00
Barend Gehrels
0e3ea68f54 [projections] add qsc from proj 4.9.1 2015-04-25 15:40:45 +02:00
Barend Gehrels
8c6b79b97e [projections] Upgrade to proj 4.9.1 for aeqd, geos, omerc
This does not need changes in unit tests.
2015-04-25 13:26:57 +02:00
Barend Gehrels
5c5ac136a7 [projections][aitoff] go to proj 4.9.1 which adds an invert projection for aitoff
includes unit test
2015-04-25 13:19:48 +02:00
Barend Gehrels
6877796160 Merge branch 'develop' of github.com:boostorg/geometry into develop 2015-04-25 13:16:39 +02:00
Adam Wulkiewicz
42d56f6116 [util][arithmetic] Fix a bug in point arithmetic operations.
Use more precise type for the calculation of the result.
Previously the type of the second operand was always used.
2015-04-24 17:20:15 +02:00
Adam Wulkiewicz
0f62bdc57e [extensions][wkb] Fix access to polygon rings + style changes.
Use return type (a reference) instead of copying rings.

Furthermore improve the code according to guidelines:
- put const keyword after the type
- take care about lines length
- add copyright notes
2015-04-24 13:23:24 +02:00
Adam Wulkiewicz
ed52199def [extensions][wkb] Fix GCC compilation errors and warnings. 2015-04-23 23:28:37 +02:00
Barend Gehrels
623a488abd [projections] ONLY: use boost::ignore_unused now 2015-04-23 19:42:01 +02:00
Barend Gehrels
6b3996da01 [projections] ONLY: updated copyright message 2015-04-23 19:32:17 +02:00
Barend Gehrels
0882d5adfc [projections] ONLY: fixed withspace 2015-04-23 19:27:02 +02:00
Adam Wulkiewicz
98aa98eedf Merge pull request #255 from mkaravel/feature/disjoint
Feature/disjoint: implement disjoint for multipoint/[multi]linestring
2015-04-23 17:23:05 +02:00
Adam Wulkiewicz
fbc453bb20 Merge pull request #145 from Norkart/add_wkb
Add support for writing geometries to WKB
2015-04-23 17:21:46 +02:00
Menelaos Karavelas
07b96a8f9e [algorithms][overlay P/L] replace detail::disjoint::disjoint_point_segment
by detail::disjoint::reverse_covered_by
2015-04-23 10:15:24 +03:00
Menelaos Karavelas
ee8d0ea335 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/set_ops_pointlike_linear 2015-04-23 10:13:54 +03:00
Menelaos Karavelas
7bd759dd0b [algorithms][disjoint] replace detail::disjoint::disjoint_point_segment
by detail::disjoint::reverse_covered_by
2015-04-23 10:04:50 +03:00
Menelaos Karavelas
be910c04e2 Merge branch 'develop' of https://github.com/boostorg/geometry into feature/disjoint
Conflicts:
	doc/release_notes.qbk
2015-04-23 09:47:46 +03:00
Mats Taraldsvik
fb057e0832 [extensions][wkb] Support writing geometries to WKB format
Adds support for writing geometries to WKB format. This adds support for
writing point, linestring and polygon.
2015-04-23 08:11:28 +02:00
Mats Taraldsvik
ea22fa9540 [extensions][wkb] Change handling of wkb geometry_type to be more generic
The geometry type is changed to be more flexible
and able to handle multiple formats and different
dimensions in the future.
2015-04-23 08:11:15 +02:00