Commit graph

2378 commits

Author SHA1 Message Date
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
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
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
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
Dane Springmeyer
0f4ba4dfd5 sync with 2.3.x branch 2013-09-25 20:04:31 -07:00
Dane Springmeyer
8e047aa98e raster_colorizer: avoid color copy by return unsigned from get_color 2013-09-25 14:58:32 -07:00
Dane Springmeyer
7aeff3fb59 followup nodata refactor - refs #2023 2013-09-25 14:38:07 -07:00
Dane Springmeyer
681f8853d3 pull in changes from master 2013-09-24 22:57:01 -07:00
Dane Springmeyer
2c46300f61 remove dead code (colorize-alpha is now officially an image-filter) 2013-09-24 17:18:14 -07:00
artemp
f76b020e5e + remove redundant identity matrix and pass 0 to FT_Set_Transform 2013-09-24 14:44:47 +01:00
Dane Springmeyer
63f97fa4aa lessen header interdependence between placement_finder.hpp and symbolizer_helpers.hpp 2013-09-23 11:42:47 -07:00