Mathis Logemann
d610671327
try install json and wkt again
2021-07-02 16:02:30 +02:00
Mathis Logemann
4879efce58
Merge branch 'master' of https://github.com/mapnik/mapnik into cmake-support
2021-04-22 19:41:35 +02:00
Artem Pavlenko
88a15daf93
Fix parse_svg_value
2021-04-22 11:36:10 +01:00
Artem Pavlenko
a1cb756fa0
SVG parse_svg_value: update is_percent
only if parsing successful
2021-04-19 18:02:24 +01:00
Artem Pavlenko
3031b7cf6a
SVG parse_svg_value/parse_font_size: re-initialise default val on parser failure
2021-04-19 08:55:39 +01:00
Artem Pavlenko
7c5f4539e1
Fix error message + update SVG parser unit test
2021-04-15 16:29:05 +01:00
Artem Pavlenko
654a3c1f9f
SVG : refactor and simplify width/height+viewBox logic ( https://www.w3.org/TR/SVG11/struct.html#SVGElement ) + check font_sizes_
size before accesing last element
2021-04-15 15:38:59 +01:00
Artem Pavlenko
0feabeb7e8
SVG circle: ignore when r = 0
2021-04-13 13:48:05 +01:00
Artem Pavlenko
f293371a9d
SVG rendering improvements:
...
* process `font-size` attributes and use them to scale `em` units
* fix default `color-stop` value
* store `viewBox` and use it to calculate `%` values correctly
* add more absolute/relative values
* default `DPI`:96
* default `font-size`: 10
* process style attributes on `<svg>` element
* use viewBox `width`, `height` and `normalized_diagonal` for relevant length values
* apply scale factor to gradient transforms
2021-04-13 09:19:33 +01:00
Mathis Logemann
e1fa32f21f
install dependencies. Required for windows (and ?macos?). Needs testing on linux.
2021-04-10 14:36:22 +02:00
Mathis Logemann
9049a7e58d
Merge branch 'master' of https://github.com/mapnik/mapnik into cmake-support
2021-04-06 17:27:28 +02:00
Artem Pavlenko
b974a4a683
Simplify proj_transform_cache implementation (ref https://github.com/mapnik/mapnik/pull/4191#issuecomment-813377082 )
2021-04-06 10:30:12 +01:00
Mathis Logemann
ee90425de1
fixes proj_transform_cache incomplete type for gcc
2021-04-01 17:57:20 +02:00
Mathis Logemann
b1e1ea66f5
try fix linux take II
2021-04-01 16:03:58 +02:00
Mathis Logemann
7121bd6fbf
Revert "hopefully fix unstatisfied proj_transform_cache"
...
This reverts commit d2066da339
.
2021-04-01 15:55:57 +02:00
Mathis Logemann
d2066da339
hopefully fix unstatisfied proj_transform_cache
2021-03-31 20:25:46 +02:00
Mathis Logemann
c29c84327a
add proj_transform_cache to source list
2021-03-25 13:34:25 +01:00
Mathis Logemann
f8b159f8ff
Merge branch 'proj6' of https://github.com/mapnik/mapnik into cmake-support
2021-03-25 13:26:30 +01:00
Artem Pavlenko
503b9c5bbf
Move proj_transform_cache declarations and implementaion into separate translation unit (ref VC++ C2492)
2021-03-25 12:16:15 +00:00
Mathis Logemann
4eed15f87a
Merge branch 'proj6' of https://github.com/mapnik/mapnik into cmake-support
2021-03-24 23:30:50 +01:00
Artem Pavlenko
3a302667a1
Fix return value (MAPNIK_WEBMERCATOR_PROJ is not geographic SRS)
2021-03-24 09:42:52 +00:00
Artem Pavlenko
6b9b42f314
Declare proj_cache_
thread_local static
to allow mapnik::Map to be thread-safe under certain conditions + refactor
...
(benchmark/src/test_rendering_shared_map.cpp)
2021-03-18 16:05:58 +00:00
Mathis Logemann
36be4fe594
renamed target mapnik::headers to mapnik::core
2021-03-18 15:35:55 +01:00
Artem Pavlenko
6099804559
Use POSIX definition of pi
constant (M_PI) + define tau
in terms of pi
+ better namings + remove deprecated proj4 style definitions
2021-03-15 18:06:26 +00:00
Mathis Logemann
79d369db1f
Merge branch 'master' of https://github.com/mapnik/mapnik into cmake-support
2021-03-15 08:52:15 +01:00
Artem Pavlenko
977c65e9de
Fix proj_transform order in Map::query_point
2021-03-09 11:33:21 +00:00
Artem Pavlenko
7cbbd7305b
Map::mapnik - restore non-const access to layers + create proj_transform and cache in get_proj_transform
+ declare proj_cache_
mutable
2021-03-09 10:48:32 +00:00
Artem Pavlenko
b532beccde
mapnik::Map ctor/operator= - initialise proj transforms
2021-03-04 10:19:44 +00:00
Artem Pavlenko
b75737fd6a
Implement proj_transform caching using boost::unordered_map which allows calling find
method with compatible key type.
...
In this case `std::pair<boost::string_view, boost::string_view>` avoiding potentially expensive temp string keys.
(TODO: In the future use c++20 `std::unordered_map::find` transparent keys facility)
2021-03-03 15:01:58 +00:00
Artem Pavlenko
11ff758c38
Add proj_transform::definition() method
2021-03-02 17:07:13 +00:00
Artem Pavlenko
a149ebed16
use std::size_t consistently (proj API)
2021-03-02 16:39:32 +00:00
Artem Pavlenko
cb75f00780
Move proj_transform initialisation to add_layer
method
2021-02-25 11:05:11 +00:00
Mathis Logemann
dec9056511
remove unnecessary cmake_minimum_required from sub projects
2021-02-03 19:14:08 +01:00
Artem Pavlenko
5c086b0cd5
Add proj_transform caching to minimise expensive initialisations calls in libproj >= 6 [WIP]
2021-01-27 09:40:28 +00:00
Mathis Logemann
953796645f
enable position independent code for wkt and json
2021-01-24 19:35:21 +01:00
Artem Pavlenko
db9829d702
Fix missing proj context and cleanup/simplify proj_transform
2021-01-22 15:23:11 +00:00
Artem Pavlenko
6cc353f8a2
Use 'proj_backward_strategy' and avoid creating an extra proj_transform
2021-01-22 15:22:18 +00:00
Artem Pavlenko
ff14ad3425
Link to libsqlite3 when required
2021-01-21 12:47:41 +00:00
Artem Pavlenko
19511463ab
Include <cmath> for HUGE_VAL
2021-01-21 12:46:57 +00:00
Artem Pavlenko
88241b32ee
Initial implementation of new proj7 APIs support
2021-01-15 15:21:09 +00:00
Artem Pavlenko
bd961c4da2
update copyright year [skip ci]
2021-01-05 14:39:07 +00:00
Mathis Logemann
f432018bdb
added cache variable for lib/bin/archive output
2020-11-25 12:16:06 +01:00
Mathis Logemann
45fd654898
added MAPNIK_DECL to interior and polylabel explicit template
2020-11-21 18:19:58 +01:00
Mathis Logemann
99d8c3e503
fix cmake typo
2020-11-21 18:04:24 +01:00
Mathis Logemann
695ad02cb2
fix svg renderer
2020-11-21 18:01:48 +01:00
Mathis Logemann
0eb0408cc3
add options for grid/svg renderer
2020-11-21 17:03:30 +01:00
Mathis Logemann
3eb00b9794
use feature test for <execution>
2020-11-21 15:41:03 +01:00
Mathis Logemann
096befe69e
try with c++14
2020-11-21 15:34:13 +01:00
Mathis Logemann
744aa2a76a
do not compile features....
2020-11-21 15:02:07 +01:00
Mathis Logemann
9213f76d49
do not compile features if they are not set
2020-11-21 14:54:26 +01:00
Mathis Logemann
6254f7c09e
more cmake
2020-11-21 11:34:45 +01:00
Mathis Logemann
7d46eda60d
more options
2020-11-21 10:09:29 +01:00
Mathis Logemann
d86a90a10a
more cmake
2020-11-20 21:15:27 +01:00
Mathis Logemann
e6f6d0f133
more cmake
2020-11-20 20:20:28 +01:00
Mathis Logemann
64054fade4
compiler independent warning ignore
...
Signed-off-by: Mathis Logemann <mathisloge@gmail.com>
2020-11-19 17:25:10 +01:00
Artem Pavlenko
fba418d20b
<execution> is available starting from c++17
2020-09-10 18:00:12 +01:00
Artem Pavlenko
adced85761
Implement is_solid
using stdlib <algorithm> `find_if
2020-09-10 15:57:19 +01:00
Artem Pavlenko
8913b673c3
remove unused function
2020-07-09 12:57:37 +01:00
Artem Pavlenko
4bd05cec22
Add missing include (bootstrap build)
2020-06-15 14:38:23 +01:00
Artem Pavlenko
8f3dded093
Re-implement feature_json_generator by adapting feature_impl into boost::fusion container and removing use semantic actions (simpler code + boost_1_73 support) (ref #4143 )
2020-05-11 22:18:55 +01:00
Artem Pavlenko
d0b40f62dc
Relax bounding box extracting grammar (ref #4140 ) + unit test
2020-05-07 11:35:53 +01:00
Martin Ždila
657442947b
add support for spacing-offset
2020-03-23 23:07:49 +01:00
Artem Pavlenko
8d73767949
css-parser-grammar: parse values into iterator_range via boost::spirit::x3::raw directive (no conversions) + cleanup
2020-02-06 11:23:02 +00:00
Artem Pavlenko
c69e467ad0
SVG: basic CSS styles processor (TODO: fix inefficient and redundant value=>string=>value transformations)
2020-02-05 15:03:14 +00:00
Artem Pavlenko
2ddbff46d5
add bool css_style_ member variable to control CSS style processing.
2020-02-04 17:30:58 +00:00
Artem Pavlenko
27bf941211
SVG CSS: refactor unit value symbols table into separate header + add css_data member to svg_parser
2020-02-04 15:02:41 +00:00
Artem Pavlenko
b6e567d87c
SVG CSS: add basic parsing of <style> [C]DATA
2020-02-04 11:41:22 +00:00
Artem Pavlenko
4d54e81889
Use char const* as iterator type for CSS grammar
2020-02-04 11:40:52 +00:00
Artem Pavlenko
8a90551b63
SVG CSS - add <style> element handler
2020-02-04 11:25:35 +00:00
Artem Pavlenko
00b888c1ef
Add CSS parser grammar + move into separate include/css and src/css dirs.
2020-02-04 10:38:34 +00:00
Artem Pavlenko
1a0b1a1e77
SVG parser: fix typo (stroke gradient was applied instead if fill gradient)
2020-01-21 11:01:36 +00:00
Artem Pavlenko
b4b5f393e3
Revert "no need to throw std::runtime_error as ellipsis catch (...) {}
catches them all."
...
This reverts commit c5f3e6c654
.
2020-01-14 15:20:25 +00:00
Artem Pavlenko
c5f3e6c654
no need to throw std::runtime_error as ellipsis catch (...) {}
catches them all.
...
(TODO: consider having finer grained catches e.g expectation_failure)
2020-01-14 14:34:39 +00:00
Artem Pavlenko
cfa5809cd2
Make x3::rules declarations const
2019-11-25 10:36:34 +00:00
Artem Pavlenko
5482d8c7e2
Conditionally include <mapnik/image_filter_types.hpp> for BOOST_VERSION < 107000
2019-11-20 09:41:23 +00:00
Artem Pavlenko
9dac8dcc34
Only push new elements to parenStack
when needed (via @lightmare) (ref #4096 )
2019-11-18 08:45:03 +00:00
Artem Pavlenko
7003255c0e
avoid negative indicies access to parenStack
- thanks @talaj! (ref #4096 )
2019-11-05 09:50:51 +00:00
Artem Pavlenko
33fac6d47d
use std::vector to avoid limiting number of paired characters.
2019-11-04 13:59:23 +00:00
Artem Pavlenko
8aae32ec4c
better syntax
2019-11-01 17:09:12 +00:00
Artem Pavlenko
1edd3b7a93
use & mask
for array bounds clipping (provided array size is 2^n)
2019-11-01 16:16:57 +00:00
Artem Pavlenko
dec6bc0950
avoid potential out-of-bounds array access (undefined behaviour) + add c++ C-array
size implementation
2019-11-01 13:06:21 +00:00
Artem Pavlenko
b60de49388
make sure boost 1_69 works too
2019-10-21 17:18:25 +01:00
Artem Pavlenko
0b4f3dc497
fix support for BOOST 1_71
2019-10-21 16:42:58 +01:00
Artem Pavlenko
05546b2053
add 'pattern' to unsupported elements + call handle_unsupported
on end_element to catch them all + update unit tests
2019-08-08 11:50:31 +01:00
Artem Pavlenko
fa714f2a01
Merge branch 'libxml2-parse-huge' of https://github.com/tarvip/mapnik into tarvip-libxml2-parse-huge
2019-07-02 11:02:59 +01:00
Nikita Kniazev
c191e196c0
Replace MAPNIK_INIT_PRIORITY workaround
...
Spirit rules are just placeholders. They are cheap to construct and by doing
this static initialization order fiasco problem is effectively avoided.
Also had to fix name clash between geojson and generic json parsers.
2019-07-02 01:04:31 +03:00
Artem Pavlenko
e90a4fca7d
add missing image scaling
property meta type + replace to integer conversion with comparison operator in enumeration_wrapper + change order in value_base_type (ref #4045 )
2019-06-12 09:40:10 +01:00
Jiri Drbalek
a74543a145
New raster colorizer modes linear-rgba and linear-bgra
2019-05-17 21:54:24 +02:00
Artem Pavlenko
201268334d
Don't prefix MAPNIK_LOG_ERROR with redundant "SVG PARSING ERROR"
2019-05-14 10:48:21 +01:00
Artem Pavlenko
831e353c5d
SVG parser: better stderr - don't assume fill/stroke ref is a <gradient>, can be a <pattern> also.
2019-05-14 10:30:26 +01:00
Artem Pavlenko
dc15e70f79
Skip parsing (currently unsupported) <pattern> elements
2019-05-14 10:20:14 +01:00
Artem Pavlenko
88f3b29a92
fix includes
2019-05-07 11:19:37 +01:00
Tarvi Pillessaar
ddf0f337c2
libxml2: add support for huge XMLs
2019-04-14 16:42:57 +03:00
Michael Holloway
918e1a3a90
Ditch rint
...
Removes all usages of rint from the codebase, in favor of the standard
rounding and casting formula used throughout the codebase:
static_cast<int>(std::floor(<val> + .5))
Fixes #2392
2019-03-22 14:23:32 -04:00
Artem Pavlenko
b1185fc099
Merge pull request #4031 from mapycz/adaptive-smooth
...
[WIP] Adaptive smooth
2019-02-13 14:00:00 +00:00
Jiri Drbalek
2dde0eb257
Adaptive smooth
2019-02-09 15:24:12 +00:00
Jiri Drbalek
c2b1103cb6
Cairo: set version of SVG to 1.2
2019-02-08 12:32:01 +00:00
talaj
7dcf5ee082
Merge pull request #3989 from mapycz/fix-pattern-alignment
...
True global pattern alignment, fixed local alignment
2018-11-02 14:31:31 +01:00
Artem Pavlenko
da69fdf66b
add "clipPath" to unsupported elements
2018-10-10 09:30:05 +01:00
Artem Pavlenko
982f156995
enable unsupported attributes handling + ignore/skip any elements inside <symbol>
2018-10-02 09:34:07 +01:00
Jiri Drbalek
776fa0d2f8
True global pattern alignment, fixed local alignment
2018-09-19 13:21:59 +00:00
Jiri Drbalek
692fc7f107
render_pattern() needs its own rasterizer
2018-09-19 08:33:24 +00:00
Jiri Drbalek
384158fa7c
Polygon pattern on line geometries for Grid backend
2018-09-18 12:12:21 +00:00
Jiri Drbalek
d823378260
Polygon pattern on line geometries for Cairo backend
2018-09-18 12:12:21 +00:00
Jiri Drbalek
18c1a99604
Polygon pattern on line geometries for AGG backend
2018-09-18 12:12:21 +00:00
Jiri Drbalek
8b27aba0c4
Fix seams of mesh faces when warping transparent raster
2018-08-07 11:57:38 +00:00
Artem Pavlenko
af842a8bf9
Merge branch 'pi-is-wrong' of https://github.com/lightmare/mapnik into lightmare-pi-is-wrong
2018-07-30 10:40:51 +01:00
Jiri Drbalek
4a93209423
render building symbolizer rewrite
...
- make projection and view transforms first
- removed dependency on segment_t
- no need for sorting faces
2018-07-27 10:23:33 +00:00
Artem Pavlenko
65080e2a95
add support for BOOST_VERSION < 106700
2018-07-23 10:58:27 +01:00
Artem Pavlenko
4c31bd16d2
Merge branch 'master' into boost_1_67
2018-07-18 09:27:56 +01:00
Mickey Rose
68a7f5f63c
proj_transform: fix strided coordinate array transform
2018-07-16 14:18:49 +02:00
Mickey Rose
f84191204e
eradicate M_PI
2018-07-16 14:18:49 +02:00
Mickey Rose
32e7202223
well_known_srs: move implementation to .cpp
...
- add lonlat2merc, merc2lonlat overloads for single point
- add stride argument to overloads for coordinate arrays
- make all functions exported
- change static string constants to exported
- change static numeric constants to constexpr
- remove superfluous numeric constants
2018-07-16 14:18:32 +02:00
Mickey Rose
a0a2c78950
util/math: clamp, degrees, radians
...
Use common functions for degrees <-> radians conversions, except when
dealing with agg, where it makes sense to use available deg2rad/rad2deg
functions instead of including another header.
2018-07-13 12:34:25 +02:00
Mickey Rose
0a6e82e555
move src/math.cpp under src/util/
2018-07-11 23:55:21 +02:00
Mickey Rose
7c4ccf0209
make util::normalize_angle reasonably fast on large values
...
Because it simply calculates the remainder after division by full turn,
it shouldn't take time proportional to the magnitude of its operand.
2018-07-11 23:14:23 +02:00
Mickey Rose
25f0ef09a5
use MAPNIK_VERSION_AT_LEAST for minimum-version check
2018-07-11 10:43:06 +02:00
Mickey Rose
947e424f56
proj_transform: fix bbox reprojection
...
- remove buggy calculate_bbox, use boost::geometry::envelope instead
- move helper envelope_points to anonymous namespace and make it always
produce exactly the requested number of points, even if it's not
evenly divisible by 4
2018-07-10 11:31:06 +02:00
Dane Springmeyer
434511ca3b
fix to only throw in strict mode
2018-06-24 19:08:38 -07:00
Dane Springmeyer
7673bbe827
only throw on duplicate styles in strict mode
2018-06-24 10:19:33 -07:00
Raul Marin
8e11ef3fd7
Improve padding calculation
2018-06-06 18:39:15 +02:00
Artem Pavlenko
95d5fabad0
Merge branch 'master' into boost_1_67
2018-05-21 15:58:24 +01:00
Jiri Drbalek
846e961b05
Replace magic number with described constant
2018-05-08 16:54:46 +00:00
Jiri Drbalek
3deb55cc5f
Use existing constant
2018-05-08 16:44:41 +00:00
Artem Pavlenko
b1a19bc13c
Merge branch 'master' into boost_1_67
2018-05-01 10:01:59 +02:00
Raul Marin
3171b89fea
Generalize overlap_optimization to use points and text too
2018-04-27 17:15:03 +02:00
Raul Marin
0a2be27ba9
Use overlap optimization in load_map_string too
2018-04-27 17:14:57 +02:00
Artem Pavlenko
b7bdd08837
define BOOST_SPIRIT_INSTANTIATE_UNUSED once and re-use [skip-ci]
2018-04-18 14:18:40 +02:00
Artem Pavlenko
664d3508de
remove reference_wrapper usage when injecting attributes into grammar ( >= boost_1_67) [skip-ci]
2018-04-18 12:53:17 +02:00
Artem Pavlenko
c946620fec
remove unused instantiation
2018-04-18 10:31:33 +02:00
Artem Pavlenko
9e79e1edf1
update const-ness in x3::context definitions to support boost 1_67 [skip-ci]
2018-04-17 15:41:17 +02:00
Artem Pavlenko
82fb67441f
Merge pull request #3880 from Algunenano/master_icu61
...
Qualify ICU types explicitly
2018-04-10 10:32:30 +02:00
Artem Pavlenko
d2d587cb1b
mapycz-save-map-denominator
2018-04-10 10:25:23 +02:00
Raul Marin
1ddfe6c315
Qualify ICU types explicitly
...
ICU 61 has dropped the global `using namespace icu;`
http://site.icu-project.org/download/61#TOC-Migration-Issues
2018-04-03 13:18:43 +02:00
Blake Thompson
25e4bb3f6c
A fix for two distinct issues associated with gdal featuresets, the first is overviews were not properly being utilized based on the resolution of the final image requested. The second is that allocation of far too much memory could be possible in GDAL to attempt to do resampling internally in mapnik. This now has a hard cap so that we allocate less memory in these situations but are still able to resample internally in mapnik.
2018-03-30 15:10:29 -05:00
Jiri Drbalek
ac50139c54
Raster colorizer: check image bounds
2018-03-23 11:55:40 +00:00
Artem Pavlenko
a8d7fc1cfb
Revert "avoid symbols duplication"
...
This reverts commit c737f4d56f
.
2018-03-15 15:58:23 +01:00
Artem Pavlenko
c737f4d56f
avoid symbols duplication
2018-03-09 09:57:49 +01:00
Artem Pavlenko
934124d30c
follow up on 5b8b75e680
2018-03-01 12:11:03 +01:00
Artem Pavlenko
eb1a32eb79
fix dereferencing out-of-range iterator (caught by -fsanitize=undefined,integer) ( #3867 )
2018-03-01 11:54:41 +01:00
Artem Pavlenko
17a98767b4
use safe_cast
for narrowing double->typename span_gen_type::value_type cast ( #3856 ) (thanks @talaj!)
2018-02-14 16:47:47 +01:00
Artem Pavlenko
15f16ce6ec
cast header to unsiged char const* (-fsanitize=address)
2018-02-13 13:34:42 +01:00
Jiri Drbalek
f10e051e17
Add grid placement for text and shield symbolizer
2018-02-06 15:19:05 +00:00
Jiri Drbalek
69c3ee550d
interior, polylabel: Scale precision by polygon size
2018-02-03 14:00:30 +00:00
Jiri Drbalek
0c5d167028
polygon_vertex_adapter: Fix crash in case of empty interior ring
2018-01-23 15:18:44 +00:00
Jiri Drbalek
99038229f7
Polylabel: cover the case of empty polygon or exterior ring
2018-01-17 13:39:15 +00:00
Jiri Drbalek
a97eace434
Interior: cover the case of empty polygon or exterior ring
2018-01-17 12:58:42 +00:00
Artem Pavlenko
ff31c6d6eb
SVG parser - add ignore_
member variable to allow skipping of unsupported elements, currently clipPath
( #3818 )
2018-01-09 15:19:52 +00:00
Artem Pavlenko
c24568f033
Merge branch 'polylabel-as-interior' of https://github.com/mapycz/mapnik into mapycz-polylabel-as-interior
2018-01-08 10:21:09 +00:00
Artem Pavlenko
c29f944726
Merge branch 'fix-group-symbolizer-crash' of https://github.com/lightmare/mapnik into lightmare-fix-group-symbolizer-crash
2018-01-05 12:16:41 +00:00