Commit graph

678 commits

Author SHA1 Message Date
Dane Springmeyer
a22b31b0cc switch out new test image since there is no visual difference to the old one 2012-08-01 16:43:47 -07:00
Dane Springmeyer
f60f40c939 Merge pull request #1157 from mapnik/stroke-as-reference
make stroke property on line_symbolizer a reference when accessed from python (not a copy)
2012-07-31 18:20:55 -07:00
Dane Springmeyer
b7aafe51bc update markers line placement tests 2012-07-31 17:53:20 -07:00
Dane Springmeyer
3867a75adf comment crashing test 2012-07-31 16:42:07 -07:00
Dane Springmeyer
4d2eb73e3b add tests for complex marker rendering functionality 2012-07-31 16:04:42 -07:00
Dane Springmeyer
6c984b4f13 add testcase for #1365 2012-07-31 16:03:51 -07:00
Dane Springmeyer
cb246a436f update the grid rendering tests with new expected results (should now be passing) 2012-07-31 13:16:41 -07:00
Rich Wareham
156a7590f4 python: a new plugin to use arbitrary Python as a data source
This plugin allows you to write data sources in the Python programming language.
This is useful if you want to rapidly prototype a plugin, perform some custom
manipulation on data or if you want to bind mapnik to a datasource which is most
conveniently accessed through Python.

The plugin may be used from the existing mapnik Python bindings or it can embed
the Python interpreter directly allowing it to be used from C++, XML or even
JavaScript.

Mapnik already has excellent Python bindings but they only directly support
calling *into* mapnik *from* Python. This forces mapnik and its input plugins to
be the lowest layer of the stack. The role of this plugin is to allow mapnik to
call *into* Python itself. This allows mapnik to sit as rendering middleware
between a custom Python frontend and a custom Python datasource. This increases
the utility of mapnik as a component in a larger system.

There already exists MemoryDatasource which can be used to dynamically create
geometry in Python. It suffers from the problem that it does not allow
generating only the geometry which is seen by a particular query. Similarly the
entire geometry must exist in memory before rendering can progress. By using a
custom iterator object or by using generator expressions this plugin allows
geometry to be created on demand and to be destroyed after use. This can have a
great impact on memory efficiency. Since geometry is generated on-demand as
rendering progresses there can be arbitrarily complex 'cleverness' optimising
the geometry generated for a particular query. Obvious examples of this would
be generating only geometry within the query bounding box and generating
geometry with an appropriate level of detail for the output resolution.
2012-07-31 17:05:27 +01:00
Dane Springmeyer
0d97b851fa markers: support opacity on bitmaps, and move to supporting both opacity and fill-opacity 2012-07-30 18:31:21 -07:00
Dane Springmeyer
1a6cbfb568 fix xml comment 2012-07-30 15:54:08 -07:00
Dane Springmeyer
ce7b6a93fb Add test case for #1354 2012-07-30 14:48:32 -07:00
Hermann Kraus
5fedfc8a52 Fix problem with python tests. 2012-07-30 01:25:21 +02:00
Hermann Kraus
19ed8718a3 Fix test crashes when reference image doesn't exists.
Refs #1296 and commit 269569250c
2012-07-29 01:47:16 +02:00
Dane Springmeyer
827b015d15 add a geometry collection to csv wkt test 2012-07-25 16:57:47 -07:00
Dane Springmeyer
3da72ff8cb unmask failing test - refs #1345 2012-07-25 16:37:05 -07:00
Dane Springmeyer
4ad15db23d collect attribute descriptions in geojson plugin (TODO: sorting of attributes is returned in reverse order) 2012-07-25 16:11:51 -07:00
Dane Springmeyer
27e9068ccf add test map for colorize-alpha comp-op 2012-07-25 15:04:07 -07:00
Dane Springmeyer
fa052c5021 amend 516f7c7 to suport filtering on collections and rename line to linestring for consistency - refs #546 2012-07-25 14:43:32 -07:00
Dane Springmeyer
b298e21f8e add test for #997- closes #997 2012-07-25 13:16:46 -07:00
Dane Springmeyer
cc8f86e873 ensure simple invalid inputs to wkb do not crash - closes #1333 2012-07-25 11:14:23 -07:00
Dane Springmeyer
e225eaae4b add c++ test for exceptions 2012-07-20 18:33:14 -07:00
Dane Springmeyer
cccb916924 cleanup wkb descriptions to be proper wkt 2012-07-20 15:25:14 -07:00
Dane Springmeyer
537ce09336 also test return value from add_wkb 2012-07-20 15:13:36 -07:00
Dane Springmeyer
b0cb5b04de more empty geometry wkb tests - refs #1305, #1333 2012-07-20 14:57:20 -07:00
Dane Springmeyer
942fa1233f add wkb test that currently crashes - refs #1305, #1132 2012-07-20 12:29:18 -07:00
Rich Wareham
7b3baee3a1 python bindings: export Query.resolution property as a tuple
Although the mapnik::query class is exposed to the Python bindings, the
resolution attribute is a raw boost::tuple. If you attempt to access
this tuple from Python, boost complains strongly.

