Commit graph

35 commits

Author SHA1 Message Date
Artem Pavlenko
8de670ecb9 + add mapnik.Context
+ implement __setitem__
+ fix mapnik.Feature ctor - now requires Context obj
2012-01-13 12:03:26 +00:00
Artem Pavlenko
0eb8e2d246 temp fix to compile FIXME 2012-01-12 10:04:49 +00:00
Artem Pavlenko
cc60b74921 Simplify geometry model to support: Point/LineString/Polygon
Multi geometries are collections of single geometries
Remove multiple_geometries parameter
2011-12-06 12:53:16 +00:00
Dane Springmeyer
86459388c1 python: make feature attribute access more pythonic 2011-12-02 15:08:56 -08:00
Dane Springmeyer
8a4ba70c48 python: remove unneeded header for mapnik_feature.cpp 2011-12-02 13:38:10 -08:00
Dane Springmeyer
4654312d00 code formatting 2011-11-13 19:54:32 -08:00
Artem Pavlenko
1fa78f32e0 + add unified interface to mapnik2.Feature:
add_geometries_from_wkt
    add_geometries_from_wkb
 and mapnik2.Path :
     from_wkt
     from_wkb
TODO: integrate mapnik2.Path with mapnik2.Feature (mapnik 2.1)
2011-09-13 11:54:12 +00:00
Alberto Valverde
9579409940 resurrect add_geometry_from_wkb functionallity in Feature's python binding 2011-09-12 14:43:45 +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
6d7ca1ac6f move mapnik::value -> python value conversion to separate header fro reuse 2011-04-26 17:39:21 +00:00
Dane Springmeyer
62e62ebe76 avoid unused parameter warnings 2011-04-04 14:45:00 +00:00
Dane Springmeyer
0a4b5591a1 comment unused function 2011-03-01 16:37:53 +00:00
Artem Pavlenko
e54eb342e2 + from_wkt factory method
+ expose mapnik::eGeomType enum
2011-02-28 12:40:59 +00:00
Artem Pavlenko
ab101401cd + simplify geometry implementation
+ removed multiple geometry typedefs
+ use geometry_type
+ revert to storing vertices in vector_vertex
  (previous implementation using std::vector was
   fragmenting heap causing performance issues with large geometries)
+ FIXME: hit_test is broken!
2010-11-03 13:19:15 +00:00
Dane Springmeyer
18dd9ff40e python3 support - patch thanks to Haoyu Bai - closes #334 2010-09-26 12:15:16 +00:00
Artem Pavlenko
246731874b + apply 'mapnik-format' to *.cpp *.hpp 2010-06-02 11:03:30 +00:00
Artem Pavlenko
07488ff436 + more tidy 2010-04-09 18:45:53 +00:00
Artem Pavlenko
f6852e2401 + tidy 2010-04-09 18:45:45 +00:00
Alberto Valverde
17b61d16c4 More progress on #528: Made setting Feature properties with values of type unicode or str possible. I've modified the UnicodeString_from_python_str from_python_converter so it can also convert python unicode objects (not just encocded strs). It was originally commented out so but it seems to work fine on my tests. Is there anything I0ve overlooked? (Artem?) 2010-03-19 13:42:58 +00:00
Alberto Valverde
a4d742283b Implementead Feature instantiation from Python and an add_geometry method which accepst a wkb string 2010-03-19 13:42:25 +00:00
Dane Springmeyer
c7947b37c3 comment out new unicode stuff in mapnik_feature due to #505 2010-01-30 00:53:29 +00:00
Artem Pavlenko
47dc1e197b + merge mapnik2 to trunk 2009-12-16 20:02:06 +00:00
Artem Pavlenko
c83000eb60 + use UnicodeString->utf8->PyUnicode conversion 2009-07-13 22:20:25 +00:00
Artem Pavlenko
9872a3be7c + fixed UnicodeString to Py_Unicode conversion (needs testing) 2009-07-13 21:39:39 +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
Artem Pavlenko
6268f4fb80 + oops, fixed 2009-04-01 00:11:14 +00:00
Artem Pavlenko
ce45f8dec3 + fix UChar to wchar_t conversion 2009-03-31 22:59:34 +00:00
Artem Pavlenko
9a75034a88 + applied python_point_datasource.patch from lwu 2009-01-13 00:56:09 +00:00
Tom Hughes
4483d59797 Revert previous fix for #89 and add a new improved fix that enhances the
value class to have a proper null type and do comparisions SQL style so
that null is neither equal nor not equal to other things.
2008-04-12 15:22:27 +00:00
Artem Pavlenko
308e315432 added Unicode support based on ICU 2008-02-18 21:40:34 +00:00
Artem Pavlenko
e8d5172a64 added convertions :
std::pair<std::string,mapnik::value>  to Python tuple
mapnik::value -> PyObject
2007-06-05 09:12:30 +00:00
Artem Pavlenko
2d256166b4 Store text attributes as USC-2 encoded std::wstring 2007-02-14 19:54:39 +00:00
Artem Pavlenko
85f4bfc697 added queryable property and visible method to Layer (Python) 2007-01-09 11:23:19 +00:00
Artem Pavlenko
995980433e reflect feature's properties in Python
(see wiki for more info and usage)
2006-12-31 11:44:34 +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