Commit graph

165 commits

Author SHA1 Message Date
Dane Springmeyer
65e96cf2b7 more cleanup after removal of unneeded cpp file 'shapefile.cpp' 2011-01-05 02:07:12 +00:00
Dane Springmeyer
6f0de6d76d scons: remove reference to deleted cpp file 2011-01-05 01:25:31 +00:00
Dane Springmeyer
d257b4701c remove uneeded cpp file 2011-01-04 22:35:06 +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
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
Dane Springmeyer
826282a47f check for the existance of a shape index before trying to open it 2010-11-15 03:16:23 +00:00
Lucio Asnaghi
dfdfe15853 + avoid usage of static string where it's not needed 2010-11-14 14:49:42 +00:00
Dane Springmeyer
69ade9ab35 fix compile error when building without memory mapped shapefiles - problem since r2194 2010-11-08 20:38:17 +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
Robert Coup
1dce437120 #622 add optional late-binding of datasources 2010-10-24 06:34:18 +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
f7346b0e72 make sure to seek to the beginning of shapefile when querying points and using indexes - thanks tmcw for uncovering - closes #643 2010-10-06 16:16:58 +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
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
Dane Springmeyer
73fe7fda4a use boost::iostreams::stream_offset for dbf offset and record_length_ to work around >2 GB issue with filtering features - closes #595 (TODO - look into offset issues in shape indexes - #603) 2010-09-14 16:21:25 +00:00
Dane Springmeyer
d84ac3ad5b better error message if shapefile index cannot be read 2010-09-14 15:43:38 +00:00
Dane Springmeyer
4c07bc8447 avoid compiler warning in indexed shape reader 2010-09-14 15:43:02 +00:00
Artem Pavlenko
ad03de5895 + better .index handling (TODO!) 2010-09-06 19:20:59 +00:00
Dane Springmeyer
89acd2e6e0 pass iterators as const to qi::phrase_parse allowing compile on linux g++ (rhel) 2010-09-06 18:37:02 +00:00
Artem Pavlenko
23ea9e0004 add coomment 2010-09-02 20:21:00 +00:00
Artem Pavlenko
65eba5f894 use boost::spirit to parse int and double from dbf 2010-09-02 20:20:51 +00:00
Artem Pavlenko
7776b8f4ae + make shape_io object a shape datasource member and re-use memmapped files
(todo : only implemented for indexed shape files atm)
2010-09-02 20:20:42 +00:00
Dane Springmeyer
930b2cc7b6 better handling and error reporting around ogr layer names and indexes, renamed ogr plugins index file to 'ogrindex' to avoid collision with shape plugins index (when using common shapefile between each as the indexes appear incompatible) 2010-08-20 21:20:55 +00:00
Dane Springmeyer
50147ab509 warn if no index is found for shapefiles - TODO - add an env setting to turn off warnings 2010-08-18 21:02:54 +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
Artem Pavlenko
5fd6db7b0f + formatting .. 2010-07-25 19:55:40 +00:00
Artem Pavlenko
964f17bc31 + don't read bounding box for null shapes 2010-07-25 19:55:32 +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
75060190c0 scons: only apply SHAPE_MEMORY_MAPPED_FILE to shapefile driver code 2010-07-14 22:40:10 +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
6e9fa579fb fix unused variable warning 2010-01-29 23:56:25 +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
Dane Springmeyer
ba187a4949 shape plugin: be more explicit about the shapefile name if the file is not found 2010-01-26 22:57:34 +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
bff83c6ac0 + read z and m bounds from the header 2010-01-20 15:26:06 +00:00
Artem Pavlenko
239c4045d2 + implement missing support for :
multipoint
  multipointm
  multipointz
2010-01-20 15:25:58 +00:00
Artem Pavlenko
4732ace54b + ident fix 2010-01-20 15:25:50 +00:00
Artem Pavlenko
47dc1e197b + merge mapnik2 to trunk 2009-12-16 20:02:06 +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
df7bad25f9 append the SHAPE_MEMORY_MAPPED_FILE compiler flag to CXXFLAGS rather than overwriting existing flags (which happens when using the keyword arg, ugh), closes #435 and #436 and fixes up original commit added in r1217 2009-10-14 23:31:18 +00:00
Dane Springmeyer
46dc2d1f99 formatting 2009-10-14 23:01:48 +00:00
Dane Springmeyer
770d5a727d shape plugin: only trim the '.shp' extension (restores behavior added in r1046 and later changed in r1170) - closes #413 2009-08-27 05:41:02 +00:00
Artem Pavlenko
867799a88c + don't pass std::ios::modes to memory_mapped_file 2009-07-08 23:54:45 +00:00
Dane Springmeyer
eb6a0afffe add std::ios::in mode for shape access on linux 2009-07-08 23:02:32 +00:00
Artem Pavlenko
5d193947ae + avoid implicit conversion by passing expected types to read_intxx_{ndr,xdr}
( msvc compiler generates an error otherwise )
2009-07-08 20:52:22 +00:00
Dane Springmeyer
6c846d77a6 add SCons flag for controlling compile-time use of SHAPE_MEMORY_MAPPED_FILE 2009-07-08 00:53:13 +00:00
Artem Pavlenko
ae96fffee0 + use MAPNIK_BIG_ENDIAN
+ support for reading int16_t 
+ allow compiling shape.input with or without memory mapped files support 
  ( define SHAPE_MEMORY_MAPPED_FILE to enable)
2009-07-07 23:56:01 +00:00
Artem Pavlenko
d20a2de459 + move byte order depended I/O to global.hpp
this should fix shape.input PPC issues
2009-07-03 13:29:50 +00:00
Artem Pavlenko
2389386c80 + make shape_io noncopyable 2009-07-03 13:28:59 +00:00
Artem Pavlenko
ed07268576 + more verbose output to stderr 2009-07-03 13:28:11 +00:00
Dane Springmeyer
9bcdda31d2 shape input: before boost 1_36 use convenience.hpp 2009-06-08 08:22:02 +00:00
Dane Springmeyer
bc463c2a75 use BOOST_BIG_ENDIAN instead of WORDS_BIGENDIAN 2009-06-08 07:08:30 +00:00
Dane Springmeyer
e61a8119da shape input: use more flexible (boost::filesystem) method of stripping ext names 2009-06-08 07:07:10 +00:00
Dane Springmeyer
a9f353de05 improve up front error checking of shapefile existence with boost, and allow shapefile plugin to accept filename with or without '.shp' extension - closes #199 and #174 2009-03-30 23:51:58 +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
48a13f8cbc appled boost_append_osx_patch_v3 from jbronn 2008-12-04 23:20:44 +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
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
Dominic Hargreaves
c436461ee8 Fix build with GCC 4.3 (fixes #76) 2008-03-24 14:03:05 +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
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
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
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
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
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
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
ed5bbe25fe improved win32 support from Valery Moiseev. 2007-01-17 11:43:11 +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
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
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