This patch adds the required magic to marshal the raw boost::tuple which
is query::resolution_type into an honest-to-goodness Python tuple.
2012-07-19 19:35:20 +01:00
Dane Springmeyer
587f0131a2 add tests for grid rendering with point_symbolizer 2012-07-18 17:29:22 -07:00
Dane Springmeyer
bc8d6568f5 sync line rendering between grid and agg - refs #1309 2012-07-12 19:34:39 -07:00
Dane Springmeyer
214b24ed12 finish updating marker tests - closes #1304 2012-07-12 19:21:04 -07:00
Dane Springmeyer
34aa050521 update tests to work with new svg-based grid rendering - closes #1304 2012-07-12 19:02:52 -07:00
Dane Springmeyer
0c37819989 remove duplicate grid rendering test 2012-07-12 19:01:31 -07:00
Dane Springmeyer
ad7a02695e fix test markers xml, accidentally changed in 9888ff0d50 2012-07-09 13:38:49 -07:00
Dane Springmeyer
269569250c use mapnik.Image for visual tests - closes #1296 2012-07-06 17:44:15 -07:00
Dane Springmeyer
d721cdb6b9 re-expose raster scaling in tests 2012-07-06 16:48:37 -07:00
Hermann Kraus
c805cbcfe1 Add test for ShieldSymbolizer with text placements. 2012-07-05 10:37:39 +02:00
Dane Springmeyer
7d9b4ce0da settle upon 'geometry-transform' naming - refs #1276 2012-07-03 18:34:11 -07:00
Hermann Kraus
eb682c1f4f Fix visual_tests/test.py. 2012-07-03 23:39:34 +02:00
Dane Springmeyer
9888ff0d50 remove geometry type tests for postgis that are not longer valid with postgis 2.0 2012-06-29 16:52:54 -07:00
Dane Springmeyer
67e9b0d616 move marker width/height to expressions - closes #1102 and replaces #1255 2012-06-28 19:54:25 -07:00
Hermann Kraus
d9afce16c2 Revert "Add tests for international text."
This reverts commit 0caebc52ae.
2012-06-29 01:01:58 +02:00
Dane Springmeyer
cd644ac24f Merge branch 'master' of github.com:mapnik/mapnik 2012-06-28 15:11:35 -07:00
Hermann Kraus
0caebc52ae Add tests for international text. 2012-06-28 20:49:41 +02:00
Dane Springmeyer
9e8f815b07 add a few more filter tests - all should pass cleanly 2012-06-26 18:55:58 -07:00
Dane Springmeyer
c38598e9ad allow the ogr shapefile reading test to pass with latest gdal 2012-06-26 18:25:56 -07:00
Dane Springmeyer
7b3e86b59f add test csv file 2012-06-25 14:58:38 -07:00
Dane Springmeyer
37c9142515 csv plugin: also detect fields named 'lng' as longitude 2012-06-25 10:18:09 -07:00
Dane Springmeyer
5b61c093e5 initialize grid buffers to std::numeric_limits<int>::min() and use that value to mean no-hit or non-interactive pixels - closes #1065 2012-06-23 22:41:07 -04:00
Dane Springmeyer
63bd634536 set encoding for test file 2012-06-22 10:15:10 -04:00
Dane Springmeyer
eb4740b50f fix behavior of compositing via python api now that we have premultiplication issues sorted out in core - refs #1262 and #314 and #1211 2012-06-21 15:44:57 -04:00
Dane Springmeyer
b8e0366fdf improve readibility of error output from visual tests 2012-06-07 15:26:50 -05:00
Mickey Rose
2a7634693f add python test: set ShieldSymbolizer's transform 2012-06-07 17:12:38 +02:00
Artem Pavlenko
03e6f9d023 Merge pull request #1245 from simonsonc/png-exceptions
Catch and throw PNG exceptions - fixes #1213
2012-06-07 04:00:40 -07:00
Dane Springmeyer
957c40f763 move to int32 for grid rendering buffer - closes #1196 2012-06-06 16:36:38 -07:00
Carl Simonson
cd7ad3e15e Catch and throw PNG exceptions - fixes #1213
The png library uses setjmp/longjmp to throw exceptions when reading. If this
is not set up, the png library calls abort(). This change handles the errors
and throws a C++ exception instead.

