Commit graph

125 commits

Author SHA1 Message Date
kunitoki
1f351e0e09 implement new debug system 2012-04-08 02:20:56 +02:00
kunitoki
7dbe1279bf - reorder constructor initialization list to avoid warnings in raster datasource 2012-03-28 22:01:45 +02:00
Dane Springmeyer
9556584b0c create context in init list 2012-03-16 13:43:48 -07:00
Dane Springmeyer
77c58e487d whitespace fixes 2012-02-01 17:37:35 -08:00
Artem Pavlenko
7601095e24 move context's typedef inside to avoid poluting global namespace 2012-01-19 17:36:27 -05:00
Dane Springmeyer
820b9a2b25 merge master with feature_impl 2012-01-17 17:47:27 -05:00
Dane Springmeyer
b0d0d06564 finish refactor, moving to separate method off datasources to get_geometry_type and using enums all around 2012-01-17 01:09:46 -05:00
Artem Pavlenko
d207580feb don't forget to init context_ptr 2012-01-16 13:18:00 -05:00
Artem Pavlenko
87e4f22966 + update raster plugin to work with new feature_factory 2012-01-16 09:51:31 -05:00
Artem Pavlenko
b689670ffd switch back from mapnik2 to mapnik
add mapnik2 module which redirects to mapnik and issues DeprecationWarning
2011-11-23 11:33:58 +00:00
Dane Springmeyer
ce9e44b5f2 plugin code formatting based on emacs format in utils/format_source_files 2011-11-13 19:37:50 -08:00
Dane Springmeyer
c8b2ddfaba reduce the size of plugin libraries by hiding unneeded symbols 2011-11-11 15:37:10 -08:00
Dane Springmeyer
69806f2728 format error messages 2011-10-31 13:43:56 -04:00
kunitoki
76cadccd6b - modified coding style in raster plugin 2011-10-23 16:31:25 +02:00
Matt Amos
517fc59f77 Added Python test for multi-tile raster policy. 2011-10-18 14:34:58 +01:00
Matt Amos
d29f609052 Added a 'multi' tiled raster plugin reader for virtual images
already present as tiles on disk.
2011-10-12 01:08:03 +01:00
Dane Springmeyer
22c39d91ba scons: rename all SConscript files to more friendly name of 'build' with a python extension for quick syntax detection in editors 2011-08-30 05:32:01 +00:00
Dane Springmeyer
3e67c1d694 scons: centralize install path info 2011-08-12 21:31:28 +00:00
Dane Springmeyer
82ac99611e add LINKING option to control whether libmapnik is build static or shared and RUNTIME_LINK options to trigger dependency flags to compile against static libs 2011-08-11 19:14:00 +00:00
Dane Springmeyer
e84119aed9 directly link libmapnik in plugins (not just darwin) - patch from Stella L. - closes #790 2011-07-05 23:41:17 +00:00
Dane Springmeyer
49fd1f93d1 use boost::make_shared across plugins to avoid explicit new and ensure fast and exception safe allocation 2011-05-16 23:41:34 +00:00
Dane Springmeyer
c6980f2fd8 make sure datasource feature ids start at 1, like shapefile and sqlite plugins 2011-04-29 20:00:45 +00:00
Dane Springmeyer
8fa2c6b4da raster.input: touchup error output 2011-04-13 17:50:40 +00:00
Artem Pavlenko
7191d56a16 + throw image_reader_exception if we can't read tiff file
+ catch image_reader_exceptions in raster.input
+ re-throw in bind()
2011-04-11 21:17:10 +00:00
Dane Springmeyer
5a1842aad1 remove tabs 2011-04-02 03:45:50 +00:00
Dane Springmeyer
c5833a6db8 remove unmaintained autotools scripts 2011-02-04 22:22:16 +00:00
Dane Springmeyer
f671ef20da scons: ensure libmapnik is built before any plugins that link to it on osx, needed for builds with -jN 2010-12-21 20:46:44 +00:00
Lucio Asnaghi
406b3b92fa + raster plugin logging cosmetics 2010-11-18 23:15:59 +00:00
Dane Springmeyer
6cda2b7d96 avoid compiler error 2010-11-15 03:17:38 +00:00
Lucio Asnaghi
f24d329cac - cosmetics 2010-11-14 14:41:49 +00:00
Robert Coup
1dce437120 #622 add optional late-binding of datasources 2010-10-24 06:34:18 +00:00
Dane Springmeyer
523b09701e Add the ability to pass custom CXXFLAGS and LDFLAGS that will be prioritized above other compiler and linker flags 2010-09-18 18:02:15 +00:00
Dane Springmeyer
267b48de49 add ability to uninstall all tracked scons targets using an 'uninstall' argument like 'scons uninstall' - closes #311 2010-07-18 20:39:05 +00:00
Dane Springmeyer
2a9d2e8192 place built plugin targets in input/ directory to make local registration easier 2010-07-13 23:26:05 +00:00
Artem Pavlenko
e7bfba10fe + enanble installation of mapnik2 side by side with mapnik 2010-03-17 21:03:02 +00:00
Dane Springmeyer
b540dab73b apply slighly modified (env->box2d) mapnik-trunk.mr.raster-position2.diff from mar_rud to close #475 2010-03-03 03:23:53 +00:00
Artem Pavlenko
c11e35fbc0 + reduce threshold for 'tiled' policy to 512*512 pixels
+ reduce tile size to 256 px
+ TODO: expose the above as datasource parameters
2010-02-03 12:20:06 +00:00
Artem Pavlenko
22d8fbe7f0 + consistent raster bbox calc :
x0 = int(minx+0.5)
  y0 = int(miny+0.5)
  x1 = int(maxx+0.5)
  y1 = int(maxy+0.5)

  width = x1 - x0
  height = y1 - y0
