summaryrefslogtreecommitdiff
path: root/include/mbgl/util/geo.hpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Fix MapSnapshotter build failure on WindowsAnder Conselvan de Oliveira2019-11-131-7/+2
| | | | | | | | MSVC implementation of std::promise is buggy and only works with types that can be default-constructed. To avoid a compilation failure in the instantiation of ask() inside MapSnapshotter::getRegion(), which creates a std::promise<LanLngBounds>, make LatLngBounds' default constructor public.
* [core] Fix performance-move-const-argThiago Marcos P. Santos2019-09-251-2/+1
|
* [core] Remove optional from Map::setLatLngBounds()Ander Conselvan de Oliveira2019-03-141-1/+14
| | | | | | | | This is a first step into grouping together bounds related Map methods into one that takes a "BoundOptions" object. LatLngBounds::unbounded() replaces an undefined optional<LatLngBounds>. v2: Document LatLngBounds::unbounded()
* [core] Use unwrapped longitude for bounds checkBruno de Oliveira Abinader2019-02-261-9/+4
|
* [core] Avoid wrapping longitude values of exactly 180 and 360 (#12797) (#13006)Ryan Hamley2018-10-241-1/+1
|
* Support TileJSON bounds property (#10701)Asheem Mamoowala2018-01-051-74/+4
| | | | | | | | * [core] Parse TileJSON bounds property * [core] Add TileRange and LatLngBounds::contains(CanonicalTileID) Move LatLngBounds::contains impl to cpp file * [core] Skip tile creation outside of tileset bounds * [core] Fix TileRange for wrapped bounds and use for CustomTileLoader instead of LatLngBounds comparisons for tiles.
* [core] Support wrapped bounds in LatLngBounds::contains and ↵Asheem Mamoowala2017-12-071-15/+74
| | | | LatLngBounds::intersect.
* [core] Add LatLngBounds::contains(const LatLngBounds&)Asheem Mamoowala2017-10-301-0/+7
|
* [core] Move ProjectedMeters to projection.hppJohn Firebaugh2017-04-181-28/+0
|
* [core] Tighten geo.hpp ctorsBruno de Oliveira Abinader2017-04-141-41/+70
|
* [core] Revert use of optional<EdgeInsets>, because EdgeInsets has a natural ↵John Firebaugh2017-04-111-0/+3
| | | | "empty" state
* [core] Added LatLngBounds::{valid,constrain}Bruno de Oliveira Abinader2017-04-111-0/+15
|
* [all] Make LatLng coordinates read-onlyJohn Firebaugh2017-04-061-37/+41
|
* [core] Tighten LatLng and other geo.hpp classesJohn Firebaugh2017-04-061-17/+18
| | | | | * Remove LatLng::null and enforce invariants * Remove unnecessary operator bool()
* [core] Added Map::latLngBoundsForCameraBruno de Oliveira Abinader2017-03-241-0/+8
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-4/+4
|
* [core] code style cleanupsKonstantin Käfer2016-07-011-4/+4
| | | | | | | - puts function definitions in a namespace ... {} rather than using namespace ...; - remove trailing whitespace - add trailing newline - protect SQL statements from being formatted by clang-format
* [core] Cleaned up enum classesBruno de Oliveira Abinader2016-06-181-7/+7
| | | | | - Replaced static_cast with C++ casts. - Replaced inline with constexpr.
* [tidy] Check modernize-pass-by-valueBruno de Oliveira Abinader2016-06-131-2/+2
| | | | Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
* [test] Added Projection testsBruno de Oliveira Abinader2016-06-131-2/+6
|
* [core] use #pragma once instead of ifdef include guardsKonstantin Käfer2016-05-251-4/+1
|
* [core] Introduce StyleQueryParameters; push coordinate calculations into SourceJohn Firebaugh2016-05-171-0/+2
|
* [core] Use mapbox::geometry::box in queryRenderedFeaturesJohn Firebaugh2016-05-131-0/+2
|
* [core] Remove unusedJohn Firebaugh2016-05-131-13/+0
|
* [core] move TileData and dependents to new *TileID classesKonstantin Käfer2016-05-101-3/+5
|
* [core] Use geometry.hpp's pointJohn Firebaugh2016-05-051-2/+4
|
* [core] Inline LatLng::project definition the one place it's usedJohn Firebaugh2016-05-051-2/+0
|
* [core] Privatize math.hpp and vec.hppJohn Firebaugh2016-05-051-1/+1
|
* [core] Simplify LatLng::unwrapForShortestPath usageBruno de Oliveira Abinader2016-03-141-9/+8
| | | | | | | | | | Simplify LatLng::{wrap,unwrapForShortestPath} code, avoiding duplicated code between Transform::{latLngToScreenCoordinate,easeTo,flyTo}. Added unit tests for camera usage in Transform to detect cases like e.g. crossing the antimeridian as a shortest path between two coordinates. Transform::flyTo precision loss to be handled in #4298.
* [core] Implement LatLng::null()Bruno de Oliveira Abinader2016-03-131-0/+4
|
* [core] Check for NaNs in EdgeInsetsBruno de Oliveira Abinader2016-03-101-2/+3
|
* [core] Coordinate wrapping fixesBruno de Oliveira Abinader2016-03-101-13/+11
| | | | | | | | | | | | | | | - Make returning LatLngs unwrapped by default. - PointAnnotation and ShapeAnnotation are always wrapped so they can be selected via intersection from the visible tile boundaries. - Fixes LatLng::wrap() calculation. - Fixes LatLng::unwrapForShortestPath() calculation. The new unwrapForShortestPath algorithm unwraps the start coordinate either forwards or backwards depending on the end coordinate value, so we can always cross the antimeridian when needed and still obtain a wrapped end coordinate in the end. Fixes #4214.
* [core] Regression fix in LatLng::unwrapForShortestPathBruno de Oliveira Abinader2016-03-031-1/+5
| | | | | | | When porting this from Transform::unwrapLatLng, I forgot to check for the second alternative. Fixes #4174.
* [core] Added DEGREES_MAX as constant valueBruno de Oliveira Abinader2016-03-011-1/+1
|
* [core] Moved wrapping to LatLng scopeBruno de Oliveira Abinader2016-03-011-4/+22
| | | | Fixes a precision loss when converting unwrapped LatLngs.
* [core] PrecisionPoint is now ScreenCoordinateBruno de Oliveira Abinader2016-03-011-3/+3
|
* [core] Comparison operators for LatLngBoundsJohn Firebaugh2016-02-031-0/+11
|
* [core] Make bool conversions explicitJohn Firebaugh2016-02-031-4/+12
| | | | Implicit bool conversions are bad; they'll be used e.g. for a == b and a != b if those operators are not defined. This was happening at https://github.com/mapbox/mapbox-gl-native/blob/032c8fba3c8e3c122dd399b5c9341d92ad9d286f/src/mbgl/map/transform.cpp#L132-L132, for example.
* [core] Improve LatLngBounds APIJohn Firebaugh2016-02-021-9/+47
| | | | | | | * Use "named constructors": empty, world, hull * Make the two-argument constructor lenient (i.e., it is a hull operation) * Add various accessors * Enforce a single empty representation
* [core] Remove superflous inlinesJohn Firebaugh2016-02-021-18/+18
|
* [core] Remove unusedJohn Firebaugh2016-02-021-4/+0
|
* [core] Don't use structJohn Firebaugh2016-02-011-5/+10
| | | | It makes forward declarations inconsistent and liable to change, for no real gain.
* [ios] Flip points, not edge insetsMinh Nguyễn2016-01-181-2/+0
|
* [core] Added padding option to CameraOptionsMinh Nguyễn2016-01-181-0/+34
| | | | | | Moved EdgeInsets to geo.hpp so CameraOptions and Transform can refer to it. Added a padding option to CameraOptions that alters the frame of reference for the center option. Added optional padding parameters to LatLng getters and setters. Working towards #2600.
* [core] allow changing the orientationKonstantin Käfer2015-12-151-0/+8
| | | | You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
* [core] add namespace comment to closing braceKonstantin Käfer2015-12-031-1/+1
|
* [core] Fix LatLngBounds default coordinatesBruno de Oliveira Abinader2015-11-181-3/+10
| | | | | | | | | LatLngBounds southwest and northeast coordinate points were inverted, so they could be extended via LatLngBounds::extend(). However, this looks confusing and error-prone. A static LatLngBounds::getExtendable() is added to address cases when we want to extend LatLngBounds.
* [core] PrecisionPoint is now a vec2<double>Bruno de Oliveira Abinader2015-11-121-17/+7
| | | | | We could reuse all the operators defined in vec2<>, including operator bool() that checks if the contained values are !NaN.
* [core] Added MetersBoundsBruno de Oliveira Abinader2015-11-111-1/+13
|
* [core] Added PrecisionPoint to represent pixel pointsBruno de Oliveira Abinader2015-11-111-1/+15
|