This issue was found by testing images from pngsuite at
http://www.schaik.com/pngsuite/. These images are included and a unit test was
added to test both images that should be successful and images that should
throw an exception.
2012-06-06 17:52:41 -05:00
Dane Springmeyer
11e81fdb03 finish exposing markers symbolizer in python - closes #612 2012-06-04 13:42:51 -07:00
Dane Springmeyer
43d6de7fa6 add partial test files for second case of #997 2012-05-24 16:57:17 -07:00
Dane Springmeyer
e1fa732f90 add test for alpha blending during bilinear scaling - refs #997 2012-05-24 16:39:24 -07:00
Dane Springmeyer
a567c02306 Revert "update test images used for validating compositing"
This reverts commit ac2d935c28.
2012-05-24 11:05:17 -07:00
Dane Springmeyer
975242e597 disable non-critical failing test on ubuntu 2012-05-23 15:40:25 -07:00
Dane Springmeyer
028b042185 add support for older boost in the cpp tests 2012-05-18 11:17:54 -07:00
Dane Springmeyer
074c28c4bc avoid assert in cpp tests in debug mode 2012-05-15 11:45:55 -07:00
Dane Springmeyer
3178b96d67 overwrite the tiff test images again 2012-05-14 14:13:32 -07:00
Dane Springmeyer
ac2d935c28 update test images used for validating compositing 2012-05-11 15:42:50 -07:00
Dane Springmeyer
3531cb6fff update expected images from test output since minor differences occur from new compositing 2012-05-11 07:28:23 -07:00
Dane Springmeyer
66ff9b1492 show expected image path for visual test failures 2012-04-23 16:13:59 -07:00
Dane Springmeyer
61d3cf635a Merge pull request #1172 from caffeinate/master
MarkersSymbolizer - stroke/fill python bindings
2012-04-19 12:15:43 -07:00
Dane Springmeyer
f977134afd touch sqlite tests further 2012-04-18 16:06:18 -07:00
Dane Springmeyer
f8e6b4f27d test round tripping a feature and wkb geometry through sqlite 2012-04-18 12:49:49 -07:00
Dane Springmeyer
f76fde32b9 Merge branch 'master' of github.com:mapnik/mapnik 2012-04-16 22:51:31 -07:00
Dane Springmeyer
e986bce7f6 format c++ tests 2012-04-16 22:33:37 -07:00
Dane Springmeyer
e3982081d8 save test renders outside of source tree 2012-04-16 22:07:14 -07:00
Dane Springmeyer
5767c65470 improve the map.query_point/query_map_point implementation, now throwing for invalid coords or projection transformations 2012-04-13 11:28:30 -07:00
Dane Springmeyer
6de1a84949 renable the intentionally broken font test now that there is no log output 2012-04-12 16:09:00 -07:00
Si Parker
003c5a72ab added MarkersSymbolizer python bindings for fill and stroke 2012-04-11 10:41:15 +01:00
kunitoki
1f351e0e09 implement new debug system 2012-04-08 02:20:56 +02:00
Dane Springmeyer
8220acce82 more params tests 2012-04-06 14:20:04 -07:00
Dane Springmeyer
b7f714f7ec postgis: primary key autodetection will now only happen if 'autodetect_key_field' is set to true - maintains current behavior - refs #804 2012-04-05 11:05:14 -07:00
Dane Springmeyer
9c3d3ab285 more concise output from c++ tests 2012-04-05 08:35:28 -07:00
Dane Springmeyer
a50ea0750e compile c++ tests even if only installing and hook them all up automatically to make test target 2012-04-04 15:19:37 -07:00
Dane Springmeyer
0e64cc157e tests: allow the visual tests to be run in quiet mode 2012-04-04 14:54:07 -07:00
Dane Springmeyer
bd7b07d3f9 add missing test files 2012-04-04 14:37:27 -07:00
Dane Springmeyer
4dbadaa7cd ensure proper reprojection of unbuffered bbox used for geometry clipping - closes #1138 2012-04-04 12:43:32 -07:00
Dane Springmeyer
d29ae14104 make it possible to set the map.maximum_extent back to None/uninitialized from python 2012-04-04 12:07:15 -07:00
Dane Springmeyer
46b16c917e support nodata for paletted images and allow user to set nodata on-the-fly - closes #1160 and #1161 - refs #688 and refs #730 and refs #50 and refs #1018 2012-04-03 16:06:36 -07:00
Dane Springmeyer
a7e150a593 tests: add simple tests for postgis 'bbox' token replacement 2012-04-02 19:29:06 -07:00
Dane Springmeyer
d9cb76f7a1 postgis: support mixed case table names - closes #1159 2012-04-02 19:21:14 -07:00
Dane Springmeyer
10848f9d04 postgis: warn in the unlikely case of a numeric primary key 2012-04-02 18:13:27 -07:00
Dane Springmeyer
763e84a6e9 postgis: add support for auto-detection of primary key field - closes #804 - refs #753 2012-04-02 16:20:41 -07:00
Dane Springmeyer
2e76ff1958 make stroke property on line_symbolizer a reference when accessed from python (not a copy) 2012-04-02 11:57:24 -07:00
Dane Springmeyer
9d1afbbfc6 Merge branch 'master' of https://github.com/mapnik/mapnik 2012-03-27 18:56:52 -04:00
Dane Springmeyer
67f6d0f672 fixup pycairo rendering test 2012-03-27 18:55:33 -04:00
Dane Springmeyer
dbd4258079 more markers_symbolizer test maps 2012-03-27 18:54:59 -04:00
Dane Springmeyer
3f26c439c9 fix marker width/height to mean pixels - which it should have all along - closes #1134 2012-03-23 20:28:12 -07:00
Dane Springmeyer
46fdc570c2 cpp tests for mapnik parameters and mapnik:boolean -refs #1141 2012-03-23 20:04:42 -07:00
Dane Springmeyer
ea5a46f230 remove the storage and serialization of 'font-directory' and 'minimum-version' since there is no strong need to have them accessible after initial parsing 2012-03-23 18:14:14 -07:00
Dane Springmeyer
13189e0a55 tests for compositing operations 2012-03-23 17:36:37 -07:00
Dane Springmeyer
3b498efbd9 fixup font registration code ensuring invalid fonts will warn but not throw and register_fonts will only return success if > one font is registered and none have failed 2012-03-23 15:07:28 -07:00
Dane Springmeyer
e570ea3a98 hook up visual tests to the 'make test' target 2012-03-23 12:42:11 -07:00
Dane Springmeyer
e9940c6add update osm test now that extent is not hardcoded 2012-03-22 16:44:27 -07:00
Hermann Kraus
620f3f943e Add reference image. 2012-03-20 23:52:13 +01:00
Hermann Kraus
eac133952c Add line-offset test. 2012-03-20 23:13:15 +01:00
Hermann Kraus
eb911deca5 Change visual tests config format. 2012-03-20 23:13:15 +01:00
Hermann Kraus
fe2879ac42 Update python tests. 2012-03-20 23:13:15 +01:00
Hermann Kraus
f7a387f8af Change visual tests directory structure. 2012-03-20 23:13:15 +01:00
Hermann Kraus
a84fcdb133 Update tests.
Refs #1125.
2012-03-19 17:40:51 +01:00
Hermann Kraus
9b62a19cf4 Implement justify-alignment=auto.
Closes #1125.
2012-03-19 17:12:53 +01:00
Hermann Kraus
ff78217276 Add reference image for RTL test. 2012-03-16 01:51:19 +01:00
Hermann Kraus
f9b2e5fb56 Add test for RTL text. 2012-03-16 00:38:03 +01:00
Dane Springmeyer
015f666e9e tests: remove ancient CssParameter holdovers 2012-03-13 07:42:33 -07:00
Hermann Kraus
2b68cea0a1 Merge branch 'new-xml'
Conflicts:
	include/mapnik/config_error.hpp
	include/mapnik/ptree_helpers.hpp
	src/formatting/text.cpp
	src/libxml2_loader.cpp
	src/load_map.cpp
	src/metawriter_factory.cpp
	src/text_placements/registry.cpp
	src/text_placements/simple.cpp
