Commit graph

54 commits

Author SHA1 Message Date
artemp
7adee4ab36 c++11 : remove boost::make_shared includes 2013-10-17 15:09:56 +01:00
artemp
b315eb2167 + use std::shared_ptr and std::make_shared 2013-09-20 14:01:27 +01:00
artemp
d4b9a48cb1 + geometry::types Exterior/Interior polygon loops 2013-09-03 12:15:31 +01:00
artemp
c73e48fa58 + use std::unique_ptr instead of std::auto_ptr (deprecated!) 2013-04-19 09:50:50 +01:00
Dane Springmeyer
4bd5484cdb fixup includes and value type and params usage across plugins 2013-01-04 09:23:06 -08:00
artemp
02bb955b59 + simplify and refactor shape featuresets to be more resilient to various
quirky shapefiles.
+ fix io navigation functions to use std::streampos
2012-12-11 09:37:53 +00:00
artemp
da0d74529d + fix record length check to account for OGR not writing PointZ according to
shapefile spec - PointZ: type,x,y,z,measure  (#1193, #504)
2012-12-06 15:14:06 +00:00
Dane Springmeyer
46ee60b398 fix row_limit behavior in shape.input to stop reading when count = row_limit, not just when count > row_limit 2012-11-28 14:15:53 -08:00
kunitoki
74342e3083 - no need to #ifdef all the time: the compiler should optimize out the log calls when no MAPNIK_LOG is defined
- initially got rid of those ifdefs in plugins only
2012-04-09 12:05:49 +02:00
kunitoki
8c58a9aa73 - improved again the logging facilities
- aligned the plugins to using the new methods with severity
- implemented per object severity, with fallback to global (with global functions to set them programmatically)
- initial check in of logger python bindings (todo)
2012-04-09 03:00:51 +02:00
kunitoki
1f351e0e09 implement new debug system 2012-04-08 02:20:56 +02:00
Dane Springmeyer
0e701dd899 initialize context in init list 2012-02-02 08:58:20 -08: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
e1ba3f723d add issue # to code comments 2012-01-17 13:33:35 -05:00
Artem Pavlenko
86ea7f2951 remove unused data members 2012-01-12 12:28:53 +00:00
Artem Pavlenko
0bb8adbbdc factor out common code to reduce duplication (shape_utils) 2012-01-12 12:18:50 +00:00
Artem Pavlenko
3bd41e45a4 upgrade shape.input to new feature impl 2012-01-12 10:04:08 +00:00
Artem Pavlenko
02dce6a756 make shape_io work with geometry_container concept 2011-12-09 12:25:13 +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
kunitoki
a7b67566b2 - modified coding style in shape plugin 2011-10-22 15:27:28 +02:00
Dane Springmeyer
7121f6269a add row_limit option to shapefile driver to allow limiting the number of features rendered - closes #741 2011-08-26 07:02:36 +00:00
Artem Pavlenko
4b09f3d750 + skip null shapes 2011-08-12 16:43:28 +00:00
Artem Pavlenko
9a49b81318 + check if pos is valid while iterating through
shapes (don't use eof()!)
+ handle null_shapes better (TODO:testing)
2011-08-11 11:04:19 +00:00
Dane Springmeyer
17854e6c4f shape: improve the error message when an invalid attribute is requested 2011-08-05 21:20:21 +00:00
Dane Springmeyer
e4329847d2 shape.input: re-assign feature id's once we know their correct value after reading geometry up to the dbf link - TODO - we should be able to look ahead to avoid this re-assign 2011-05-20 01:41:28 +00:00
Dane Springmeyer
978dc29568 detect top level shape geometry type and throw if multipatch since we don't support it 2011-05-19 21:48:45 +00:00
Dane Springmeyer
136a6de680 disable unused 'support' for shape type and shx 2011-05-19 21:31:25 +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
a3be4f54ab avoid trying to open index for non-indexed shapefile reads for every feature query - good speedup 2010-12-10 01:25:43 +00:00
Lucio Asnaghi
9b3ef53338 - improved error reporting in shape plugin 2010-11-29 09:15:43 +00:00
Lucio Asnaghi
a5f582f77e + shape plugin logging cosmetics 2010-11-18 23:46:01 +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
4286e9f08b shape: switch back to previous end of file method - closes #647 2010-10-14 19:47:54 +00:00
Dane Springmeyer
1aa05e052d shape: throw an error if an attribute name is requested that does not exist and report out which attribute names are available - closes #604 2010-09-14 17:59:50 +00:00
Artem Pavlenko
d6acd74ec3 + don't create stack variable for reclen 2010-07-25 20:12:43 +00:00
Artem Pavlenko
7bef66b448 + correct null shapes processing
(no bounding box, no geometric data)
+ untabify and re-format
2010-07-25 19:55:47 +00:00
Dane Springmeyer
8ac189ccf2 fix broken support for pointz as code assumed pointzm - closes #504 2010-01-29 01:59:50 +00:00
Dane Springmeyer
5f8d1713a8 formatting 2010-01-29 01:54:15 +00:00
Artem Pavlenko
f855ba7246 remove debug printing in shapefile driver 2010-01-20 15:26:22 +00:00
Artem Pavlenko
af2440b4e7 + fixed 'optional' measure in multipointz 2010-01-20 15:26:14 +00:00
Artem Pavlenko
239c4045d2 + implement missing support for :
multipoint
  multipointm
  multipointz
2010-01-20 15:25:58 +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
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
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
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
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
992af4747d 1. move include to mapnik/include
2. update demos,bibdibgs etc.
2006-10-04 11:22:18 +00:00