2010-02-03 12:19:57 +00:00
Artem Pavlenko
47dc1e197b + merge mapnik2 to trunk 2009-12-16 20:02:06 +00:00
Dane Springmeyer
3d3997f1b2 add proper namespacing - patch from River Tarnell 2009-12-03 17:20:02 +00:00
Dane Springmeyer
b104253d9c Add ability to link to custom icu lib name, and remove the unneeded linking to icudata on osx, while offering compiler flags required for compiling against libicucore provided by Apple 2009-11-24 20:32:41 +00:00
Dane Springmeyer
56f0c33465 format raster plugin to only print output in debug mode 2009-10-12 03:58:11 +00:00
Artem Pavlenko
47c3bc515d + add 'tiled' policy to avoid loading very large rasters into memory
if (width*height > 1024*1024) : load raster in 1024x1024 chunks
  else : use single_file_policy

  TODO: Expose chunk size as raster_datasource parameter
2009-04-10 12:05:31 +00:00
Dane Springmeyer
544cbb249a Apply patch from Marcin to handle smooth transitions between raster layers for both gdal and raster plugin - closed #295 2009-04-07 23:06:51 +00:00
Andreas Volz
42d659a19f compile utils with autotools 2009-04-04 16:33:25 +00:00
Dane Springmeyer
8f610a71d9 add boost filesystem checks (for filename existance) to gdal and raster plugins 2009-03-30 21:56:03 +00:00
Andreas Volz
887518fc57 - install plugins in lib/mapnik/input
- Fix: no sqlite3 for kismet
- python files compile and install
2009-03-25 23:11:49 +00:00
Andreas Volz
cab469eefb - added new et input plugin
- add missing files to plugins Makefile.am
- split debugging and tracing
- documentation
2009-03-22 22:26:42 +00:00
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
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
Artem Pavlenko
308e315432 added Unicode support based on ICU 2008-02-18 21:40:34 +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
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
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
46902bf488 increment feature id 2007-04-30 20:08:49 +00:00
Artem Pavlenko
5b91f9a9c5 small correction 2007-04-25 11:26:48 +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
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
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
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
Artem Pavlenko
ebdd0f6030 disable clog printing in release mode. Pass -DMAPNIK_DEBUG to enable. 2006-11-19 17:13:33 +00:00
Artem Pavlenko
c195e1d24d added yet to be implemented features_at_point 2006-10-16 21:30:58 +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
2f360a6549 1.removed map width/height from query interface
2.small cleanups
2006-09-12 14:29:22 +00:00
Artem Pavlenko
31d04c3131 added support for building on x86_64 platform e.g. /usr/lib64 etc. 2006-09-06 09:14:41 +00:00
Artem Pavlenko
d0ddc88253 1. move parameters to datasource
2. general cleanup
2006-05-23 16:52:10 +00:00
Artem Pavlenko
61fd258fd1 changing licence from GPL to LGPL 2006-03-31 10:32:02 +00:00
Artem Pavlenko
673bd4bc19 replaced cout and cerr with clog (by default redirected to cerr) 2006-03-19 21:53:47 +00:00
Artem Pavlenko
ce93c69fa3 minor syntax corrections to comply with ansi c++ 2006-03-08 23:02:28 +00:00
Artem Pavlenko
d8dc53bcf4 new build system 2006-01-31 23:09:52 +00:00