Matt Amos
b5c4bb77de
Exposed the label collision detector outside the agg_render object
...
and via Python, allowing detectors to be re-used across renderings.
2011-10-12 01:05:35 +01:00
Artem Pavlenko
a59c961c1f
+ add missing save_to_file overloads
...
+ remove dummy rgba_palette args
2011-09-09 12:40:30 +00:00
Artem Pavlenko
02c143895d
+ refactor palette stuff a bit
...
TODO: We need to change save_to_file|string interface
to avoid passing dummy rgba_palette objects.
2011-09-07 15:01:25 +00:00
Dane Springmeyer
e69bab2b04
include what you use
2011-09-01 00:42:48 +00:00
Dane Springmeyer
90acfb3e1c
+reflect mapnik.Palette in python
2011-08-31 02:28:38 +00:00
Dane Springmeyer
46af5ff222
python: shuffle mapnik::value -> python object convertor, and utilize for conversion to correct type in expression evalution
2011-07-27 02:36:59 +00:00
Dane Springmeyer
7c2549ff46
rework the grid rendering interface to be object oriented and template based allowing for working both with grids and grid views for metatiling
2011-06-04 00:28:00 +00:00
Dane Springmeyer
10a14bbda3
formatting
2011-05-27 04:16:56 +00:00
Dane Springmeyer
9548492036
add python binding to grid_renderer allowing conversion of grid buffer into json
2011-04-26 23:51:29 +00:00
Dane Springmeyer
7cc4f345cf
avoid deprecated string conversion warning in pycairo by overriding Pycairo_Import macro and casting away const to please the c/c++ borderlands
2011-04-04 04:40:18 +00:00
Dane Springmeyer
84ea9e6101
avoid clang++ -pedantic compiler warnings
2011-04-01 06:24:57 +00:00
Artem Pavlenko
e580078d26
+ apply MetaWriter patch from zerebubuth
...
( see #735 for details )
2011-03-16 13:32:04 +00:00
Dane Springmeyer
73270bd76b
translate a C++ mapnik::value_error into a python ValueError
2010-11-15 03:30:23 +00:00
Dane Springmeyer
18dd9ff40e
python3 support - patch thanks to Haoyu Bai - closes #334
2010-09-26 12:15:16 +00:00
Dane Springmeyer
6cce96dd06
upgrade default projection of epsg:4326 to match exactly what proj4 stores in /usr/local/share/epsg for 4326 (aka WGS84)
2010-08-10 18:18:31 +00:00
Dane Springmeyer
15896b8ba9
add ability to pass the scale_factor to render_to_file
2010-06-29 21:35:49 +00:00
Artem Pavlenko
9b3809443c
+ fix naming style in mapnik::Map
2010-06-25 15:23:35 +00:00
Dane Springmeyer
0706b4fbaa
+ ensure passing of default scale_factor to each render function
2010-06-19 14:26:04 +00:00
Artem Pavlenko
e634c06c17
+ use BOOST_PYTHON_FUNCTION_OVERLOADS to reflect
...
render(...) overloads
2010-06-10 14:12:35 +00:00
Artem Pavlenko
53848ce68f
+ reflect markers_symbolizer in python
2010-06-06 12:10:28 +00:00
Dane Springmeyer
9804e7e90d
scons: make libjpeg dependency optional (still required by default)
2010-06-03 19:50:27 +00:00
Artem Pavlenko
246731874b
+ apply 'mapnik-format' to *.cpp *.hpp
2010-06-02 11:03:30 +00:00
Alberto Valverde
fc3a1beeef
initial skeleton of glyph_symbolizer (coarsely ported from arrow_symbolizer). Mapnik compiles but symbolizer does nothing useful yet and is going to be heavily modified to make use of expressions to be general enough to be usable for purposes other than rendering arrows representing vector direction/intensity
2010-03-18 20:04:35 +00:00
Alberto Valverde
2f1d60b666
pre-eliminary raster coloring support
2010-03-12 13:34:13 +00:00
Artem Pavlenko
bbfdc4fab8
+ use mapnik2 for python module name
...
+ update rundemo.py
2010-03-08 11:54:44 +00:00
Dane Springmeyer
067fdb884d
sync trunk with new cairo support added previously to 0.7 branch in r1531
2010-01-11 18:55:30 +00:00
Artem Pavlenko
47dc1e197b
+ merge mapnik2 to trunk
2009-12-16 20:02:06 +00:00
Dane Springmeyer
fe3ffe6c2d
rename map.save_map_string to map.save_map_to_string
2009-12-06 22:33:47 +00:00
Dane Springmeyer
561d937f2a
translate a C++ config error into a python RuntimeError - fixes #442
2009-12-06 22:22:56 +00:00
Dane Springmeyer
d0b4db9ba3
add support for relative paths for entities when using libxml2 and loading xml from string - thanks dodobas for the initial patch
2009-12-06 22:18:45 +00:00
Artem Pavlenko
fb30c36143
+ patch from Dane Springmeyer improves pickling support
...
for mapnik.Map object ( needs some more work!!)
2009-10-19 14:22:11 +00:00
Dane Springmeyer
16f4efc07b
python: add better handling of cairo/pycairo support, refactor rundemo.py, add basic tests for cairo surfaces ( closes #392 )
2009-07-28 06:27:10 +00:00
Dane Springmeyer
e7dd9094a5
revert unintended file changes from r1275
2009-07-26 01:15:44 +00:00
Dane Springmeyer
45266074c8
scons: fix typo, and ensure all temp output is writeable
2009-07-26 01:08:51 +00:00
Dane Springmeyer
7e6ff2a651
reflect save_map_string method in python ( #396 )
2009-07-24 06:25:09 +00:00
Dane Springmeyer
9ce6792eda
add a function to query for the svn revision of the mapnik python bindings
2009-07-17 20:51:39 +00:00
Dane Springmeyer
7fcc462a8f
apply patch from mishok13 to allow proper checking for pycairo support compiled into mapnik - closes #284
2009-05-24 04:25:51 +00:00
Lucio Asnaghi
eaa49ca028
+ applying patch proposed by dane that add explicit_defaults selection when saving maps ( closes #327 )
2009-04-28 21:44:34 +00:00
Dane Springmeyer
4429958816
minor formatting to render_to_file docstring
2009-04-12 21:36:45 +00:00
Dane Springmeyer
512029bfa4
update docstrings based on jpeg quality controls ( #198 )
2009-04-08 00:27:36 +00:00
Dane Springmeyer
c9b4d71b1a
add docstrings to main boost python functions
2009-03-30 04:32:23 +00:00
Artem Pavlenko
2c878b52cf
+ reflect CoordTransform in Python (TODO: rename to ViewTransform in core lib)
2009-03-29 10:26:44 +00:00
Artem Pavlenko
98267e2959
+ MAPNIK_VERSION (defined in mapnik/version.hpp)
...
+ expose version in Python :
mapnik.mapnik_version()
mapnik.mapnik_version_string()
+ add SQLite plug-in in Python bindings
2009-02-12 16:44:04 +00:00
Tom Hughes
220bb3e99a
Revert the patch to add a show_page flag to the cairo renderer and
...
replace it with support for rendering to a cairo context rather than
a cairo surface.
When rendering to a surface a show_page is done, when rendering to a
context it is not so that multiple renders can be done, possibly with
modified scaling and/or translation.
2009-02-06 00:46:29 +00:00
Dane Springmeyer
51293f64ba
+ apply show_page.patch (thanks Berteun) ( closes #201 )
2009-02-05 18:09:14 +00:00
Artem Pavlenko
7d6a21dfeb
+ mapnik-fix-threaded-python-exceptions.patch from jonb
2009-01-17 20:45:53 +00:00
Artem Pavlenko
cad0a839b6
+ mapnik-load-map-from-string.patch (jonb)
2009-01-15 23:51:07 +00:00
Artem Pavlenko
fd194e2ba6
+ reflect mapnik::proj_transform in Python ( #117 )
2009-01-13 15:49:26 +00:00
Artem Pavlenko
9a75034a88
+ applied python_point_datasource.patch from lwu
2009-01-13 00:56:09 +00:00
Artem Pavlenko
14fa35fb18
+ enable multiple python threads with Cairo rennderer patch from jonb
2009-01-10 23:30:33 +00:00
Artem Pavlenko
bb284d0cfc
+ enable multiple python threads patch from jonb
2009-01-10 17:57:59 +00:00
Tom Hughes
e8935c4cf8
Fix brain fade - python cairo bindings should work again now.
2008-07-30 07:37:48 +00:00
Tom Hughes
018852148c
Don't try and include cairo support in the python bindings if we
...
haven't built mapnik itself with cairo support.
2008-07-29 08:01:57 +00:00
Tom Hughes
2f67c036fe
Make cairo components conditional on the relevant libaries etc existing.
2008-03-12 19:14:51 +00:00
Tom Hughes
06006d2f24
Add cairo support to the python bindings - needs Pycairo installed.
2008-03-12 00:37:53 +00:00
Artem Pavlenko
651cdbe968
added support for saving images into Python String object
...
(NOTE: some methods have different signitures now- API changed)
2008-01-25 14:40:48 +00:00
Artem Pavlenko
4586586448
added convinence overloads for 'save_to_file' and 'render_to_file'
...
Example:
>>> from mapnik import *
>>> im = Image(200,200)
>> save_to_file('test.png',im) # Guess image type from file extension
>> save_to_file('test.png,'jpeg',im) # Explicitly save as JPEG
2007-12-06 12:14:29 +00:00
David
b2df387a9d
- merged strict-xml-branch r530:532 to trunk:
...
- libxml2 support
- strict error handling while parsing XML map files
- implemented save_map()
- removed some duplicate defaults
- all symbolizers with icons share a common base class now
2007-09-25 18:47:12 +00:00
Artem Pavlenko
d959701d5a
1. added boost::optional<T> to/form Python converter
...
2. make background color optional (Map object)
3. exposed 'blend' method for Image object
2007-08-01 09:59:23 +00:00
vspader
9fe4a94c98
Added minimum_distance property to text symbolizers. This prevents the same label from appearing within N pixels (across features).
...
Shield symbolizer is now a subclass of text symbolizer.
Some small improvements to text rendering.
Fixed up placement finder for horizontal placement.
Cleaned up placement finder.
2007-07-02 13:39:08 +00:00
Artem Pavlenko
7d62c229d0
applied from patch from Krzysztof Godlewski :
...
reflects scale_denominator(..) into Python
2006-12-07 15:20:33 +00:00
Artem Pavlenko
af44541598
implemented query_map_point method on map object:
...
fs = m.query_map_point(x,y) # Map (screen) coordinates
for feature in fs:
print feature
TODO: provide interface to feature in Python, at the moment only __str__ implemented which dumps attributes
2006-12-06 20:26:59 +00:00
Artem Pavlenko
a4c81560fd
added method 'render' with old signiture
...
render(...)
C++ signature:
render(mapnik::Map, mapnik::Image32 {lvalue}) -> void*
2006-12-05 15:43:52 +00:00
Artem Pavlenko
913b273f40
applied missing part from mapnik_tile patch
2006-12-04 20:12:58 +00:00
Artem Pavlenko
4d4e9f5d91
Tiling patch from Toby allows for a selected pixel region within an extent
...
to be rendered. This allows for a large extent (larger than can be
rendered into a single image in memory) to be rendered out as tiles.
Since the full extent is used for the placement calculations text
crossing tile boundaries will be consistent.
This method is a little inefficient when a large number of labels need
placed, an improved method would be to cache these placements between
tiles, but the attached is a start.
c++ users should simple call the render method with a start X and Y
coordinate specified,
for (int TileX = 0;TileX < 5;++TileX)
{
for(int TileY = 0;TileY < 5; ++TileY)
{
int TileSize=250;
int StartX = TileX*TileSize;
int StartY = TileY*TileSize;
Image32 buf(TileSize,TileSize);
agg_renderer<Image32> ren(m,buf,StartX,StartY);
ren.apply();
char name[324];
sprintf(name,"tile_%d_%d.png",TileX,TileY);
ImageUtils::save_to_file(name,"png",buf);
}
}
python users should call render_tile_to_file
for y in range(tile_count_y):
for x in range(tile_count_x):
if not os.path.exists("tiles/%d/%d/" % (map_scale, y)):
os.makedirs("tiles/%d/%d/" % (map_scale, y))
render_tile_to_file(m, x*tile_size, y*tile_size, tile_size, tile_size,
'tiles/%d/%d/%d.png' % (map_scale,y,x), 'png')
2006-12-01 09:37:37 +00:00
Artem Pavlenko
f1393cc019
1. hit_test implementation for geometry objects:
...
bool hit_test(double x, double y, double tol);
2. added image_view(unsigned x, unsigned y, unsigned width, unsigned height)
allowing to select region from image data e.g (in Python):
im = Image(2048,2048)
view = im.view(0,0,256,256)
save_to_file(filename,type, view)
3. changed envelope method to return vy value in datasource classes
4. features_at_point impl for shape and postgis plug-ins
2006-11-25 11:02:59 +00:00
vspader
f76079f15b
1) Added line following labels. Use set_label_placement(POINT_PLACEMENT) or set_label_placement(LINE_PLACEMENT) on a text symbolizer.
...
2) Added placement_finder class so labels try to avoid each other.
3) Added Shield Symbolizer which is essentially a combined image/text symbolizer.
2006-10-17 14:12:53 +00:00
Artem Pavlenko
bb235fa316
1.added projection transformation support based on proj4 (new dependency!!!)
...
Map and Layer objects both have a new parameter 'srs', initialized to "+proj=latlong +datum=WGS84" by default.
Basic usage (Python):
p = Projection("+proj=merc +datum=WGS84")
point = p.forward(Coord(-2,51))
...
2.reflected arithmetic operators for Envelope/Coord into Python
3.altered return policies for python objects
4.modified build system to require proj4 lib and headers
2006-10-16 13:44:52 +00:00
Artem Pavlenko
78f2b64f5c
check if can extract std::string from dict.
2006-10-09 22:07:39 +00:00
Artem Pavlenko
992af4747d
1. move include to mapnik/include
...
2. update demos,bibdibgs etc.
2006-10-04 11:22:18 +00:00
Artem Pavlenko
5a2e437e21
reflect load/save map methods in python
2006-10-03 10:02:14 +00:00
Artem Pavlenko
8328424af5
1. datasource is now a property of Layer object.
...
2. modified python/c++ demos to reflect the above.
3. removed large 'blobby' mapnik.hpp (compilation times!!!)
2006-10-03 08:44:04 +00:00
Artem Pavlenko
93740b5dec
refactored #includes to reduce compilation times
...
added mapnik_query skeleton
2006-09-11 09:48:27 +00:00
Artem Pavlenko
61fd258fd1
changing licence from GPL to LGPL
2006-03-31 10:32:02 +00:00
Artem Pavlenko
153fbc9572
added font_engine to python bindings (TODO!)
2006-03-19 21:55:59 +00:00
Artem Pavlenko
9de253198b
1.python bindings updated to reflect symbolizers changes
...
2.added label collision detector ( TODO - proper impl!)
2006-02-25 11:03:30 +00:00
Jean-Francois Doyon
897341e042
Capitalized class names as per the "Style Guide for Python Code" at:
...
http://www.python.org/peps/pep-0008.html
Because the bindings are out of synch, this is untested.
2006-02-20 01:34:02 +00:00
Artem Pavlenko
d8dc53bcf4
new build system
2006-01-31 23:09:52 +00:00