2012-03-13 11:11:28 +01:00
Hermann Kraus
502773bea6 Only one grammar object per XML tree. 2012-03-11 23:24:28 +01:00
Dane Springmeyer
c5c0f92247 save the maps in the right place for visual tests 2012-03-08 17:04:51 -08:00
Dane Springmeyer
9fb45ebf75 allow visual tests to be run from root 2012-03-08 17:01:51 -08:00
Hermann Kraus
cd8cfc6527 Improve error messages. 2012-03-08 18:52:53 +01:00
Hermann Kraus
8b0b9ed5fe Handle different image sizes correctly. 2012-03-08 18:29:46 +01:00
Hermann Kraus
7d3fd0755d Complete XML changes in load_map.cpp 2012-03-07 01:35:37 +01:00
Hermann Kraus
b5e1ebfac8 New reference images. 2012-03-04 02:06:03 +01:00
Hermann Kraus
0eece15f62 New tests. 2012-03-04 02:04:43 +01:00
Hermann Kraus
586cdff6e8 Add new test. 2012-03-03 16:32:31 +01:00
Hermann Kraus
0ef573c197 Avoid accidential uploading of test file to OSM server. 2012-03-03 16:31:49 +01:00
Hermann Kraus
c47eb3642a Reformat test and extend to verify text is centered correctly. 2012-03-03 13:53:08 +01:00
Dane Springmeyer
ca3bd722c1 Merge branch 'master' of github.com:mapnik/mapnik 2012-03-02 10:01:11 -08:00
Hermann Kraus
1fcfbaac52 Add test for TextSymbolizer line placement. 2012-03-02 01:45:44 +01:00
Dane Springmeyer
803447a8d8 disable non-critical failing test after reverting shapefile polygon handling - refs #1093 2012-02-28 20:18:47 -08:00
Dane Springmeyer
3839dd363f more pep8 for tests 2012-02-24 13:15:48 -08:00
Dane Springmeyer
0a37a1591e fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
Hermann Kraus
d203d56d34 Update tests. 2012-02-21 10:21:40 +01:00
Hermann Kraus
0759d1b0dc Update reference images. 2012-02-21 00:06:54 +01:00
Hermann Kraus
73339b3936 Render ShieldSymbolizer tests with varying width. Triggers the problem in #1078.
Update script to handle case when no reference image is found.
2012-02-20 17:45:47 +01:00
Hermann Kraus
6fe0637425 Complete support for formatting types. 2012-02-19 02:03:25 +01:00
Hermann Kraus
76cdd7a254 Merge branch 'master' into python-textplacement 2012-02-19 01:00:52 +01:00
Hermann Kraus
d56f05b4ec Move compare() to own file.
Increase threshold.
2012-02-18 17:51:18 +01:00
Hermann Kraus
0ba24d7480 Simply clean script. 2012-02-18 17:29:48 +01:00
Hermann Kraus
e466d5bfd1 Merge commit '1ac4c0ca534c8667f4a13a0756af0b873b44192e' 2012-02-18 17:23:38 +01:00
Hermann Kraus
e0f6474d9b Merge commit '95aa6904dfde5732fd330752efaf4fbc15105651' from ramunasd/master
Conflicts:
	tests/visual_tests/shieldsymbolizer-1-500-reference.png
	tests/visual_tests/shieldsymbolizer-1.xml
