Commit graph

51 commits

Author SHA1 Message Date
Dane Springmeyer
39d199aa49 code formatting 2011-11-13 19:54:32 -08:00
Dane Springmeyer
7a17c7e597 load_map_from_string has always accepted a base path argument to drive the interpretation of relative paths in the stylesheet when loaded in memory- this really should be a full map property so that it can be known on the map object after parsing and changed if the map is saved to a new location 2011-05-25 23:48:07 +00:00
Dane Springmeyer
8998296f7b add 'maximum-extent' attribute to map and use this, if set, in place of calculated layer extents in zoom_all() 2011-04-14 02:20:33 +00:00
Artem Pavlenko
e580078d26 + apply MetaWriter patch from zerebubuth
( see #735 for details )
2011-03-16 13:32:04 +00:00
Dane Springmeyer
18d77f0f6c add a function in python to check for the existance of metawriters on the map 2010-11-10 18:40:23 +00:00
Dane Springmeyer
688b1f2299 add an 'extra_attributes' property to the map to store mapnik::parameters that don't make sense as full attributes but need to be carried through from load_map() to save_map() for applications that use mapnik to serialize to xml such as Cascadenik and Quantumnik (currently useful storage for 'minimum_version' and 'font_directory') 2010-10-07 19:34:36 +00:00
Dane Springmeyer
3c8926a395 apply python docs patch from tmcw - closes #618 2010-09-24 17:41:08 +00:00
Dane Springmeyer
12dd97a772 touch up docstrings in mapnik.Map and throw IndexError if negative value is passed to query_map_point or query_point from python as we don't currently support finding layers by negative index 2010-08-27 16:16:16 +00:00
Hermann Kraus
3d4fbf03d2 Add docstrings. 2010-08-12 01:42:33 +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
Hermann Kraus
3c01120c53 Add python bindings for metawriter properties. 2010-07-25 21:14:19 +00:00
Artem Pavlenko
9b3809443c + fix naming style in mapnik::Map 2010-06-25 15:23:35 +00:00
Artem Pavlenko
246731874b + apply 'mapnik-format' to *.cpp *.hpp 2010-06-02 11:03:30 +00:00
Artem Pavlenko
47dc1e197b + merge mapnik2 to trunk 2009-12-16 20:02:06 +00:00
Dane Springmeyer
8fd907f8fc remove self argument in python docstring for boost <1.35 compatibility allowing the removal of boost version checking - addresses #29 2009-09-27 01:31:30 +00:00
Dane Springmeyer
ef1e210269 improve boost::python docstrings for map, color, and stroke, adding currently unused patch against enumeration from podolsir 2009-09-25 17:50:37 +00:00
Dane Springmeyer
23ab337f5c use the 'arg' class instead of the deprecated 'args' for boost::python docs http://www.boost.org/doc/libs/1_40_0/libs/python/doc/v2/args.html 2009-09-25 17:38:38 +00:00
Dane Springmeyer
ca32939e35 formatting 2009-09-25 03:31:28 +00:00
Dane Springmeyer
196b01c16c + make interface to datasource attributes, featuresets, and features more pythonicby adding feature.envelope() method returning combined extent of geometries, ds.fields() method returning list of names, and featureset.features() which returns list of all features in featurset - now accessible via datasource.all_features()- closes #283, #280, #171 2009-05-01 01:21:29 +00:00
Dane Springmeyer
c9a9fcf287 named docstring arguments only supported in boost python >= 1.35 2009-04-08 22:25:38 +00:00
Dane Springmeyer
000dcab3c9 Maintain support for boost version before 1.34 when writing argument signatures and add docstring for buffered_envelope 2009-04-08 20:11:45 +00:00
Dane Springmeyer
72c2f903ca We should actually use 'self' as the term for first argument/instance 2009-04-07 23:26:33 +00:00
Dane Springmeyer
47822d578e Add argument aliases to __init__ method for easier/more understandable introspection - addresses #29 2009-04-07 23:17:57 +00:00
Dane Springmeyer
358f087057 fix scale_denominator to be a method (not property) and shuffle alphabetically 2009-03-30 04:17:03 +00:00
Artem Pavlenko
570fe611f4 + qualify 'value' to avoid names clashing
+ use _enumeration helper wrapper
2009-03-21 12:39:06 +00:00
Artem Pavlenko
24174d68e9 + reflect aspect_fix_mode in Python 2009-03-21 11:22:10 +00:00
Dane Springmeyer
771e76f637 + add style pickling support to mapnik::Map, fix tabs, and only un-pickle background color if exists (closes 233) 2009-02-15 19:53:48 +00:00
Artem Pavlenko
ffef15e22e + reflect buffered_envelope method
+  fix view_transform to return ctrans (TODO)
2009-02-02 23:39:20 +00:00
Artem Pavlenko
a07767ef3d + (c++) renamed mapnik::Color to mapnik::color
+ (c++) added mapnik::color ctor from named colours (TODO: consider not to export color_factory) 
+ (Python) fixed pickling
+ (Python) added to_hex_string method
2009-01-14 12:10:24 +00:00
Dane Springmeyer
689b1eb018 Made Scale Denominator available as a property of the Map 2009-01-14 06:12:55 +00:00
Dane Springmeyer
f0d58a99f3 + expose map resize and remove_all methods as well as view_transform property in python 2009-01-14 04:52:04 +00:00
Artem Pavlenko
190f8e5cb9 + return boost::optional in find_style (c++)
+ return feature_type_style by value, raise KeyError otherwise (Python)
2008-11-18 21:15:46 +00:00
Dane Springmeyer
2c83877108 Added python docstrings to mapnik Map class 2008-11-17 23:44:50 +00:00
Artem Pavlenko
20f3a9460d + expose buffer_size parameter (default 0)
influences envelope used by placement detector 
  ( i.e. 'avoid_edges' parameter)
2008-09-21 10:14:38 +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
Artem Pavlenko
05424a5f12 added query_point method that accepts lat,lon coordinates :
>>> for f in m.query_point([ layer.name for layer in m.layers ].index('world'),51,0):
...     print f
...

feature (
  f_code:FA001
  fac_id:193
  id:3147
  na2:UK
  na3:E
  nam:ENGLAND
  tile_id:10
)

>>>
2006-12-06 21:21:17 +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
258b91fad2 made width and height read-write 2006-12-05 16:32:53 +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
Artem Pavlenko
d7fcefc848 1. applied text-wrap patch from Robert Coup. Thanks!
2. by default use tinyxml as a property_tree parser
3. modified load_map.cpp to allow to test new features
2006-10-27 17:29:39 +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
992af4747d 1. move include to mapnik/include
2. update demos,bibdibgs etc.
2006-10-04 11:22:18 +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
494556f0de added zoom_all method 2006-08-23 20:35:01 +00:00
Artem Pavlenko
8dd7798c1c added envelope() method to map object 2006-08-23 20:17:16 +00:00
Artem Pavlenko
61fd258fd1 changing licence from GPL to LGPL 2006-03-31 10:32:02 +00:00
Jean-Francois Doyon
04dc62160e Added some docstrings. 2006-03-28 01:01:00 +00:00
Jean-Francois Doyon
08b80bbc64 Add docstrings, and add support for setting the
map width and height after object creation.
2006-03-22 00:13:14 +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
2a858bcd19 1.removed named_style_cache
2.styles moved to Map object
2006-02-05 09:45:51 +00:00