Commit graph

2534 commits

Author SHA1 Message Date
Jordan Hollinger
533820c63f Merge branch 'expr-v2' of github.com:mapnik/mapnik into expr-v2-group-symbolizer
Conflicts:
	src/text/placement_finder.cpp
	tests/visual_tests/test.py
2014-02-25 14:21:51 -05:00
artemp
19c2b76e10 remove unused text_symbolizer.hpp/cpp 2014-02-25 14:25:23 +00:00
Jordan Hollinger
08ea56996a Add shield symbolizer support in group symbolizer processing.
Update some test cases to use ShieldSymbolizer instead of point and text.
2014-02-25 08:53:35 -05:00
artemp
ecc5acbdb9 attempt to handle multi-polygons in shape.input 2014-02-24 15:20:06 +00:00
artemp
7adb29bdd0 restore agg polygon clipper 2014-02-24 15:19:29 +00:00
Dane Springmeyer
14c02e76a7 Merge pull request #2138 from MapQuest/jmh-text-layouts
Multiple text layouts in text symbolizer
2014-02-18 17:59:56 -08:00
Jordan Hollinger
07dc6e37a2 Merge branch 'expr-v2' of github.com:mapnik/mapnik into expr-v2-group-symbolizer
Conflicts:
	include/mapnik/attribute_collector.hpp
2014-02-18 18:22:01 -05:00
Jordan Hollinger
bbd2cfd40f Grid renderer implementation for group symbolizer.
This uses common process_group_symbolizer for most of the work.
Add reference grids for visual tests.
2014-02-18 16:37:41 -05:00
Matt Amos
f81d5abe1f "Implement" group symbolizer for SVG renderer.
Note that the "implementation" for SVG renderer is the same as
for other symbolizers there - i.e: empty.
2014-02-18 15:54:32 -05:00
Matt Amos
7e25a220a8 Implement debug symbolizer for Cairo. Update tests for debug symbolizer.
Debug symbolizer is useful, and used in a bunch of tests. This
adds debug symbolizer support for Cairo to make it closer to the
capabilities of AGG.

Adding debug symbolizer for Cairo meant that red boxes appeared in
many of the visual test outputs. This commit replaces them with
the output, after visual inspection. They should now be closer to
the output of the AGG test cases.
2014-02-18 15:53:55 -05:00
Matt Amos
44e69e9b05 Cairo renderer implementation of group symbolizer.
This uses the renderer_common header to do most of the heavy
lifting, but otherwise is very similar to the AGG renderer
implementation.

Add cairo ref images for group symbolizer tests.
2014-02-18 15:45:11 -05:00
Jordan Hollinger
3d1c30db1e Extracted a lot of code from agg render process_group_symbolizer.
Move a lot of processing into a common process_group_symbolizer function.
Also, extract column collection out of process_group_symbolizer function.
This will reduce duplication needed for other renderers.
2014-02-18 15:06:40 -05:00
Jordan Hollinger
76329028d2 Find placements and render in process_group_symbolizer.
Create a group_symbolizer_helper for group placments, and extract some code from
text_symbolizer_helper into a base class to share with group_symbolizer_helper.
Also, move tolerance_iterator into its own header file. Use helper in
process_group_symbolizer to find placement positions.
2014-02-18 14:01:04 -05:00
Matt Amos
b85e7d0764 Added method to extract bounding boxes for symbolizers.
This is done by creating a fake 'virtual' environment at a fake
point and running the symbolizer render code. The actual render
is saved in a thunk for after the group layout has been done.
2014-02-18 11:11:06 -05:00
Jordan Hollinger
fbc2a0d1e3 Framework for group symbolizer.
This includes XML parsing of group symbolizer and related objects and
process_group_symbolizer method in the AGG renderer. This also includes
code to collect group symbolizer indexed columns, create sub features,
and match them to group rules.
2014-02-18 11:07:52 -05:00
Dane Springmeyer
b799395f6a remove unused code 2014-02-10 21:39:56 -08:00
Dane Springmeyer
913bcb44b3 c++11 2014-02-10 21:36:59 -08:00
Dane Springmeyer
c13448f75e collect attributes from all properties - closes #2153 2014-02-10 19:41:17 -08:00
artemp
5b286da889 c++ : style 2014-02-10 21:56:20 +00:00
Dane Springmeyer
7b75a24111 Merge pull request #2154 from mapnik/expr-v2-vt-conv-feature
Expr v2 vt conv feature
2014-02-10 10:44:19 -08:00
Jordan Hollinger
d8eda4898e Merge branch 'expr-v2' of github.com:mapnik/mapnik into jmh-text-layouts
Conflicts:
	tests/visual_tests/test.py
