Commit graph

165 commits

Author SHA1 Message Date
Artem Pavlenko
27f88c9ec0 small fix 2007-12-06 10:59:28 +00:00
Artem Pavlenko
c5bca5ab96 removed unused variables to calm msvc toolset 2007-11-08 21:11:12 +00:00
Artem Pavlenko
c0d411d14e small cleanup 2007-11-07 14:07:12 +00:00
Artem Pavlenko
6eadaafd49 use 'avoid_edges' parameter for point placement 2007-11-06 09:07:18 +00:00
Artem Pavlenko
01de9d9e8c 1. revived 'avoid_edges' option
2. fixed 'placement_finder' extent in agg_renderer.cpp
3. added 'avoid_edges' to map loader
2007-11-05 10:32:01 +00:00
Artem Pavlenko
ce6985aaad use 'contains' instead of 'intersects' test to provide 'avoid_edges' functionality.
(Should 'avoid_edges' be always enabled ???)
2007-11-05 09:15:53 +00:00
Artem Pavlenko
8d51cb421b 1. re-factored placement_finder to be more efficient. 'find_*' methods are templated on PathType.
2. PostGIS plug-in - optional 'multiple_geometries' parameter to control how Multi* geometries built. 
3. MarkersSymbolizer (work in progress) to render vector shapes (markers) alonh a path with collision detection.
2007-11-02 12:50:15 +00:00
David
2cf8278f1d Generic python binding for mapnik::enumeration 2007-10-19 22:17:16 +00:00
Artem Pavlenko
b40706c295 1. templated save_as_png and save_as_jpeg
2. use std::iostream for I/O in save_to_file

TODO: allow writing an output image to memory buffer (i.e Python StringIO)
2007-10-17 14:47:56 +00:00
David
bc54b150ea - reversed header include order 2007-10-08 17:42:41 +00:00
Artem Pavlenko
d1a345a3d2 1.don't share FT_Library object between threads (TODO : implement freetype_engine pool)
2. merged changes with latest load_map
2007-10-05 11:27:00 +00:00
Andreas Volz
f0cca52c3b optional build with libxml2 2007-10-02 21:43:13 +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
8e071f84c7 1. Changed internal geometry representation (explicit support for multi geometries)
(FIXME : label_spacing is still, too slow!!) 
2. Re-use some agg objects.
3. placement_finder cleanups! 
4. Added support for 'building_symbolizer' - extruded polygons
2007-09-16 11:23:51 +00:00
Andreas Volz
d38dedad68 + added GNU autotools build environment
+ raster and gdal input isn't tested. Not working currently...
+ *-input.so plugins created. Change loader in source or link plugin to correct place
+ use pkg-config uninstalled feature
  -> define project root to PKG_CONFIG_PATH to use mapnik without installation
+ added various library checks
+ don't install fonts
+ don't use included AGG
  -> check for a installed libagg
+ Added Makefile for c++ demo
+ don't build any python wrapper stuff
  -> this follows if all other building works
+ added Anjuta file
  -> not needed to build anything, but helps much if you use Anjuta
2007-09-14 23:07:16 +00:00
Artem Pavlenko
beebee468b fixed is_datasource_plugin predicate 2007-08-28 10:19:48 +00:00
Artem Pavlenko
7f3bbace30 check if file ends with '.input' before attempting to load it 2007-08-15 17:23:45 +00:00
Artem Pavlenko
80566ea1ba added accesor to styles 2007-08-07 12:02:24 +00:00
Artem Pavlenko
a53fbf2ca3 applied patch that makes sure names of vertical roads are
rendered in a consistent direction (from Cameron Patrick)
2007-08-01 10:57:27 +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
8eac22911a applied mapnik_line_displacement patch from Cameron Patrick 2007-07-26 21:09:40 +00:00
Artem Pavlenko
7c8a9f3075 added support for min_distance in shield/text symbolizer 2007-07-25 14:36:08 +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
vspader
560de0b9b1 Fix so labels stay within the road. 2007-06-21 15:29:47 +00:00
Artem Pavlenko
f3ae318ca3 1. added 'allow_overlap' in load_map from xml
2. added overlap_ field to TextSymbolizer (ignored by renderer at the moment)
2007-06-20 21:08:23 +00:00
Artem Pavlenko
8010d5433f 1. Removed srid from geometry class
2. Pass resolution to bbox query
3. Use variant<int,double,string> as parameter value e.g in Python:
	ds = Raster(file="/path/to/file",lox = 12312.4,.....)
   Added extractor facility to work with mapnik::parameter (C++):
	
	mapnik::parameters params;
	params["parameter0"] = 123.456;
	params["parameter1"] = "123.456"; // initialize with string extract double later
	
	boost::optional<double> val0 = params.get<double>("parameter0");
	if (val0) 
	{
	   std::cout << *val0;
        }
	
	
	// with default value. NOTE: there is no 'parameter2' in params
	boost::optional<double> val2 = params.get<double>("parameter2",654.321);
	std::cout << * val2;
        
	// 
