Commit Graph

3963 Commits

Author SHA1 Message Date
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
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
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
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
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
dc8ff59096 [extensions][dissolve] Add support for intersection strategy. 2017-04-14 01:07:30 +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
Adam Wulkiewicz
a29281d143 [strategies] Add missing const and explicit keywords. 2017-03-30 18:20:41 +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
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
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
a826d5b536 [get_turns] fix: fix distance_measure 2017-03-13 16:09:18 +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
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