2014-02-10 07:38:25 -05:00
Dane Springmeyer
bcde6ae631 Merge branch 'master' of github.com:mapnik/mapnik into expr-v2 2014-02-09 13:27:24 -08:00
Dane Springmeyer
d99daff007 iwyu 2014-02-09 13:25:00 -08:00
Dane Springmeyer
89f72f02e8 pass feature to vertex_converters - refs #2148/#2140 2014-02-08 22:10:14 -08:00
Dane Springmeyer
c275d5512d consistently use mapnik value types 2014-02-07 22:41:50 -08:00
Dane Springmeyer
fa762ce971 now that we only support boost >= 1.47 we can remove older phoenix support 2014-02-07 22:36:33 -08:00
Jordan Hollinger
658d7e8888 Replace tabs with spaces. Remove unused method prototype. 2014-02-07 18:11:54 -05:00
Dane Springmeyer
d082732797 Merge pull request #2136 from MapQuest/mla-expr-v2-multi-line-text-alignment
Multi-line text alignment
2014-02-07 11:05:08 -08:00
Dane Springmeyer
88613fc2ec check filesystem before trying to open plugin + only report unique directories searched - closes #2131
Conflicts:
	src/datasource_cache.cpp
2014-02-06 17:08:38 -08:00
Dane Springmeyer
dcb87dd935 check filesystem before trying to open plugin + only report unique directories searched - closes #2131 2014-02-06 17:05:46 -08:00
Jordan Hollinger
6aa25090c0 Parse and support placement of multiple text layouts within a single text symbolizer. 2014-01-30 06:31:47 -05:00
Jordan Hollinger
269b038147 Extract text layout related properties (e.g. displacement, alignments) into seperate object from other placement related text symbolizer properties. 2014-01-30 06:01:57 -05:00
Dane Springmeyer
c86cf6e5f9 remove uneeded header 2014-01-29 10:42:28 -08:00
artemp
5416bd6c3a impl move ctor 2014-01-29 18:08:21 +00:00
artemp
4a2c5d84b7 make ImageData explicitly movable 2014-01-29 14:39:56 +00:00
artemp
5a1888a3b9 mapnik::color operator= 2014-01-29 09:56:44 +00:00
Dane Springmeyer
f286363ad0 more consistent memset/memcpy usage 2014-01-28 15:05:10 -08:00
Matt Amos
944f34b3df Fix unaligned multi-line labels.
This forces offset lines to be aligned to the closest point to
the anchor point on the original line, meaning that they are
aligned where the offset line and original run parallel, or nearly
so.
2014-01-28 20:33:42 +00:00
artemp
6ccaf8beb2 1. return by ref from operator=
2. provide operator= overload
2014-01-28 16:50:41 +00:00
artemp
9b08d1ba00 unify assignment op's 2014-01-28 16:49:52 +00:00
artemp
c6b96d2f36 remove vertex_type (unused) 2014-01-28 16:19:36 +00:00
artemp
1d8d5964d4 operator= overload 2014-01-28 16:18:47 +00:00
artemp
1aa6cafea1 remove noexcept - we can't guarantee noexcept in std::swap(a,b)
and

```c++
    static_assert( noexcept ( std::swap(*this,rhs)), "throwing swap");
```

would fail at compile time
2014-01-28 14:21:58 +00:00
artemp
322b378971 operator= using std::swap § 2014-01-28 10:57:26 +00:00
artemp
6f81c88f9a mapnik::Map - implement assignment-op in terms of swap 2014-01-28 09:58:47 +00:00
Dane Springmeyer
a602518a10 remove c++11 feature that should not be used in 2.3.x branch 2014-01-27 16:35:59 -08:00
Dane Springmeyer
a98de6a348 Merge branch 'master' of github.com:mapnik/mapnik into expr-v2
Conflicts:
	include/mapnik/expression_grammar_impl.hpp
	src/expression.cpp
