mapnik/tests/python_tests
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
..
images python: a new plugin to use arbitrary Python as a data source 2012-07-31 17:05:27 +01:00
__init__.py Add more tests, cleanup existing tests and add TODO functionality to the test runner. 2009-04-16 17:22:38 +00:00
cairo_test.py fixup pycairo rendering test 2012-03-27 18:55:33 -04:00
compositing_test.py 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
csv_test.py csv plugin: also detect fields named 'lng' as longitude 2012-06-25 10:18:09 -07:00
datasource_test.py implement new debug system 2012-04-08 02:20:56 +02:00
extra_map_props_test.py 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
feature_id_test.py update tests to python api for features 2012-01-24 15:16:40 -08:00
feature_test.py set encoding for test file 2012-06-22 10:15:10 -04:00
filter_test.py add a few more filter tests - all should pass cleanly 2012-06-26 18:55:58 -07:00
font_test.py tests: move pickling to separate test 2011-12-02 15:21:35 -08:00
geometry_io_test.py get most of the tests passing 2012-01-24 00:27:44 -08:00
image_encoding_speed_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
introspection_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
layer_modification_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
load_map_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
map_deepcopy_test.py disable non-critical failing test on ubuntu 2012-05-23 15:40:25 -07:00
map_query_test.py 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
mapnik_config_test.py switch back from mapnik2 to mapnik 2011-11-23 11:33:58 +00:00
memory_datasource_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
multi_tile_raster_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
object_test.py finish updating marker tests - closes #1304 2012-07-12 19:21:04 -07:00
ogr_and_shape_geometries_test.py disable non-critical failing test after reverting shapefile polygon handling - refs #1093 2012-02-28 20:18:47 -08:00
ogr_test.py allow the ogr shapefile reading test to pass with latest gdal 2012-06-26 18:25:56 -07:00
osm_test.py update osm test now that extent is not hardcoded 2012-03-22 16:44:27 -07:00
parameters_test.py cpp tests for mapnik parameters and mapnik:boolean -refs #1141 2012-03-23 20:04:42 -07:00
pickling_test.py more pep8 for tests 2012-02-24 13:15:48 -08:00
pngsuite_test.py Catch and throw PNG exceptions - fixes #1213 2012-06-06 17:52:41 -05:00
postgis_test.py remove geometry type tests for postgis that are not longer valid with postgis 2.0 2012-06-29 16:52:54 -07:00
projection_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
python_plugin_test.py python: a new plugin to use arbitrary Python as a data source 2012-07-31 17:05:27 +01:00
raster_alpha_test.py add test for alpha blending during bilinear scaling - refs #997 2012-05-24 16:39:24 -07:00
raster_colorizer_test.py more pep8 for tests 2012-02-24 13:15:48 -08:00
raster_colormapped_test.py 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
raster_symbolizer_test.py re-expose raster scaling in tests 2012-07-06 16:48:37 -07:00
render_grid_test.py add tests for grid rendering with point_symbolizer 2012-07-18 17:29:22 -07:00
render_test.py remove duplicate grid rendering test 2012-07-12 19:01:31 -07:00
reprojection_test.py ensure proper reprojection of unbuffered bbox used for geometry clipping - closes #1138 2012-04-04 12:43:32 -07:00
save_map_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
shapefile_test.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
sqlite_rtree_test.py touch sqlite tests further 2012-04-18 16:06:18 -07:00
sqlite_test.py more pep8 for tests 2012-02-24 13:15:48 -08:00
test_fontset.py fixup whitespace with pep8 tricks from https://gist.github.com/1903033 2012-02-24 13:13:56 -08:00
utilities.py pre-eliminary GlyphSymbolizer implementation. TODO: XML de/serializing. more tests. remove workaround mentioned in test 2010-03-18 20:05:08 +00:00