Commit graph

525 commits

Author SHA1 Message Date
Dane Springmeyer
c093d2ad4d add ability to supply a key_field (attribute name) to be used for feature ids + fix potential table alias quoting failure 2011-06-13 21:58:11 +00:00
Dane Springmeyer
14bc0be880 postgis: make sure to report boolean fields 2011-05-31 23:30:59 +00:00
Dane Springmeyer
4dd2e9eda5 large potential performance boost for ogr datasources 2011-05-26 07:30:49 +00:00
Dane Springmeyer
050fe14eaa fix occi compile 2011-05-23 15:54:58 +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
e901058eba skip null geometries for indexed shapefiles (already skip for non-indexed) to avoid invalid reads - TODO - consider not adding to index to avoid need to skip 2011-05-19 21:24:08 +00:00
Artem Pavlenko
bfd27f6047 + revert make_shared in kismet_thread (introduced in #2907) 2011-05-19 16:39:55 +00:00
Dane Springmeyer
e588b2e135 cache iterator in shape_index_featureset 2011-05-18 01:56:06 +00:00
Dane Springmeyer
ca90c34d17 use boost::make_shared feature factory for ogr featuresets 2011-05-18 01:28:22 +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
b3c258c9a8 allow usage of boost::make_shared in gdal featureset construction by passing const reference - #760 2011-05-16 22:17:50 +00:00
Dane Springmeyer
c19ede5070 remove last references to boost_iostreams dependency 2011-05-10 15:57:45 +00:00
Artem Pavlenko
f811d096b5 + consistent file naming, cleaups 2011-05-10 15:03:09 +00:00
Artem Pavlenko
ec0436fcd9 + consistent [h,c]pp files naming 2011-05-10 14:22:47 +00:00
Dane Springmeyer
df8022fb3f do not link to iostreams 2011-05-09 22:23:36 +00:00
Artem Pavlenko
81f96909be + use feature_factory to create features 2011-05-09 13:52:14 +00:00
Dane Springmeyer
1070b293ad tabs -> spaces 2011-05-04 15:53:36 +00:00
Dane Springmeyer
d05b0c539f apply major refactor of RasterColorizer by ben moores from https://github.com/BenMoores/mapnik-trunk/wiki/RasterColorizer - closes #523 2011-05-04 00:20:17 +00:00
Dane Springmeyer
caeaf920d7 remove used variable 2011-04-29 20:04:36 +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
769f5fe3a9 fix curly braces 2011-04-22 23:28:45 +00:00
Dane Springmeyer
5578e5f659 ogr plugin: allow features will null geometries (rendering ultimately will be skipped) instead of breaking early - closes #754 2011-04-21 19:19:07 +00:00
Dane Springmeyer
fac00a5c74 explicit link to libmapnik.dylib 2011-04-20 03:06:32 +00:00
Dane Springmeyer
e1b00387ca occi.input: remove unused header 2011-04-13 18:13:26 +00:00
Dane Springmeyer
b020783087 helloworld.input - comment fix 2011-04-13 18:13:07 +00:00
Dane Springmeyer
8fa2c6b4da raster.input: touchup error output 2011-04-13 17:50:40 +00:00
Dane Springmeyer
9bfecac34e postgis: clear the result before throwing 2011-04-11 22:11:14 +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
da722262e6 upgrade syntax to mapnik2 2011-04-09 05:35:25 +00:00
Artem Pavlenko
cccdd048eb + use mapped_memory_cache for memory mapped files 2011-04-07 15:24:52 +00:00
Artem Pavlenko
878bc6b6da + remove boost::iostreams includes 2011-04-07 15:15:46 +00:00
Artem Pavlenko
7c3896f3a3 + cleanups 2011-04-07 15:09:20 +00:00
Artem Pavlenko
3d0697f343 + update SConscript to reflect previous change 2011-04-07 13:45:05 +00:00
Artem Pavlenko
02fffbd89f + better naming: dbffile -> dbfile 2011-04-07 13:44:57 +00:00
Artem Pavlenko
e81761d270 + remove boost::iostreams dependency 2011-04-07 13:35:21 +00:00
Artem Pavlenko
0e0b7a578c + implement memory mapping using boost::interprocess
+ cache mapped memory regions for re-use
2011-04-06 13:02:31 +00:00
Dane Springmeyer
4dbc58a55b use 'column affinity' type logic to detect the geometry_field if not specified, and throw if not known or if extent cannot be determined 2011-04-04 03:56:15 +00:00
Dane Springmeyer
7d6ed703f4 move numeric2string to sql_utils.hpp 2011-04-04 03:46:41 +00:00
Dane Springmeyer
f891b0f61f sqlite plugin: add features_at_point() impl 2011-04-02 04:54:26 +00:00
Dane Springmeyer
5a1842aad1 remove tabs 2011-04-02 03:45:50 +00:00
Dane Springmeyer
c66b3b250c sqlite plugin: add rowid to the fields 2011-04-01 22:30:21 +00:00
Dane Springmeyer
3b25621258 fix typos in postgis plugin error reporting 2011-04-01 06:27:52 +00:00
Dane Springmeyer
6517f52dcf sqlite plugin: aggregate extents from rtree spatial index 2011-04-01 04:35:56 +00:00
Dane Springmeyer
ede84d5932 sqlite plugin: get type checking correct based on SQlite's loosy goosy 'Column Affinity' 2011-04-01 02:51:28 +00:00
Dane Springmeyer
690ee25c36 sqlite plugin: unless <table> param is a subquery use PRAGMA table_info to query column names and types, and if SQLITE_NULL is encountered when inspecting actual query values fallback to empty strings since mapnik does not have a NULL type 2011-04-01 01:22:19 +00:00
Dane Springmeyer
73e8dd06a0 sqlite plugin: plugin is mature enough now: throw if sql errors are encountered 2011-04-01 01:20:34 +00:00
Dane Springmeyer
23639271fe throw if table is not supplied, quote field names, use spatial index to get extent, and default to built in alias for the primary key ('rowid') if key_field is not supplied 2011-03-31 22:32:22 +00:00
Dane Springmeyer
d3d59c7ac4 fix spelling 2011-03-18 01:11:53 +00:00
Dane Springmeyer
ea895f7837 add geometry_table option to sqlite plugin, which if provided, allows spatial indexes to be used with subqueries 2011-03-17 23:50:16 +00:00
Dane Springmeyer
b8663b67e3 handle NODATA for rgb and grey images in gdal.input - closes #727 2011-03-11 21:28:18 +00:00
Dane Springmeyer
f76d94cec9 fix up postgis error message formatting when no schema is used 2011-03-05 18:01:05 +00:00
Dane Springmeyer
3df75cc422 shape.input: check if .dbf exists and throw up front if not rather than letting shape_io fail 2011-02-28 17:44:56 +00:00
Dane Springmeyer
616aa2ed05 avoid keeping open shape_io shared_ptr when the shapefile does not have an index 2011-02-09 23:41:41 +00:00
Dane Springmeyer
c5833a6db8 remove unmaintained autotools scripts 2011-02-04 22:22:16 +00:00
Dane Springmeyer
4b076272fe only warn about missing index file in debug mode 2011-01-31 23:43:50 +00:00
Dane Springmeyer
1dd2ef690d handle colortable for paletted images in gdal plugin - closes #50 2011-01-27 03:11:22 +00:00
Dane Springmeyer
a2e933309a demo of drawing a line as a second geometry within the feature 2011-01-25 02:07:36 +00:00
Dane Springmeyer
7de23d6c95 formatting code comments 2011-01-13 18:51:20 +00:00
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
d1f56f5843 scons: fixup geos plugin install script 2010-12-21 21:41:02 +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
9700ad4fb2 avoid compiler warning by only adding 'get_overview_meta' in debug mode 2010-12-20 19:17:56 +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
Robert Coup
408de0c223 Add bbox parameter to GDAL Datasource to allow overriding envelope, with Python bindings. Fixes #680 2010-12-09 21:41:25 +00:00
Lucio Asnaghi
9b3ef53338 - improved error reporting in shape plugin 2010-11-29 09:15:43 +00:00
Dane Springmeyer
33f7966280 formatting 2010-11-24 17:29:11 +00:00
Lucio Asnaghi
1d7acffadb + improved and cleaned up occi plugin 2010-11-22 11:40:08 +00:00
Artem Pavlenko
6638423104 + reset head 2010-11-22 11:25:27 +00:00
Dane Springmeyer
a95d6938ad avoid compiler errors on os x 2010-11-19 23:03:35 +00:00
Lucio Asnaghi
a5f582f77e + shape plugin logging cosmetics 2010-11-18 23:46:01 +00:00
Lucio Asnaghi
2906ba8d0d + postgis logging cosmetics 2010-11-18 23:42:33 +00:00
Lucio Asnaghi
ce3e7e5eeb + sqlite logging cosmetics 2010-11-18 23:36:21 +00:00
Lucio Asnaghi
406b3b92fa + raster plugin logging cosmetics 2010-11-18 23:15:59 +00:00
Lucio Asnaghi
43bf9a4b67 + place the generated geos plugin in the parent directory like the other plugins 2010-11-18 23:05:45 +00:00
Lucio Asnaghi
79d039721a + rasterlite logging cosmetics 2010-11-18 23:03:00 +00:00
Lucio Asnaghi
cda9089ddf + ogr logging cosmetics 2010-11-18 22:59:21 +00:00
Lucio Asnaghi
795384596d + kismet plugin cosmetics 2010-11-18 22:48:56 +00:00
Lucio Asnaghi
013d48f667 + logging cosmetics 2010-11-18 22:17:09 +00:00
Lucio Asnaghi
bc43899990 + use wkb feature of GEOS (avoid converting geometries manually): results are 3%-8% faster code.
+ avoid error when calculating the envelope of a point
+ clog debug cosmetics
2010-11-18 22:12:39 +00:00
Lucio Asnaghi
0ecd0676a5 + occi: fix typo error when specifying metadata table query
+ occi: add the <srid> parameter, which when is set togheter with <geometry_field> allows to not query the metadata table at all (saving a huge amount of time when rendering lot of tiles!)
2010-11-18 14:24:19 +00:00
Lucio Asnaghi
91fb08fbff + parameter to specify the query columns use when getting back geaometries:
useful when you have big tables and you don't want to query long fields (long varchar2, blobs, anydata, clobs) which may cause slowdowns
2010-11-18 14:02:09 +00:00
Lucio Asnaghi
bb547f592b + improve occi plugin to determine automaticalle the geometry_field by querying the metadata table ( closes #276 )
+ changed the metadata table to use USER_SDO_* instead of ALL_SDO_* which can cause permission problems
2010-11-16 22:32:07 +00:00
Lucio Asnaghi
650986b279 + improved occi plugin
+ ability to import collections and multi-geometries correctly
+ added a parameter to control the usage of the connection pool
+ added more verbosity in debug mode, to report wrong enums
2010-11-16 17:31:13 +00:00
Lucio Asnaghi
03ce43f805 + make a proper bind (no ogr calls outside)
+ implement dane suggestion about using string for json datasource
+ small cosmetics
2010-11-16 17:14:22 +00:00
Lucio Asnaghi
31d170c8a6 + fixed a compiler warning 2010-11-16 17:12:28 +00:00
Lucio Asnaghi
cfb1d5a23e + fixed a problem in occi plugin when determining the table_name 2010-11-15 18:09:29 +00:00
Lucio Asnaghi
4b81b977b4 + sqlite datasource query fix when using select sub-queries 2010-11-15 11:06:21 +00:00
Lucio Asnaghi
ac801219ba + occi: forgot a namespace 2010-11-15 09:30:06 +00:00
Lucio Asnaghi
e0363a6bbe + occi plugin: fix table_from_sql namespace
+ occi plugin: space cosmetics
2010-11-15 09:25:06 +00:00
Dane Springmeyer
6cda2b7d96 avoid compiler error 2010-11-15 03:17:38 +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
128a7ddc5b + aligned postgis to use the new box2d::from_string
+ added some new parameters toallow setting "gid" (geometry id), "field_data" (additional text data with the geometry), "field_name" (name of the additional text data field)
+ added proper usage of extent and coord2d selections in spatial queries
+ cosmetics
2010-11-14 15:02:01 +00:00
Lucio Asnaghi
4d04901c0b + cosmetics 2010-11-14 14:58:29 +00:00
Lucio Asnaghi
cffa0a07d6 + aligned postgis to use the new box2d::from_string
+ thrash usage of static string for datasource name
2010-11-14 14:56:35 +00:00
Lucio Asnaghi
0d895b1e59 + avoid usage of static string where it's not needed 2010-11-14 14:55:21 +00:00
Lucio Asnaghi
68cbb51814 + fixed a problem in getting GetColorEntry in RGB datasets
+ cosmetics
2010-11-14 14:54:28 +00:00
Lucio Asnaghi
973aaf1247 + aligned sqlite to use the new box2d::from_string
+ thrash usage of static string for datasource name
2010-11-14 14:51:04 +00:00
Lucio Asnaghi
dfdfe15853 + avoid usage of static string where it's not needed 2010-11-14 14:49:42 +00:00
Lucio Asnaghi
fc5f234567 + thrashed unused static string 2010-11-14 14:48:48 +00:00
Lucio Asnaghi
b7414ee1f9 + aligned kismet to use the new box2d::from_string 2010-11-14 14:46:44 +00:00
Lucio Asnaghi
ddb6cfdcba + aligned occi to use the new box2d::from_string 2010-11-14 14:43:49 +00:00
Lucio Asnaghi
f24d329cac - cosmetics 2010-11-14 14:41:49 +00:00
Dane Springmeyer
f9d229c7dc postgis: also split extent string on spaces 2010-11-14 08:34:33 +00:00
Dane Springmeyer
592765d39c osm plugin: make sure to read in data from new file - closes #542 2010-11-13 21:43:38 +00:00
Lucio Asnaghi
2241f9adea cosmetics 2010-11-13 20:21:21 +00:00
Lucio Asnaghi
9e0c5b0769 cosmetics 2010-11-13 20:20:38 +00:00
Lucio Asnaghi
796740f56b - killed a couple of debug statements in geos converter 2010-11-12 22:12:58 +00:00
Lucio Asnaghi
d24ed6cdf9 + fix geos geometry converter bugs 2010-11-12 22:11:13 +00:00
Lucio Asnaghi
bed8bcf84f - improved geos plugin. first results available 2010-11-12 21:18:53 +00:00
Lucio Asnaghi
2cc9435576 - forgot to declare a namespace (oops!) 2010-11-12 00:31:04 +00:00
Lucio Asnaghi
07f455ebaa + use mapnik::table_from_sql in sqlite and occi plugins (after change r2337 thanx to dane) 2010-11-12 00:12:47 +00:00
Dane Springmeyer
385ad05205 create an sql_utils header for all sql-based plugins to be able to leverage, and move the postgis table_from_sql function into it 2010-11-11 16:33:30 +00:00
Lucio Asnaghi
4ce78f4a3f - fix in build system to allow GEOS to compile properly 2010-11-10 11:48:55 +00:00
Lucio Asnaghi
0066407774 - added extent support for geos plugin
- fixed python binding for geos plugin
2010-11-10 11:35:19 +00:00
Lucio Asnaghi
48d31542f9 - added missing GEOS conversion functions 2010-11-10 11:08:29 +00:00
Lucio Asnaghi
f1b8ad4ee7 Initial check in of a GEOS input plugin: This allows constructing
geometries directly inside a XML file by specifying a WKT text.
Useful a lot for building legend images for layers or drawing fixed
geometries in the map. An update of the main SConstruct and python
bindings for this will follow. Be careful with this, as it's mainly
alpha code.
2010-11-10 10:46:09 +00:00
Dane Springmeyer
37a300d9fa allow occi plugin to compile against > 10g 2010-11-08 21:14:48 +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
Dane Springmeyer
688c950344 get the occi plugin compiling after the late binding patch 2010-11-05 17:37:48 +00:00
Dane Springmeyer
55131af834 fix typo 2010-11-05 17:02:21 +00:00
Dane Springmeyer
feb4d0cb8e fixup more old references to previous geometry storage impl 2010-11-05 06:20:37 +00:00
Dane Springmeyer
209b0697dc upgrade a hello world plugin and cairo renderer to fully use new geometry_type 2010-11-03 16:26:30 +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
ea39e6f69e add a directory for plugin templates - and add a first "hello world" with basic docs" 2010-10-24 08:04:16 +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
d4306abf7d sqlite: skip reading featureset if no wkb is found; rasterlite: link to boost libs on mac os x 2010-10-01 20:16:49 +00:00
Dane Springmeyer
8e708a8160 gdal: protect from passing wrong number of bands to gdal 2010-09-19 17:52:17 +00:00
Dane Springmeyer
00f473de63 gdal plugin: calculate constant raster properties used in featureset up front at datasource creation (no real speed boost but less repeated code) 2010-09-18 19:19:27 +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
fbd0e4954c remove duplicate locks - handled in pool.hpp already (mapnik held up fine this way in the wms benchmarks) 2010-09-14 17:08:18 +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
1cd1593513 fix spelling error in 'initial_size' and ditch lowercasing method which will not work unless applied before the query object is created 2010-08-28 03:09:49 +00:00
Dane Springmeyer
1d7afcec89 make sure the user does not request a layer by index greater than exists in the dataset 2010-08-20 21:59:48 +00:00
Dane Springmeyer
2de597d961 tweak to error formatting of layers available in ogr dataset 2010-08-20 21:24:58 +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
c7f136db91 avoid segfault if geometry is so invalid that no reference is returned and we cannot check if it is empty - closes #574 2010-08-20 21:14:14 +00:00