Commit graph

2485 commits

Author SHA1 Message Date
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
1ccdc5b76d Added code to render frozen thunks.
This renders the saved information from previous calls to the
bounding box extraction code, offset by some amount which should
be determined from running the `placement_finder`. Note that this
doesn't implement that bit, just the rendering.
2014-02-18 11:11:07 -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
b0278d4285 fix #2156 2014-02-11 09:20:11 -08:00
Dane Springmeyer
b799395f6a remove unused code 2014-02-10 21:39:56 -08:00
Dane Springmeyer
1c30683f23 fix round tripping of max-char-angle-delta value 2014-02-10 19:37:40 -08: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
489168d529 Use make_shared to create shared_ptr. 2014-02-10 11:48:33 -05: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
9d6346aa98 fix compile - refs #2148 2014-02-09 11:30:26 -08:00
Dane Springmeyer
89f72f02e8 pass feature to vertex_converters - refs #2148/#2140 2014-02-08 22:10:14 -08:00
Jordan Hollinger
658d7e8888 Replace tabs with spaces. Remove unused method prototype. 2014-02-07 18:11:54 -05:00
Dane Springmeyer
f037eb99c2 silence debug print 2014-02-06 18:42:20 -08:00
Dane Springmeyer
3d90715883 only return true if plugins are actually newly registered 2014-02-06 18:24:56 -08:00
Dane Springmeyer
69de7f0a10 only return true if plugins are actually newly registered 2014-02-06 18:24:35 -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
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
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
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
18dbf34b72 remove env clone and instead just push DHAVE_LIBXML2 into main CPPDEFINES 2014-01-27 12:25:51 -08:00
Dane Springmeyer
777e067770 remove workaround for boost less than 1.46 since 1.47 is now the min needed - refs #1082 2014-01-27 12:24:20 -08:00
Dane Springmeyer
c5aad93428 fix topojson compile and centralize confix workaround 2014-01-26 16:19:27 -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
87e0ae8124 adapt build to use BOOST_SPIRIT_NO_PREDEFINED_TERMINALS 2014-01-26 14:00:58 -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
9944ca65ee fix -pthread issue on linux - closes #2132 2014-01-23 13:07:14 -08:00
Dane Springmeyer
f8ea04f85f fix -pthread issue on linux - closes #2132 2014-01-23 13:06:07 -08:00
Dane Springmeyer
1155a6e33d better library sort 2014-01-23 00:42:41 -08:00
Dane Springmeyer
cd4c645032 boost threads are no longer needed 2014-01-23 00:42:05 -08:00
Dane Springmeyer
499d485151 another try to fix linking order on linux 2014-01-23 00:13:39 -08:00
Dane Springmeyer
83bde5fef2 use premultiplied renderer for points/shields - closes #2117 2014-01-22 22:44:33 -08:00
Dane Springmeyer
7bcbcb0c4f use premultiplied renderer for points/shields - closes #2117 2014-01-22 22:44:04 -08:00
Dane Springmeyer
4731baab93 use premultiplied renderer for points/shields - closes #2117 2014-01-22 22:43:34 -08:00
Dane Springmeyer
b3ca4fb15f fix cairo road-casings-non-grouped-rendering test by matching agg clipping behavior 2014-01-22 22:24:47 -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
97d737fa7b scons: fix variable name 2014-01-22 00:10:28 -08:00
Dane Springmeyer
4742aea92b scons: fix variable name 2014-01-22 00:10:11 -08:00
Dane Springmeyer
7ad2e5b43d finish support for disabling soname on linux 2014-01-21 21:35:10 -08:00
Dane Springmeyer
4fda93bf3e finish support for disabling soname on linux 2014-01-21 21:34:43 -08:00
Dane Springmeyer
edd0f24997 add ENABLE_SONAME option + embed rpath/loader_path by default - closes #1225 2014-01-21 21:12:55 -08:00
Dane Springmeyer
99bf263afd Merge branch 'master' of github.com:mapnik/mapnik into expr-v2 2014-01-21 21:01:48 -08:00
Dane Springmeyer
0e38731152 add ENABLE_SONAME option + embed rpath/loader_path by default - closes #1225 2014-01-20 20:16:08 -08:00
Dane Springmeyer
2a826e7fc8 fix linux linking order in python bindings 2014-01-20 11:15:10 -08:00
Dane Springmeyer
6c12904eda fix jpeg reading regression after #1805 - closes #2123 (patch from @clundgren) 2014-01-18 20:40:00 -08:00
Dane Springmeyer
cff13c0ff6 fix jpeg reading regression after #1805 - closes #2123 (patch from @clundgren) 2014-01-18 20:31:47 -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
Matt Amos
8467d20854 Fixed compile error due to typo in svg_renderer.cpp 2014-01-07 15:38:02 +00:00
Dane Springmeyer
453c29c09f accept woff (web font) format - closes #2113 2013-12-20 17:19:49 -05:00
Dane Springmeyer
448d093f77 accept woff (web font) format - closes #2113 2013-12-20 17:15:41 -05: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
artemp
f21152a6a9 register target type for symbolizer properties 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
Dane Springmeyer
6a0e593d87 fix svg_renderer 2013-12-11 07:26:32 -08:00
Dane Springmeyer
d3836bc71a c++11 2013-12-11 07:25:23 -08: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
artemp
5393a0a9fe c++11 : use ``constexpr name2int` switch instead of if/else 2013-12-09 16:15:24 -05:00
Matt Amos
ceaea9a948 Factored out common implementation of polygon symbolizer. 2013-12-09 20:42:00 +00:00
artemp
8e6e6d8c1e c++11 style for loop 2013-12-09 15:09:37 -05: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
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
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
ca7dfb3428 store meta by const ref 2013-12-05 16:25:56 +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
12bbf55c81 two step parameter parsing and various syntactic sugar tweaks 2013-12-04 16:11:11 +00:00
artemp
37fea12091 load_map : allow optional expressions in symbolizer properties (work-in-progress) 2013-12-04 11:47:36 +00:00
artemp
f83b272a98 fix boost include path 2013-12-03 09:10:51 +00:00
Dane Springmeyer
d13c889d30 fix #2090 2013-12-02 21:51:54 -08:00
Dane Springmeyer
a0d9977e5e fix #2090 2013-12-02 21:47:25 -08: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
c57d88edb1 c++11 : style 2013-12-02 12:10:47 +00:00
artemp
c8466ae654 use static_assert 2013-11-29 17:00:40 +00:00
Matt Amos
ca3d66236c Taking out unnecessary member variable added in 1a22a19a. 2013-11-29 16:37:20 +00:00
Matt Amos
1a22a19a95 Update Cairo renderer so that it compiles. 2013-11-29 16:23:44 +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
artemp
f50e626661 Revert "geojson parser : support 'null' as valid coordinates property (empty geometry)"
Per GeoJSON spec :

```
A GeoJSON geometry object of any type other than "GeometryCollection" must have a member with the name "coordinates". The value of the coordinates member is always an array. The structure for the elements in this array is determined by the type of geometry.
```

This reverts commit f9ed2ce4e2d623c14df247db0025a549be29d75c.
2013-11-21 10:10:43 +00:00
artemp
132ace14ab geojson parser : support 'null' as valid coordinates property (empty geometry) 2013-11-20 16:04:33 +00: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
2564c00420 expression parser - avoid extra level of indirection 2013-11-13 18:44:58 -08:00
Dane Springmeyer
2cc3d82a87 iwyu 2013-11-08 19:13:51 -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
f49654b160 png_reader: quote filenames in error output 2013-11-06 16:26:42 -08:00
Dane Springmeyer
6c8a8007e4 best practice: lways define NOMINMAX when including windows.h 2013-11-06 15:34:53 -08:00
Dane Springmeyer
f66fe78c03 png_reader ensure we throw early if a file_source cannot be opened 2013-11-06 15:34:26 -08:00
Dane Springmeyer
d0619bc402 update copyright year for scons build files 2013-11-05 16:54:13 -08:00
Dane Springmeyer
0250538149 add support for geometry-transform in pattern symbolizers - closes #2065 2013-11-05 16:40:09 -08:00
Dane Springmeyer
2db7d7c390 use std namespace for math functions 2013-11-05 15:53:07 -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
ae0a209295 fix -Wsign-conversion warnings 2013-11-03 23:07:02 -08:00
Dane Springmeyer
6ffd0e9bc2 map size calculations: be explicit about types 2013-11-03 23:07:02 -08:00
artemp
3837c68762 use non-zero filling rule when rasterising lines 2013-10-29 12:26:33 +00:00
artemp
c7a989ae83 first attempt to re-use generic JSON rules in geojson/topojson parsers 2013-10-28 15:57:51 +00:00
artemp
2eaf6a1ead use even/odd polygon filling rule ref https://github.com/mapbox/tilemill/issues/2110 2013-10-28 15:57:35 +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
730f8e36e2 remove dead code 2013-10-23 18:24:35 -07:00
Dane Springmeyer
f14854912c backport ecf8c20938 from master 2013-10-23 18:24:04 -07:00
Dane Springmeyer
ecf8c20938 completely fix (across various g++ versions) clipping regression - closes #2049 2013-10-23 18:09:22 -07:00
Vross
771964a770 datasource_cache: display correctly the error message 2013-10-23 17:44:27 -07:00
Dane Springmeyer
cb04fc0b34 apply bbox clipping fix to shield symbolizer as applied to text in 96fff72837 - refs #2049 2013-10-23 17:41:24 -07:00
Dane Springmeyer
bc2ee11d9a fix text related test failures on ubuntu precise/g++-4.7 - refs #2049 2013-10-23 17:41:15 -07:00
Dane Springmeyer
78f7de16b8 apply bbox clipping fix to shield symbolizer as applied to text in 96fff72837 - refs #2049 2013-10-23 17:39:46 -07:00
Dane Springmeyer
96fff72837 fix text related test failures on ubuntu precise/g++-4.7 - refs #2049 2013-10-24 00:33:26 +00:00
Dane Springmeyer
8272b0b3db remove dead code 2013-10-22 21:13:02 -07:00
Dane Springmeyer
710d558218 scons: simplify linkflags/ldflags setting / attempt to fix #2025 2013-10-22 16:35:46 -04:00
Vross
43735a65d4 datasource_cache: display correctly the error message 2013-10-21 19:26:40 +02:00
artemp
7adee4ab36 c++11 : remove boost::make_shared includes 2013-10-17 15:09:56 +01:00
artemp
e231117504 == c++11
+ remove remaining boost::thread usage
+ don't link to boost_thread
2013-10-11 14:18:35 +01:00
artemp
582ca02f44 remove unused boost.thread includes 2013-10-11 13:39:39 +01:00
artemp
0e40b3c87d == c++11
use std::thread (removes boost.thread dependency)
2013-10-11 13:20:46 +01:00
artemp
3edfc69c81 == c++11
use std::tuple with std::get<>
2013-10-11 12:36:04 +01:00
artemp
7f035f9226 + remove unused vertex tags 2013-10-10 13:43:59 +01:00
artemp
89586fbdf1 + only extract expected types from mapnik::parameters
aka mapnik::value_xxx types
2013-10-09 15:32:47 +01:00
Dane Springmeyer
ddf2226b6f merge with branch 2.3.x 2013-10-05 15:37:29 -07:00
Dane Springmeyer
2b1a725f15 handle conditional compile of webp options not available before webp-v0.1.99 2013-10-04 13:34:07 -07:00
Dane Springmeyer
cd27e521d4 update webp defaults to use WebPConfigInit 2013-10-04 12:59:47 -07:00
Dane Springmeyer
0c1fcd7098 expose all remaining webp encoding options except for 'show_compression' - refs #1964 2013-10-04 01:03:20 -07:00
Dane Springmeyer
732fefb9e1 webp: use WebPConfig instead of custom options struct 2013-10-04 00:24:30 -07:00
Dane Springmeyer
be7d0a55c2 webp: cleanup option handling 2013-10-03 23:59:10 -07:00
Dane Springmeyer
0fb718a4fd default to hextree encoding for 'png' format + png options cleanup 2013-10-03 23:40:19 -07:00
Dane Springmeyer
0224ce3019 add support for seamless blurring - closes #1478 2013-10-03 16:37:09 -07:00
Dane Springmeyer
8e9028e931 use std::fabs not fabs 2013-10-03 13:28:42 -07:00
Dane Springmeyer
f9e630bbd3 Merge remote-tracking branch 'origin/2.3.x' 2013-10-02 18:23:09 -07:00
Dane Springmeyer
d84443b4f3 fix unsigned integer overflow when passing args to composite_bitmap 2013-10-01 21:29:22 -07:00
Dane Springmeyer
61dde4b093 fix several -Wsign-compare warnings 2013-10-01 11:48:27 -07:00
Dane Springmeyer
3dba53e333 fix several -Wsign-compare warnings 2013-10-01 11:47:47 -07:00
Dane Springmeyer
c34c8a568f merge with branch 2.3.x 2013-09-30 13:33:28 -07:00
Dane Springmeyer
82e1b37281 allow single color colorize-alpha 2013-09-27 16:11:23 -07:00
Dane Springmeyer
2010f5f1d9 Merge branch '2.3.x' of github.com:mapnik/mapnik 2013-09-26 20:08:01 -07:00
Dane Springmeyer
68ff3ceead add color-to-alpha image-filter - closes #2023 2013-09-26 16:14:40 -07:00