2014-01-27 13:56:36 -08:00
Dane Springmeyer
84166882d9 minimum boost version is 1.47 - remove obsolete code handling older versions 2014-01-27 13:19:21 -08:00
Dane Springmeyer
dec15c257b geometry envelope: calculate size once 2014-01-27 12:19:49 -08:00
Dane Springmeyer
c5aad93428 fix topojson compile and centralize confix workaround 2014-01-26 16:19:27 -08:00
Dane Springmeyer
63ea37b4c2 further no terminal port 2014-01-26 14:49:03 -08:00
Dane Springmeyer
cd24a7b877 Merge branch 'master' of github.com:mapnik/mapnik into expr-v2
Conflicts:
	tests/cpp_tests/svg_renderer_tests/path_element_test.cpp
2014-01-26 14:12:03 -08:00
Dane Springmeyer
0fc7b8bc01 include <array> header for std::array 2014-01-26 13:45:29 -08:00
Dane Springmeyer
29e7b19007 boost::array -> std::array 2014-01-26 13:44:30 -08:00
Dane Springmeyer
8181aa9dec addLayer -> add_layer (change also coming in expr-v2 branch) 2014-01-26 13:41:30 -08:00
Dane Springmeyer
7520c15e86 Merge branch 'master' of github.com:mapnik/mapnik into expr-v2 2014-01-22 20:48:07 -08:00
Dane Springmeyer
328df74c13 correct include for std::min/max 2014-01-22 17:02:28 -08:00
Dane Springmeyer
3bd9e1b283 correct include for std::min/max 2014-01-22 17:01:38 -08:00
Dane Springmeyer
cdaa31aa5e Revert "branch 2.3.x from master at v2.2.0-242-ge85cdda"
This reverts commit 9e66317af1.
2014-01-20 14:39:28 -08:00
Dane Springmeyer
50f978777d remove uneeded include 2014-01-19 16:26:38 -08:00
Dane Springmeyer
2b08987903 Merge branch 'master' into expr-v2 2014-01-17 19:59:05 -08:00
artemp
3628b5f237 halo-transform initial impl 2014-01-17 11:47:18 +00:00
Dane Springmeyer
833cfb9827 Revert "branch 2.3.x from master at v2.2.0-242-ge85cdda"
This reverts commit 9e66317af1.
2014-01-09 12:39:35 -08:00
artemp
d9f289e4f2 Merge branch 'MapQuest-mla-expr-v2-renderer-common' into expr-v2 2014-01-07 16:05:56 +00:00
Matt Amos
fcbc727f63 scale_factor_ now in common_. 2014-01-07 16:00:11 +00:00
artemp
2884bd0443 fix : use 'template' keyword to treat 'set' as a dependent template name error (clang) 2014-01-07 15:52:28 +00:00
Matt Amos
6479785648 Merge remote-tracking branch 'upstream/expr-v2' into mla-expr-v2-renderer-common 2013-12-19 14:09:09 +00:00
Dane Springmeyer
e52b4ebf9a harfbuzz_shaper: just call hb_shape not hb_shape_full 2013-12-18 12:22:40 -05:00
artemp
5dae2999b1 symbolizers: set_property helper 2013-12-11 17:27:52 -05:00
artemp
f21152a6a9 register target type for symbolizer properties 2013-12-11 17:27:52 -05:00
artemp
d5a0537471 convert json value into symbolizer_base::value_type 2013-12-11 17:27:52 -05:00
artemp
7cf452da77 generic ``to_integral`` helper function (convert strongly typed enumeration values to underlying type) 2013-12-11 17:27:52 -05:00
artemp
b7dda95d84 move symbolizer to json into core
symbolizer json grammar (needs more work)
2013-12-10 15:51:07 -05:00
Matt Amos
5e13658cf9 Merge remote-tracking branch 'upstream/expr-v2' into mla-expr-v2-renderer-common 2013-12-10 11:47:36 +00:00
Matt Amos
ceaea9a948 Factored out common implementation of polygon symbolizer. 2013-12-09 20:42:00 +00:00
Dane Springmeyer
eca1c6e46b Merge branch 'master' of github.com:mapnik/mapnik into expr-v2
Conflicts:
	src/load_map.cpp
