Commit graph

182 commits

Author SHA1 Message Date
Dane Springmeyer
90f3703505 scons: add option called 'LIB_DIR_NAME' to control the relative directory where input plugins are installed and where python looks to register them 2009-02-23 00:47:01 +00:00
Artem Pavlenko
76a4800231 + use standard WKB by default 2009-02-22 20:53:45 +00:00
Nick Whitelegg
1a7b0486b5 improved boundary behaviour (though still needs attention...) for easymapnik 2009-02-22 20:35:18 +00:00
Andreas Volz
01b6d77509 std::string 2009-02-18 22:50:12 +00:00
Andreas Volz
c64269e1e3 support for sqlite3 and ogr 2009-02-18 22:17:00 +00:00
Artem Pavlenko
f6356731e2 + ident 2009-02-18 16:38:54 +00:00
Nick Whitelegg
95c6e8e9ec easymapnik: SRTM only if command line option given 2009-02-16 23:54:07 +00:00
Nick Whitelegg
c6c1cc32d7 added initial version of easymapnik: command line tool for generating Mapnik maps from OSM XML data 2009-02-16 23:42:31 +00:00
Nick Whitelegg
4aba853d7a OSM plugin: dataset_deliverer now re-fetches data if the URL has changed 2009-02-16 23:10:58 +00:00
Artem Pavlenko
f8fec4ab88 + corrected SQL 2009-02-16 22:06:41 +00:00
Nick Whitelegg
e68d934eff OSM plugin: Fixed warnings, added URL support with cURL, removed multiple parsing 2009-02-15 13:51:07 +00:00
Dane Springmeyer
ffd02e7c99 + Add SCons build script for osm plugin 2009-02-10 20:25:33 +00:00
Dane Springmeyer
1ffdb95069 osm plugin: Fix up test xml samples 2009-02-10 20:24:27 +00:00
Lucio Asnaghi
2c81706eb5 Following #223:
+ improvements to the wkb converter
+ improved sqlite index usage
+ added more parameters to sqlite datasource
2009-02-10 19:09:16 +00:00
Artem Pavlenko
7d2f492ef2 + sqlite-input-plugin.patch (kunitoki)
+ wkb-sqlite.patch (kunitoki)
+ very preliminary spatial index support (idx_<tablename>_<geometry_field>)
2009-02-09 19:43:57 +00:00
Artem Pavlenko
5a3ce5a7ca + occi-input-plugin-4.patch (kunitoki) 2009-02-07 11:38:09 +00:00
Dane Springmeyer
5b0c59428e + apply PostgisImprovements.diff (rcoup) for record_limit and cursur_size support (#140) 2009-02-05 17:41:44 +00:00
Dane Springmeyer
6503dcfc40 + apply ogr_6th_revision.patch to allow unicode support 2009-02-05 17:32:03 +00:00
Artem Pavlenko
0fbfbd445a + ogr_5th_revision.patch (kunitoki rocks!) 2009-02-05 16:47:07 +00:00
Tom Hughes
fb98b98e64 Include boost/algorithm/string.hpp to get access to string algorithms. 2009-02-05 11:41:10 +00:00
Artem Pavlenko
425dea32a4 + occi-input-plugin-3.patch (kunitoki) 2009-02-05 11:17:27 +00:00
Dane Springmeyer
1fb229d035 + apply occi-input-plugin-2.patch (kunitoki) (#212) 2009-02-03 22:23:33 +00:00
Dane Springmeyer
54334dbbb5 + scons: work towards more modular lists of which plugins to build, and switch new occi plugin lib names - revised commit based on #213 2009-02-03 21:14:45 +00:00
Artem Pavlenko
60a956f260 + allow multi-line SQL queries in table parameter (#173) 2009-02-03 20:09:26 +00:00
Artem Pavlenko
868d43408b + ogr.patch (kunitoki) 2009-02-03 18:30:06 +00:00
Dane Springmeyer
fbe4c41700 + apply patch for Oracle 10g support from kunitoki - see #212 2009-02-03 17:06:23 +00:00
Dane Springmeyer
4085e1cb16 third ogr patch from kunitoki! (fixes labels and implements feature_at_point)(ogr_4th_revision.patch) 2009-01-29 16:20:30 +00:00
Dane Springmeyer
e9799003e5 + third revision of patch for ogr plugin with better handling of wkb and multigeometries (kunitoki) 2009-01-29 04:20:34 +00:00
Dane Springmeyer
f414843c4f + First implementation of OGR(vector) input plugin. Patch from kunitoki. Thanks! Closes #170 2009-01-28 20:16:31 +00:00
Artem Pavlenko
48a13f8cbc appled boost_append_osx_patch_v3 from jbronn 2008-12-04 23:20:44 +00:00
Artem Pavlenko
c4b003f568 + applied postgis_schema patch from dodobas 2008-11-21 13:21:41 +00:00
Artem Pavlenko
f1c1e475d7 + applied patch from rcoup to allow specify geometry column.
(TODO: update load_map to handle geometry_field)
2008-11-19 21:26:20 +00:00
Artem Pavlenko
e28328ba13 + applied patch to loosen the type checking when reading float strings from a dbf file (jonb) 2008-11-16 22:13:40 +00:00
Artem Pavlenko
df8cfcab03 + fixed building with boost-1_36
+ corrected order of BOOST_TOOLKIT 
(create symlinks on OSX + boost-1_35)
2008-10-08 06:30:38 +00:00
Andreas Volz
bd2b9e2ea0 - add new files
- optional check for gdal
2008-08-02 20:39:26 +00:00
Tom Hughes
76aaf53b87 Removed forward declaration of mapnik::transcoder as we have already
included the definition and the duplicate causes a compiler warning.
2008-07-29 18:06:01 +00:00
Tom Hughes
beaa2c33de Add parentheses to avoid compiler warnings. 2008-07-25 00:09:26 +00:00
Artem Pavlenko
fe31150a7b corrected boost libs names logic 2008-06-29 11:40:35 +00:00
Artem Pavlenko
3f9127b5d0 reverting back to 700 2008-06-29 10:58:29 +00:00
Artem Pavlenko
3275cf9ce6 applied font fallbacj patch from Beau Gunderson 2008-06-29 10:40:08 +00:00
Andreas Volz
691d3788f5 improved gdal and postgresql detection 2008-06-10 21:13:50 +00:00
Andreas Volz
e29743d933 - updated autotools build files
- build now osm plugin automatic if libxml2 is used
- moved osm/Makefile to osm/Makefile.example because if name collision
  -> better move the example to another directory later
- optional CAIRO support
- changed libxml2 switch comment
2008-04-06 18:13:13 +00:00
Nick Whitelegg
49208998c6 now distinguishes between lines and polygons for ways 2008-04-02 21:40:28 +00:00
Dominic Hargreaves
c436461ee8 Fix build with GCC 4.3 (fixes #76) 2008-03-24 14:03:05 +00:00
Nick Whitelegg
0dafa5eae3 Fixed for unicode change post 0.5 2008-03-06 21:04:47 +00:00
Nick Whitelegg
b117de1bdb Now using libxml2 2008-03-02 13:23:50 +00:00
Nick Whitelegg
415c8a6c92 mapnik osm plugin initial commit 2008-03-01 11:49:37 +00:00
Tom Hughes
37eeb870cc Add support for boolean values in filters, and reading of boolean
values from PostGIS data sources.
2008-02-27 18:50:59 +00:00
Tom Hughes
13d32335e0 Check for null values in the PostGIS results and don't add attributes
with null values to the feature rather than adding a value based on
decoding a buffer full of undefined data.
2008-02-23 01:25:52 +00:00
Artem Pavlenko
308e315432 added Unicode support based on ICU 2008-02-18 21:40:34 +00:00
Andreas Volz
ba5c156c45 fixed autotools build 2008-02-08 19:41:57 +00:00
Artem Pavlenko
b44762e592 allow multi/single threaded variants 2008-02-04 16:12:13 +00:00
Artem Pavlenko
eaf198f79c small cleanup 2008-02-04 11:14:34 +00:00
Artem Pavlenko
a8859645b3 use memory mapped files for reading shape files 2008-02-04 11:12:32 +00:00
Artem Pavlenko
c63c2efe42 support for user defined 'extent' parameter (for example : -180,-90,180,90) 2008-01-29 16:59:51 +00:00
Artem Pavlenko
e268660ecc implmented support for pg numeric type - converted to double at the moment. 2008-01-25 11:39:53 +00:00
Artem Pavlenko
66bc84ff7e check for empty strings in params 2008-01-24 12:07:53 +00:00
Artem Pavlenko
4529e83562 fixed parameters order in image reader 2008-01-07 10:20:05 +00:00
Artem Pavlenko
37f49e29cc Applied patches from Martijn van Oosterhout:
1. The first allows the user to add a <FileSource
name="foo">/home/bar/baz/</FileSource> to the beginning of the file
and then in any of the symbolisers you can say:

<FooSymboliser base="foo" name="bridge">
It it will refer to the file /home/bar/baz/bridge.

2. The second allows you to create Datasource templates at the top
level, which can be used later in the actual layers like so:
<Map>
  <Datasource name="db">
   <Paramaeter name="host">/tmp</Parameter>
  </Datasource>
  <Layer name="lay">
    <Datasource base="db">
      <Parameter name="table">points</Parameter>
    </Datasource>
  </Layer>
</Map>

And the host parameter will be used in the layer.

3. The third adds the "base" parameter to the raster and shape input
plugins. All it does is specify a path to prefix to the filename prior
to using it. Together with the above feature it allows things like:
<Map>
  <Datasource name="shapes">
   <Paramaeter name="base">/home/foo/shapes</Parameter>
  </Datasource>
  <Layer name="lay">
    <Datasource base="shapes">
      <Parameter name="file">places</Parameter>
    </Datasource>
  </Layer>
</Map>

And it will use the shapefile /home/foo/shapes/places
2007-12-17 14:21:04 +00:00
Artem Pavlenko
58f4431df1 support for palette based PNGs, user 'png256' as a format parameter (see updated rundemo.py) 2007-12-10 19:59:17 +00:00
Artem Pavlenko
17e2b12390 1. things to keep win32 built happier
2. print color table in gdal.input if present (-DMAPNIK_DEBUG)
2007-11-08 21:15:45 +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
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
066c8dfa1a Fixed envelope() method to return borrowed connection
NOTE : Always wrap connection into PoolGuard !!!
 
PoolGuard<shared_ptr<Connection>,shared_ptr<Pool<Connection,ConnectionCreator> > > guard(conn,pool);
2007-09-18 14:00:27 +00:00
Andreas Volz
670862879b build plugins without .so extension 2007-09-17 20:16:43 +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
92b22558fd use 'limit 0' when gathering metadata, also we don't need getFieldSize at all 2007-09-07 15:50:40 +00:00
Artem Pavlenko
ef6f1060d3 link to fribidi on Darwin 2007-09-07 15:46:51 +00:00
Artem Pavlenko
76572994b5 Applied mapnik-r511.patch from David Siegel:
plugins/input/postgis/SConscript:
- added boost_thread-mt to darwin builds

demo/c++/rundemo.cpp:
- setBackground() is now set_background()

bindings/python/SConscript:
- added boost_thread-mt to darwin builds
- changed builder to LoadableModule which builds a so called "bundle"
   on darwin and a shared library on all other systems.
- LDMODULEPREFIX = '' 

SConstruct:
- freetype-config is now searched in the path.
2007-08-28 10:12: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
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
8880e5ff5f Restored collecting attributes descriptors 2007-06-05 09:09:04 +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
46902bf488 increment feature id 2007-04-30 20:08:49 +00:00
Artem Pavlenko
f9d28e56fa Added gdal raster input plug-in 2007-04-25 19:15:38 +00:00
Artem Pavlenko
5b91f9a9c5 small correction 2007-04-25 11:26:48 +00:00
Artem Pavlenko
6dc3015ea5 Allow omitting username and dbname in connection string. 2007-04-01 08:29:14 +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
6ed05bcf42 and another one :) 2007-03-08 18:19:42 +00:00
Artem Pavlenko
d10a7eeb24 reverting change #457 : we still must read four bytes ! 2007-03-08 17:35:01 +00:00
Jean-Francois Doyon
76a820beeb - Move a variable declaration used only for debugging, to avoid compiler warning. 2007-03-05 01:28:49 +00:00
Artem Pavlenko
0196cb3334 corrected members init order 2007-02-15 17:25:37 +00:00
Artem Pavlenko
73bd1ab83e fixed missing 'encoding' parameter:
>>> from mapnik import *
>>> ds = Shapefile(file='./demo/data/boundaries',encoding='latin1')
>>> pt = ds.envelope().center()
>>> print ds.describe()
>>> for f in ds.features_at_point(pt):
>>>     print f.properties['NOM_FR'].unicode()
>>>     print f.properties['NOM_FR'].__str__()
2007-02-14 21:55:04 +00:00
Artem Pavlenko
2d256166b4 Store text attributes as USC-2 encoded std::wstring 2007-02-14 19:54:39 +00:00
Artem Pavlenko
1b84f2d454 host = '' , host = None and ommiting host all default to unix-domain socket in /tmp 2007-02-06 15:29:04 +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
59f940b090 append namespace to 'transform' to support buiding with STLport. 2007-01-29 12:50:26 +00:00
Artem Pavlenko
c08a4eb221 corrected cut&paste error 2007-01-17 20:05:23 +00:00
Artem Pavlenko
ed5bbe25fe improved win32 support from Valery Moiseev. 2007-01-17 11:43:11 +00:00
Artem Pavlenko
5549045aaa use all parameters to calculate connection id 2007-01-16 15:22:49 +00:00
Artem Pavlenko
6aa5401151 Added connect_timeout parameter to postgis connection (set to 4 sec). 2006-12-22 11:57:02 +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
f4786fe76a features at point impl 2006-12-01 11:45:08 +00:00
Artem Pavlenko
c6ee7ce438 trim strings at data source level 2006-12-01 10:37:15 +00:00
Artem Pavlenko
7534217a8f 1.added missing float4 (pg_type OID 700)
2.removed printing "..unknown type_oid .."
2006-12-01 09:42:04 +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
b3b6bbe221 don't calculate extent by default 2006-11-29 12:12:23 +00:00
Artem Pavlenko
eeaf75b459 do not assert on empty dbf files 2006-11-28 22:25:31 +00:00
Artem Pavlenko
943ddf9943 added initial_size ans max_size parameters for setting up db connection pool
(default to 1 and 10 respectively)
2006-11-28 00:16:13 +00:00