2012-02-18 17:21:02 +01:00
Hermann Kraus
b449cb5e6d Add correct reference image. 2012-02-18 16:46:36 +01:00
Hermann Kraus
f4ec936202 Improve test case again. 2012-02-18 16:45:35 +01:00
Hermann Kraus
db168a0db7 Update test case. 2012-02-18 13:06:25 +01:00
Ramunas
1ac4c0ca53 remove notices due to inkscape metadata 2012-02-18 10:45:58 +02:00
Ramunas
5c82265ef8 Merge branch 'master' of git://github.com/mapnik/mapnik
Conflicts:
	tests/visual_tests/shieldsymbolizer-1.xml
2012-02-18 09:57:23 +02:00
Hermann Kraus
665f0a51a0 Remove old reference image. 2012-02-18 01:24:00 +01:00
Hermann Kraus
0814824b35 Use uppercase letters. 2012-02-18 01:23:25 +01:00
Hermann Kraus
212171b9ee Add visual test for ShieldSymbolizer. 2012-02-18 01:17:29 +01:00
Ramunas
95aa6904df compute image difference & update reference images 2012-02-18 00:19:07 +02:00
Hermann Kraus
53fa19af5a Update test. 2012-02-17 21:00:40 +01:00
Hermann Kraus
ceda45249f Merge branch 'master' into python-textplacement 2012-02-16 00:18:44 +01:00
Hermann Kraus
4602338e0c Add ExpressionFormat: Allow changing text format based on expressions.
Closes #1036.
Refs #1048.
2012-02-15 21:38:24 +01:00
Dane Springmeyer
7327a646f0 fix memory datasource test 2012-02-14 15:01:41 -08:00
Dane Springmeyer
da845cfaa3 update feature expression test to new feature attr api that will throw if attr is not found 2012-02-14 14:57:36 -08:00
Hermann Kraus
2b5274c21b Merge branch 'textplacement-rename' into python-textplacement 2012-02-12 13:57:51 +01:00