2013-12-09 11:40:55 -08:00
Matt Amos
dd9584bdd6 Factored out markers symbolizer logic.
It's not ideal - there's still a bunch of "dispatch" objects from
which the common elements could be factored for greater
readability.
2013-12-09 18:50:00 +00:00
Dane Springmeyer
3376a2e1a0 avoid duplicate call to start_layer_processing
Conflicts:
	include/mapnik/feature_style_processor_impl.hpp
2013-12-07 15:11:26 -08:00
Dane Springmeyer
bead269923 avoid duplicate call to start_layer_processing 2013-12-07 15:09:35 -08:00
Matt Amos
f01953e8f7 Factored out common implementation of raster symbolizer. 2013-12-06 18:09:24 +00:00
Matt Amos
da5574d247 Factored out common implementation of point symbolizer. 2013-12-06 17:30:06 +00:00
Matt Amos
05982c4caf Factored out common code for building symbolizer.
There's a lot of code common between symbolizers which do things
like layout, setup, etc... So it seems sensible to extract the
common operations & loops into a single place which is
independent of the actual renderer.

I've started doing this with C++11 lambdas, although that might
not be the best implementation long term. Should be easy enough
to change, though.
2013-12-06 16:33:26 +00:00
Matt Amos
a9627f835b Factored common renderer code from SVG renderer. 2013-12-06 14:14:14 +00:00
artemp
fb63d51b37 add quoting for relevant types 2013-12-06 13:11:24 +00:00
Matt Amos
4f871d1fc7 Factored out common fields from grid renderer. 2013-12-05 19:34:32 +00:00
Matt Amos
ee018dc589 Factor common fields out of cairo renderer.
This involved making the freetype engine stack allocated and
accessible via a `shared_ptr` because `FT_Face` elements stored
in it are referenced from cairo structures which persist beyond
the lifetime of the `cairo_renderer` object.

Hopefully this can be resolved in a future commit.
2013-12-05 18:39:09 +00:00
artemp
7245a6f5bd symbolizer property value to string 2013-12-05 16:28:44 +00:00
artemp
7169e14d90 use constexpr to allow combining type traits 2013-12-05 16:26:42 +00:00
Matt Amos
a76e441174 Factored out common renderer fields.
The idea here is that much of the code in the renderers and the
various `process_*` rendering methods is shared, but this sharing
is obfuscated by the lack of sharing of renderer fields and
methods.

This is the first step in trying to factor out commonalities in
order to simplify the implementation of the renderers and make
them easier to understand and modify.
2013-12-05 16:21:55 +00:00
artemp
9945822cc7 make apply() static and disable copy ctor/assignment 2013-12-04 15:14:53 +00:00
artemp
7eb84ad1ab more meaningful error message 2013-12-04 15:09:45 +00:00
artemp
442ffbe911 expression grammar : allow '-' in @attribute
e.g ```@water-fill```
note: this might clash with subtraction ops (fixme)
2013-12-04 11:44:18 +00:00
artemp
1c490f5312 global attributes evaluator 2013-12-04 11:43:16 +00:00
artemp
72378c4c62 symbolizer hash initial impl 2013-12-03 09:10:15 +00:00
artemp
3d7cd37760 symbolizer : operator== impl 2013-12-02 16:49:23 +00:00
Matt Amos
d64b86dcdf Updated grid renderer for expr-v2 branch.
All the grid visual tests pass.