4. Added Gdal factory method in __init__.py

        ds =  Gdal(file="/tmp/file.tiff")
2007-06-12 08:59:54 +00:00
Artem Pavlenko
15e73b98f4 small formatting 2007-06-05 09:10:40 +00:00
Artem Pavlenko
d3d40234c9 share collision detector between labels and text. 2007-05-12 11:34:55 +00:00
Artem Pavlenko
a6a31f42f6 implelmented optional 'clear' text labels cache at the layer level 2007-05-01 07:53:20 +00:00
Artem Pavlenko
cacea81bce 1. check if plug-ins path is a directory
2. wrap dynamic loading into try/catch to play nicer on win32
2007-04-25 08:59:57 +00:00
Artem Pavlenko
5daa49ff41 forward declare ltdl stuff 2007-03-22 10:55:43 +00:00
Artem Pavlenko
e0d243dcec 1.Added support for building on Darwin (Xcode 2.4.1, gcc4.0.1).
Mainly taming gcc4.0.1 (anonymous enum bug)

2.Input plug-ins now have .input extension on all platforms
2007-03-16 10:11:37 +00:00
Artem Pavlenko
4cc771546d small cleanup 2007-02-25 10:54:36 +00:00
Artem Pavlenko
2d256166b4 Store text attributes as USC-2 encoded std::wstring 2007-02-14 19:54:39 +00:00
Artem Pavlenko
d024c86b1b Restored support for the text displacement (point placement only at moment) 2007-02-09 16:32:44 +00:00
Artem Pavlenko
e016bd61f8 Added transcoder based on iconv. Internally we use UCS-2 at the moment.
* Postgis plug-in determines encoding by querying 'client_encoding' parameter (libpq). 
 * Shapfiles (dbf!) don't store character encoding information. Users can apply 'encoding' parameter at datasource creation stage (defaults to Latin1 (ISO-8859-1))
 * Raster plug-in utf-8
2007-02-06 14:27:21 +00:00
Artem Pavlenko
085f832a77 in query_point method expect (x,y) in Map coordinate system 2007-01-16 15:18:25 +00:00
Artem Pavlenko
199f3f6c12 include Layer instead of forward declaration 2007-01-11 17:19:51 +00:00
Artem Pavlenko
85f4bfc697 added queryable property and visible method to Layer (Python) 2007-01-09 11:23:19 +00:00
Artem Pavlenko
bb035bdc54 don't project query point if host projection is geographic 2006-12-31 11:42:57 +00:00
Artem Pavlenko
4772a16eb6 boost/filesystem.hpp is not in boost 1.33.1
reverted to <boost/filesystem/operations.hpp>
2006-12-30 21:48:15 +00:00
Artem Pavlenko
37ebe481c9 1. is_regular is not supported in boost 1.33.*
2. cleanups
2006-12-21 22:51:53 +00:00
Artem Pavlenko
b5cf9da686 1.added more accessors
2.in tiff_reader check for valid file prior opening.
2006-12-20 00:22:45 +00:00
Artem Pavlenko
77854e7d76 use PNG_MMX_CODE_SUPPORTED instead of PNG_ASSEMBLER_CODE_SUPPORTED (mmx.patch from Dominic Hargreaves) 2006-12-18 10:27:09 +00:00
Artem Pavlenko
31442b6bac Added DESTDIR option which is used as an additional prefix for the purposes of
installing files. It is useful for binary distributions (eg
RPM etc). Thanks to Dominic Hargreaves!
2006-12-17 12:05:47 +00:00
Artem Pavlenko
c7c4659e30 check if featureset is valid before passing to filter_featureset 2006-12-07 15:02:08 +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
dcfe5d3fad oops, fixed 2006-12-05 13:15:43 +00:00
Artem Pavlenko
00fd2a9f00 1. placement_finder.cpp
fixed 'for' loops to work correctly when geom->num_points() < 2
    always use prefix increment even for built-in types (good practice!)
    e.g ++i 

2. agg_renderer.cpp 
    check for number points in geometries when 
    applying text/shield_symbolizer.
2006-12-05 00:16:05 +00:00