One small issue is that in the grid line pattern symbolizer it
constructs a 'fake' line symbolizer to re-use code (as the grid
renderer cares nothing for patterns), but doesn't pass the
offset parameter to it. The tests currently require this
behaviour, but they should probably be changed as it seems
incorrect.
2013-12-02 13:49:53 +00:00
artemp
b22eaa28a7 format : fix copy note 2013-12-02 11:00:42 +00:00
artemp
6705f01a8f expressions grammar : fix global attribute rule 2013-12-02 10:47:54 +00:00
artemp
eebc638d28 c++11 : add chrono based auto timer 2013-12-02 10:13:51 +00:00
Dane Springmeyer
a6d75ab9d0 fix wkt_multi_generator typedef - previously accidentally matched mapnik::geometry_container - bug spotted by @mojodna - refs #2098 2013-12-02 09:00:16 +00:00
Dane Springmeyer
523cb96e22 fix wkt_multi_generator typedef - previously accidentally matched mapnik::geometry_container - bug spotted by @mojodna - refs #2098 2013-11-30 16:55:25 -08:00
Dane Springmeyer
199b550e98 fix wkt_multi_generator typedef - previously accidentally matched mapnik::geometry_container - bug spotted by @mojodna - refs #2098 2013-11-30 16:53:39 -08:00
artemp
c98903b7a6 make Map equality comparable (work-in-progress) 2013-11-29 17:00:40 +00:00
artemp
85dfd045ec reduce verbosity :D 2013-11-29 14:38:44 +00:00
artemp
06592cedc3 re-use evaluator object 2013-11-29 14:10:58 +00:00
artemp
a1c2bd0d86 pass filter_type by r-value 2013-11-28 15:13:22 +00:00
Dane Springmeyer
e9ca9c8790 symbolizer-expressions replayed against latest master 2013-11-27 22:50:15 -08:00
artemp
eb3da7d32d c++11 : use nullptr instead of NULL 2013-11-27 15:54:16 +00:00
Dane Springmeyer
64d5153aea Improved support for international text
- Implementation by @herm for GSOC 2012 (http://mapnik.org/news/2012/10/06/gsoc2012-status9/)
 - C++11 port, improvements, optimizations by @artemp
 - Testing and integration with master by @springmeyer
 - Thank you to all the support from @behdad along the way
 - Thanks for help testing @toton6868, @stephankn, @nirvn, @mfrasca, @simonsonc and many others

Refs: #2073,#2070,#2038,#2037,#1953,#1820,#1819,#1714,#1634,#1547,#1532,#1319,#1208,#1154,#1146
2013-11-22 00:06:32 -08:00
Dane Springmeyer
e5bb5ed8aa backport geojson parsing/generation fixes from master to 2.3.x - refs #2083 2013-11-21 14:11:47 -08:00
Dane Springmeyer
7b9ca29f60 remove unused code 2013-11-21 13:29:04 -08:00
Dane Springmeyer
e4460150d3 merge with branch 2.3.x 2013-11-21 13:23:27 -08:00
Dane Springmeyer
1c56f0dc19 Merge branch '2.3.x' of github.com:mapnik/mapnik 2013-11-21 13:09:52 -08:00
Dane Springmeyer
cab6d239f2 apply 5eb406c7df to non PHOENIX_V3 code 2013-11-21 13:09:18 -08:00
artemp
9d7d024cf4 geojson parser : add phoenix v2 not_empty implementation 2013-11-21 10:10:43 +00:00
artemp
2b8b71fc98 geojson generator : catch empty geometries early
```json
{"type":"Feature","id":1,"geometry":null,"properties":{}}
```
2013-11-21 10:10:43 +00:00
artemp
4aa3023a9d cleanup commented out code 2013-11-21 10:10:43 +00:00
Dane Springmeyer
15373f8e48 iwyu 2013-11-20 17:46:58 -08:00
artemp
6e4007b8c0 geojson generator : catch empty geomeries 2013-11-20 16:00:11 +00:00
artemp
5eb406c7df geojson parser : only close path if we have at least 3 vertices 2013-11-20 16:00:11 +00:00
Dane Springmeyer
37341a1282 fix hit_test for lines + add tests - refs #2041 2013-11-19 20:01:34 -08:00
Dane Springmeyer
c480d9d878 break out benchmark suite into individual cpp 2013-11-14 23:11:21 -08:00
Dane Springmeyer
03fdf7e596 Merge branch '2.3.x' of github.com:mapnik/mapnik
Conflicts:
	src/deepcopy.cpp
	src/expression.cpp
	src/rule.cpp
2013-11-13 20:00:13 -08:00
Dane Springmeyer
5de5ffb764 remove unused and broken deepcopy support to be replaced in #2081 - refs #1390 and #946 2013-11-13 19:26:17 -08:00
Dane Springmeyer
4ae6c0ac61 fix typo 2013-11-13 18:47:38 -08:00
Dane Springmeyer
410c65eb37 consistenly use std::memcpy and std::memset 2013-11-09 23:02:24 -08:00
Dane Springmeyer
81869a5532 iwyu 2013-11-08 19:11:06 -08:00
Dane Springmeyer
c7a6265869 organize text code in subdirectory 2013-11-07 20:09:22 -08:00
Dane Springmeyer
08fa9fd8ec Merge branch '2.3.x' of github.com:mapnik/mapnik
Conflicts:
	bindings/python/mapnik_building_symbolizer.cpp
	bindings/python/mapnik_debug_symbolizer.cpp
	bindings/python/mapnik_line_pattern_symbolizer.cpp
	bindings/python/mapnik_line_symbolizer.cpp
	bindings/python/mapnik_markers_symbolizer.cpp
	bindings/python/mapnik_point_symbolizer.cpp
	bindings/python/mapnik_polygon_symbolizer.cpp
	bindings/python/mapnik_python.cpp
	bindings/python/mapnik_raster_symbolizer.cpp
	bindings/python/mapnik_shield_symbolizer.cpp
	bindings/python/mapnik_symbolizer.cpp
2013-11-07 09:21:05 -08:00
Dane Springmeyer
49829bf2f6 fix #1846 in 2.3.x branch for unix (msvc still a mystery) 2013-11-06 13:43:10 -08:00
Dane Springmeyer
d0619bc402 update copyright year for scons build files 2013-11-05 16:54:13 -08:00
Dane Springmeyer
ca25d6797a Merge branch '2.3.x' of github.com:mapnik/mapnik 2013-11-04 09:40:58 -08:00
Dane Springmeyer
412f90a3ee Fix -Wshadow warning 2013-11-04 09:38:04 -08:00
artemp
afd58da6e2 geojson - feature_collection_parser
(allow single feature and geometry input)
2013-11-04 12:39:10 +00:00
Dane Springmeyer
f998b2bda6 Merge branch '2.3.x' of github.com:mapnik/mapnik
Conflicts:
	deps/agg/build.py
	deps/clipper/build.py
	include/mapnik/feature_style_processor_impl.hpp
	plugins/input/csv/csv_datasource.cpp
2013-11-03 23:10:21 -08:00
Dane Springmeyer
2d268d3a95 features_with_context: no need for default arg 2013-11-03 23:07:03 -08:00
Dane Springmeyer
f1c381e2c6 feature_style_processor: remove unused arg 2013-11-03 23:07:03 -08:00
Dane Springmeyer
a5f8ba5c6c fix -Wsign-conversion warnings 2013-11-03 23:07:03 -08:00
Dane Springmeyer
d9bc3dbb81 fix -Wsign-conversion warnings 2013-11-03 23:07:02 -08:00
Dane Springmeyer
eb1c976bc9 fix -Wsign-conversion warnings 2013-11-03 23:07:02 -08:00
Dane Springmeyer
a659332284 fix -Wsign-conversion warnings 2013-11-03 23:07:02 -08:00
Dane Springmeyer
dd5848aff0 fix linking on windows - accidentally broken in 8b5323f101 (restores fix from 03d8b6d9d7) 2013-11-03 15:22:28 -08:00
artemp
febf712343 Revert "+ std::unordered_map to store properties"
This reverts commit d909c6dede.
2013-10-29 14:17:45 +00:00
artemp
fe1c88f4a5 topojson : allow individual geometries not just geometry collections 2013-10-29 10:55:13 +00:00
artemp
c7a989ae83 first attempt to re-use generic JSON rules in geojson/topojson parsers 2013-10-28 15:57:51 +00:00
Dane Springmeyer
9755296091 Merge branch '2.3.x' of github.com:mapnik/mapnik 2013-10-24 00:00:53 -07:00
Dane Springmeyer
dcbbcdd8a9 make label-position-tolerance a double, as it should have been all along 2013-10-23 23:48:24 -07:00
Dane Springmeyer
882ee3cb32 Merge branch '2.3.x' of github.com:mapnik/mapnik 2013-10-23 21:12:54 -07:00
Dane Springmeyer
2ef7f13d53 fix indent 2013-10-23 21:12:36 -07:00
Dane Springmeyer
427e1c03b7 polygon clipper: ensure we return from function 2013-10-23 16:10:06 -07:00