Commit graph

595 commits

Author SHA1 Message Date
Dane Springmeyer
4df684c50e PointSymbolizer serialization was missing 'opacity' and 'allow_overlap' 2009-11-06 20:56:34 +00:00
Artem Pavlenko
a3a5859466 Patch from David Eastcott :
1.  Modified Text Symbolizer

  a) corrected line fragment centering (for 2nd and subsequent lines, when line breaks occur).

  b) adjusted vertical alignment calculation so that:
      i)      middle -> has the center of the text line(s) at the point origin
      ii)     bottom -> has the text line(s) below the point origin
      iii)    top -> has the text line(s) above the point origin

  c) added new text_symbolizer attribute: 'wrap_before', value range: true/false, default == false

     allows line breaks at first wrap_char before wrap_width as an alternative to the original
     which was to create the line break at the first wrap_char after wrap_width

  d) added new text_symbolizer attribute: 'horizontal_alignment', value range: left/middle/right, default == middle
      i)      left -> has all text line(s) to left of the point origin
      ii)     middle -> has all text line(s) centered on the the point origin
      iii)    right -> has all text line(s) to the right of the point origin

      NOTE:   dx, dy position adjustments are applied after alignments and before Justify.

  e) added new text_symbolizer attribute: 'justify_alignment', value range: left/middle/right, default == middle
      i)      left -> after alignments, has all text line(s) are left justified (left to right reading)
      ii)     middle -> after alignments, has all text line(s) center justified
      iii)    right -> after alignments, has all text line(s) right justified (right to left reading)

  f) added new text_symbolizer attribute:  'opacity', value range: 0.0 thru 1.0; 1.0 == fully opaque

  g) modified positioning to compensate for both line_spacing and character_spacing, to ensure proper
     centering of the text envelope.  Also ensure that centering occurs correctly even if no wrapping
     occurs.  Line spacing is uniform and consistent and compensates for errors between text_size and
     the actual size (ci.height is inconsistent, depending on case and character); fixes issue with
     multi-line text where some lines have a slight gap and others are compressed together.


2.  Modified shield_symbolizer

  a) added the attributes:
      i)      allow_overlap
      ii)     vertical_alignment
      iii)    horizontal_alignment
      iv)     justify_alignment
      v)      wrap_width
      vi)     wrap_character
      vii)    wrap_before
      viii)   text_convert
      ix)     line_spacing
      x)      character_spacing
      xi)     opacity

  b)  added new shield_symbolizer attribute: 'unlock_image', value range: true/false, default == false
      i)  false == image and text placement behaviour same as before
      ii) true == image placement independant of text, image is always centered at geometry point, text placed per attributes,
                  dx/dy only affect text.

      Allows user to create point markers with text, but both the text and image rendering collision detection are done
      as a pair (they come and go together - solves problem if using point_symbolizer and text_symbolizers where one or the
      other are omitted due to overlaps, but not both)

  c)  extended choices for the attribute 'placement' to include vertex; effect is limited to the shield_symbolizer

      Allows an attempted placement at every vertex available, gives additional shield placement volume when using line geometry

  d)  ensured that the text placement was not updating the detector unless a shield image was actually placed.

  e)  added new shield_symbolizer attribute: 'no_text', value range: true/false, default = false

      When set true, the text for the feature is ignored ('space' subsituted) so that pure graphic symbols can be used
      and no text is rendered over top of them.
2009-10-19 13:52:53 +00:00
Dane Springmeyer
5fccc3ae62 improve formatting of error message during xml loading if document is not well formed 2009-09-28 17:35:50 +00:00
Dane Springmeyer
d9d15bb081 avoid segfault when pickling a TextSymbolizer using wrap_character by removing const declaration 2009-09-25 20:29:03 +00:00
Dane Springmeyer
767afe3f76 scons: pull exact libagg name out of env['LIBS'], since on debian we are actually needing to link to 'libagg_pic' 2009-08-28 15:44:06 +00:00
Dane Springmeyer
0519584644 scons: make sure to still link to libagg even if internal lib is not used - need because before r1196 we were not filtering out libs 2009-08-27 23:18:09 +00:00
Dane Springmeyer
5c184a5075 load_map: improve formatting of error message within layer 2009-08-27 04:48:32 +00:00
Dane Springmeyer
e897b832a4 +reflect new text symbolizer options added in r1254 - closes #391 2009-08-17 22:54:50 +00:00
Dane Springmeyer
e7dd9094a5 revert unintended file changes from r1275 2009-07-26 01:15:44 +00:00
Dane Springmeyer
45266074c8 scons: fix typo, and ensure all temp output is writeable 2009-07-26 01:08:51 +00:00
Dane Springmeyer
8850d19bfc in load_map, fix type declaration for dx,dy as double 2009-07-24 07:24:36 +00:00
Dane Springmeyer
286ad12c47 add method to save a map to a string (closes #396) 2009-07-24 06:15:58 +00:00
Dane Springmeyer
e0c9e5c826 add missing serialization of building symbolizer height, be explicit of double in polygon_symbolizer 2009-07-24 06:10:42 +00:00
Artem Pavlenko
85ecc33d7f + applied patch from Jochen Topf :
* text_convert="none|toupper|tolower"
 Convert all text to upper/lower case before rendering. "none" doesn't do
 anything with the text and is the default. Works for labels along lines
 or at points.

* line_spacing="<number>"
 Add this many pixels space between two lines in text labels that have
 been broken into several lines. Default is 0. Doesn't do anything for
 labels along lines.

* character_spacing="<number>"
 Add this many pixels space between two characters in a text. Default is 0.
 Currently only works for text labels on point geometries. This should
 also be implemented for labels along lines, but I'll leave that for
 another day.

* wrap_character="<character>"
 Instead of breaking text into lines on spaces, use this character. This
 is useful, when you want to make sure that labels are broken at the right
 spot. Note that you'll probably want to make wrap_width small so that
 your lines are actually broken, otherwise you'll see the wrap_character
 in the output. Default is ' ' (space). Doesn't do anything for labels
 along lines.
2009-07-20 15:30:19 +00:00
Artem Pavlenko
cba404058e + formatting 2009-07-13 22:36:16 +00:00
Dane Springmeyer
817720e1c5 increment ABI version numbers 2009-07-09 01:16:52 +00:00
Dane Springmeyer
f8559c07b6 remove unneeded header 2009-07-08 23:01:36 +00:00
Artem Pavlenko
6e993fb388 + added <iostream> header 2009-07-08 21:26:40 +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
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
Dane Springmeyer
e26e46788a better formatting of error when plugin lib can't be loaded 2009-07-07 23:44:12 +00:00
Artem Pavlenko
a6075c97b5 + fixed read_coord method 2009-07-07 19:00:55 +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
8d820d4761 + use boost::scoped_ptr 2009-07-03 09:25:18 +00:00
Dane Springmeyer
1ce6266738 more robust cairo lib addition - addresses #371 2009-06-30 22:12:11 +00:00
Dane Springmeyer
40adc2c03f limit linking to libmapnik by selectively specifying libraries - closes #371 2009-06-30 21:58:05 +00:00
Artem Pavlenko
186236cba6 + replace 'long long' with int64_t 2009-06-29 14:15:31 +00:00
Artem Pavlenko
71786bff63 + applied patch 'avoid_edges' from albertov, thanks! 2009-06-25 20:06:01 +00:00
Dane Springmeyer
eed058f034 fix scope issue in previous commit 2009-06-22 07:19:02 +00:00
Dane Springmeyer
14ef2b36f0 expose list of registered plugins as a 'plugin_names()' method of DatasourceCache similar to the FontEngine.face_names() - closes #246 2009-06-22 06:59:56 +00:00
Dane Springmeyer
7eb01c0be4 +make cairo compilation conditional on CFLAG (as well as Scons) like bindings/python/python_cairo.cpp 2009-06-08 19:43:49 +00:00
Dane Springmeyer
bc463c2a75 use BOOST_BIG_ENDIAN instead of WORDS_BIGENDIAN 2009-06-08 07:08:30 +00:00
Dane Springmeyer
e7aff375db std namespacing 2009-06-03 05:26:46 +00:00
Dane Springmeyer
07597bc594 fix interpretation of SheildSymbolizer displacement values as doubles in load_map.cpp- closes #353 2009-06-01 02:13:32 +00:00
Dane Springmeyer
8d6c5dac6b fix interpretation of TextSymbolizer displacement values as doubles in load_map.cpp- closes #353 2009-06-01 02:11:07 +00:00
Dane Springmeyer
e7457a139a +add pickle support to text_symbolizer, improve support for stroke, and add tests for stroke and text pickling via python - see: #345 2009-05-26 01:50:58 +00:00
Dane Springmeyer
dadd64519b +add pickle support for proj_transform and view/coord_transform - see #345 2009-05-24 06:31:32 +00:00
Dane Springmeyer
7d9ac2a094 add missing include 2009-05-19 22:59:56 +00:00
Dane Springmeyer
fd98a4a49a shuffle guess_type to image_utils for logical re-use 2009-05-19 22:43:54 +00:00
Dane Springmeyer
13fa57e61f expose setting of symbolizer_with_image filename 2009-05-14 22:54:36 +00:00
Dane Springmeyer
6c8a5f805a xml: make sure to explicitly declare the default relative_paths option as true - thanks Ldp 2009-05-06 23:42:28 +00:00
Dane Springmeyer
404a43f5f0 +ensure relative paths to symbols and datasources in xml are based on working directory of xml file, added 'paths_from_xml' parameter that is true by default but can be made false to maintain previous behavior - closes #326 (has no effect on load_map_from_string) 2009-05-01 01:59:01 +00:00
Lucio Asnaghi
eaa49ca028 + applying patch proposed by dane that add explicit_defaults selection when saving maps (closes #327) 2009-04-28 21:44:34 +00:00
Lucio Asnaghi
158989fc56 + fix text_symbolizer support for vertical_alignment in save_map() (closes #328) 2009-04-28 21:23:43 +00:00
Dane Springmeyer
4226f293b2 Add ABI info to os x dylib - closes #322 2009-04-26 04:28:00 +00:00
Dane Springmeyer
3dd616007d Add FULL_LIB_PATH option for OS X to link in the full path to libmapnik.dylib in the library itself 2009-04-26 03:33:29 +00:00
Dane Springmeyer
b46996ff8b catch error and raise UserWarning if an input plugin cannot be found during load_map() - closes #302 2009-04-13 23:22:00 +00:00
Artem Pavlenko
d100cb7587 + this change was needed to avoid raster tiles alignment problems
TODO: Review raster handling pipeline to ensure correct alignments across all sources.
2009-04-10 12:07:13 +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
Dane Springmeyer
4276ae24fe allow customization of JPEG output image quality using syntax similar to png256, but using 0-100 as suffix, e.g. render_to_file(m,'image.jpeg','jpeg80') - closes #198 - patch from Dennis Luxen 2009-04-07 15:48:51 +00:00
Andreas Volz
42d659a19f compile utils with autotools 2009-04-04 16:33:25 +00:00
Artem Pavlenko
4a3a9128ec + move compositing modes implementation out of Image class 2009-03-31 10:08:33 +00:00
Artem Pavlenko
0b20e2a768 + removed specializations for text renderer 2009-03-31 09:23:23 +00:00
Dane Springmeyer
5d976513b8 scons: remove print statement of PREFIX introduced in r1043 2009-03-30 23:32:36 +00:00
Artem Pavlenko
10f55a678b + add support for vertical_alignment (text_symbolizer)
valid values are : top, middle, bottom
  default to middle which can now center multi-line text
2009-03-30 20:47:26 +00:00
Artem Pavlenko
2eec236fc2 + applied "hill shading" patch from Marcin Rudowski
a) Raster opacity
   b) Raster merging modes (TODO:add more modes, consider agg impl)
   c) Raster scaling algos: fast,bilinear,bilinear8
      (TODO: add alpha support in bilinear8) 
   d) improvements to png256

   *Great work, thanks!*
2009-03-29 11:05:20 +00:00
Artem Pavlenko
ae568d3223 make text_symbolizer behave like shield_symbolizer 2009-03-29 09:46:02 +00:00
Artem Pavlenko
e598348e56 + only allow LINE_PLACEMENT for geometries with more than one point 2009-03-29 09:37:51 +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
Artem Pavlenko
570fe611f4 + qualify 'value' to avoid names clashing
+ use _enumeration helper wrapper
2009-03-21 12:39:06 +00:00
Artem Pavlenko
fb186a5269 disable libtiff warning handler 2009-03-15 23:32:36 +00:00
Lucio Asnaghi
556095af04 - sqlite.input: added row_offset and row_limit to parameters
- sqlite.input: added wkb_format parameter for selecting WKB format (generic/spatialite)
- sqlite.input: commented check of the spatial index
- wkb.hpp: removed wkqSQLite in favour of wkbSpatiaLite
2009-02-23 15:00:25 +00:00
Andreas Volz
3c1b67ccd4 missed color class 2009-02-18 22:54:51 +00:00
Andreas Volz
1dc3aae33e profiling 2009-02-18 22:25:02 +00:00
Artem Pavlenko
56b15031d0 + support load_map_string for all xml parsers 2009-02-18 00:33:26 +00:00
Artem Pavlenko
97a40d7e7e + fix msvc-9.0 compiler warnings 2009-02-17 23:19:28 +00:00
Dane Springmeyer
b90f620901 + inherit libmapnik ABI version from environment (now calculated in SConstruct) 2009-02-17 20:32:46 +00:00
Jon Burgess
5a216d01b5 Read spacing parameter on ShieldSymbolizer from XML 2009-02-16 21:45:32 +00:00
Jon Burgess
d1b365098f Includes png.h early to avoid ordering issues with setjmp.h. Fixes #231 2009-02-15 11:56:54 +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
Jon Burgess
79c350678a The final line_to is not required in the WKB reader since the last and first points of the polygon geometry will be the same 2009-02-07 23:43:53 +00:00
Jon Burgess
d11654895b Utilise color alpha information when rendering. Multiplies the color alpha with the rendering opacity. Fixes 221. 2009-02-07 14:09:23 +00:00
Tom Hughes
220bb3e99a Revert the patch to add a show_page flag to the cairo renderer and
replace it with support for rendering to a cairo context rather than
a cairo surface.

When rendering to a surface a show_page is done, when rendering to a
context it is not so that multiple renders can be done, possibly with
modified scaling and/or translation.
2009-02-06 00:46:29 +00:00
Dane Springmeyer
51293f64ba + apply show_page.patch (thanks Berteun) (closes #201) 2009-02-05 18:09:14 +00:00
Artem Pavlenko
a45e93b79a + more property goodness on the TextSymbolizer from Python (springmeyer) 2009-02-05 11:54:07 +00:00
Artem Pavlenko
e27a71cc39 + mapnik_text_overlap.patch (Marcin Rudowski) 2009-02-02 23:37:16 +00:00
Artem Pavlenko
866f5f98eb + implement buffered_extent method on Map object 2009-02-02 23:07:18 +00:00
Artem Pavlenko
fbb102b975 + changed operator* and operator/ behaviour as per #206 2009-02-01 12:15:30 +00:00
Artem Pavlenko
f657a2dfe4 + Alpha background patch for Cairo (Berteun) 2009-01-29 15:27:27 +00:00
Dane Springmeyer
f5127d6ee4 Remove reference to CAIRO_HAS_IMAGE_SURFACE macro since this is not supported until cairo 1.8 release 2009-01-28 21:11:10 +00:00
Artem Pavlenko
6f98c95c1f + mapnik-fix-cairo-polygon-patterns.patch (jonb) 2009-01-24 18:02:33 +00:00
Artem Pavlenko
78f10770ec mapnik-polygon-symbolizer-wants-fill-opacity.patch (jonb)
The save_map & load_map disagree about the name of the CSS parameter
 for the opacity in PolygonSymbolizer. Make them consistent changing
 save_map to output fill-opacity.
2009-01-21 15:41:44 +00:00
Artem Pavlenko
6c0977099d + mapnik-use-rgba-in-color-to-string.patch (jonb)
Make color::to_string() generate appropriate rgb() or rgba() strings
depending on alpha() value. It also changes the alpha range to be
0.0-1.0, not 0-255.
2009-01-21 15:37:55 +00:00
Artem Pavlenko
5b5eb9d2ee + support building with < 1.34 (e.g. 1.33.1) boost libraries 2009-01-19 22:53:05 +00:00
Artem Pavlenko
8b298729bf + mapnik-centralise-image-tostring-functions.patch (jonb)
(moves Image.tostring() to core c++ code)
2009-01-19 22:51:55 +00:00
Artem Pavlenko
97ad49c067 + mapnik-load-map-checks.patch (jonb)
This patch adds more reporting of unknown elements during parsing. This
  helps catch some typos etc. It also consistently skips <xmlcomment>'s
  which used to cause errors when used in some places.
2009-01-17 23:53:04 +00:00
Artem Pavlenko
bf598cf487 + mapnik-check-fonts-during-load-map.patch from jonb
This patch adds some extra exceptions for missing fontsets.
  Without this checking, you only notice the error at rendering time when
  it first needs to render a missing font.

  It also cleans up the font exception messages which were displaying the
  font name twice.

  Some minor questions:
  * Should I wrap the fontset exceptions with if(strict_)?
  * Should strict default to true?
2009-01-17 20:52:24 +00:00
Artem Pavlenko
387ff213ef + mapnik-serialize-fontset.patch from jonb
This adds the fontset support into save_xml
 - Adds fontset_name into the text attributes
 - Adds the fontset definitions
 - glue to read fontsets from map
2009-01-17 20:18:41 +00:00
Artem Pavlenko
cad0a839b6 + mapnik-load-map-from-string.patch (jonb) 2009-01-15 23:51:07 +00:00
Artem Pavlenko
32d21d7c80 + use fully qualified names from stl 2009-01-15 23:12:56 +00:00
Artem Pavlenko
e3658a7a1a + applied mapnik-image32-from-cairo.patch (jonb) 2009-01-15 22:51:12 +00:00
Artem Pavlenko
fe20652629 + removed unused parameter from has_point_placement 2009-01-14 12:34:56 +00:00
Artem Pavlenko
a07767ef3d + (c++) renamed mapnik::Color to mapnik::color
+ (c++) added mapnik::color ctor from named colours (TODO: consider not to export color_factory) 
+ (Python) fixed pickling
+ (Python) added to_hex_string method
2009-01-14 12:10:24 +00:00
Dane Springmeyer
689b1eb018 Made Scale Denominator available as a property of the Map 2009-01-14 06:12:55 +00:00
Artem Pavlenko
54f4d3bc51 + corrected init order 2009-01-13 01:35:27 +00:00
Artem Pavlenko
a11cc119e4 + applied intersection patch from randomjunk - #127 2009-01-13 00:35:45 +00:00
Dane Springmeyer
a97bbb52af Avoid serialization of maxzoom if value is infinity (default) 2009-01-11 20:09:32 +00:00
Dane Springmeyer
68e784dfdd + add load_map() and save_map() support for reading and writing of abstract, title, minzoom, maxzoom, and queryable attributes 2009-01-11 18:55:29 +00:00
Artem Pavlenko
8c81b688a2 + don't link to iconv on OSX 2008-12-07 16:27:06 +00:00
Artem Pavlenko
65ea5bca98 + applied mapnik-skip-projection-if-equal.patch (jonb) 2008-12-07 16:23:57 +00:00
Artem Pavlenko
7cbb0ab35a + added support for 'min_distance' for 'POINT' label placement. 2008-11-21 12:48:19 +00:00
Artem Pavlenko
6062f42bbe + applied patch avoid_extent from rcoup 2008-11-19 21:50:12 +00:00
Artem Pavlenko
190f8e5cb9 + return boost::optional in find_style (c++)
+ return feature_type_style by value, raise KeyError otherwise (Python)
2008-11-18 21:15:46 +00:00
Tom Hughes
9408a41a5c Add opacity support to the point symbolizer - taken from r743 which
added the same support to the agg renderer.
2008-10-31 00:51:41 +00:00
Tom Hughes
9d6a7f1075 Port shield placement enhancements from r741 and r745 from the agg
renderer to the cairo renderer. Should close #136.
2008-10-31 00:39:22 +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
Artem Pavlenko
11100cf30e + apply has_dimensions for line_placement only 2008-09-21 10:42:51 +00:00
Artem Pavlenko
20f3a9460d + expose buffer_size parameter (default 0)
influences envelope used by placement detector 
  ( i.e. 'avoid_edges' parameter)
2008-09-21 10:14:38 +00:00
Artem Pavlenko
565da55742 + point symbolizer opacity patch from Brian (openstreetmap@brian.quinion.co.uk) 2008-09-19 08:27:32 +00:00
Artem Pavlenko
3b85ebad9b make shield_symbolizer to work with point geometries (TODO!!) 2008-09-15 08:48:21 +00:00
Dominic Hargreaves
2d6bdf0a4d Add missing #include to fix GNU/kFreeBSD build 2008-08-09 22:16:58 +00:00
Andreas Volz
bd2b9e2ea0 - add new files
- optional check for gdal
2008-08-02 20:39:26 +00:00
Tom Hughes
7d173be190 Add support for font sets on shield sumbolizers. 2008-07-29 23:21:39 +00:00
Tom Hughes
6472af9289 Add an INTERNAL_LIBAGG build option that can be used to make mapnik
build against the system libagg instead of mapnik's copy.
2008-07-29 18:35:27 +00:00
Tom Hughes
dd9435f50c Fix compiler warnings. 2008-07-29 18:06:15 +00:00
Tom Hughes
791874a859 Improve alignment of wrapped text.
Patch from Jon Burgess <jburgess777@googlemail.com>.
2008-07-27 11:12:32 +00:00
Tom Hughes
7e137e3ad7 Remove unused variable.
Patch from Jon Burgess <jburgess777@googlemail.com>.
2008-07-27 11:08:02 +00:00
Tom Hughes
5432c8a7d0 Make sure we set the height of the string if it doesn't contain
any spaces where we could break the line.

Patch from Jon Burgess <jburgess777@googlemail.com>.
2008-07-27 11:07:12 +00:00
Tom Hughes
779a0e67b2 Make the cairo renderer build again, with font fallback support now. 2008-07-25 23:26:02 +00:00
Tom Hughes
026e4e71e7 Refactor some of the font set stuff so that the cairo renderer can be
made to work again.
2008-07-25 00:23:33 +00:00
Tom Hughes
dc34115e21 Commit missing font_set.cpp file. Closes #100. 2008-07-24 22:57:40 +00:00
Artem Pavlenko
48d7d639f9 added missing avoid_edges parameter 2008-06-30 16:05:25 +00:00
Artem Pavlenko
376cdeb453 applied aspect ratio patch from Frederik Ramm 2008-06-29 10:59:28 +00:00
Artem Pavlenko
1b47afde07 applied font fallback patch from Beau Gunderson 2008-06-29 10:58:48 +00:00
Artem Pavlenko
3f9127b5d0 reverting back to 700 2008-06-29 10:58:29 +00:00
Artem Pavlenko
c7cbfa5c82 reverting back to 700 2008-06-29 10:56:29 +00:00
Artem Pavlenko
3275cf9ce6 applied font fallbacj patch from Beau Gunderson 2008-06-29 10:40:08 +00:00
Andreas Volz
81ce983d5f link against boost and version bump 2008-06-12 20:35:52 +00:00
Tom Hughes
25c831378f Don't clip coordinates to 16 bits if we're using cairo 1.6 as it is no
longer limited to 16 bit coordinates.
2008-04-20 11:30:10 +00:00
Tom Hughes
0e6237270e Remove unused ifdefs. 2008-04-20 10:45:59 +00:00
Tom Hughes
889f36b8df Enable clipping for cairo 1.6.0 and later. 2008-04-19 23:22:03 +00:00
Tom Hughes
4483d59797 Revert previous fix for #89 and add a new improved fix that enhances the
value class to have a proper null type and do comparisions SQL style so
that null is neither equal nor not equal to other things.
2008-04-12 15:22:27 +00:00
Tom Hughes
a27bde741e Don't try and render text if the attribute containing the text does
not exist for the feature. Closes #89.
2008-04-11 23:11:35 +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
Artem Pavlenko
ab29b03833 reverting r681 2008-04-06 09:23:17 +00:00
Dominic Hargreaves
e128d51534 Patch to disallow placement if segment_length=0 from jonb (fixes #86) 2008-03-29 20:02:16 +00:00
Artem Pavlenko
7bcba5f1be applied http://snecker.fedorapeople.org/mapnik/devel/gcc43-warnings.patch from Christopher Brown 2008-03-26 09:56:17 +00:00
Artem Pavlenko
bb9290be8a fixed line_pattern_symbolizer transformations 2008-03-17 22:04:22 +00:00
Tom Hughes
2f67c036fe Make cairo components conditional on the relevant libaries etc existing. 2008-03-12 19:14:51 +00:00
Artem Pavlenko
e1ea0a72db use range based 'parse' method
transcode strings in filter expressions (default to utf8 input)
  -- we can use map definition *.xml to define encoding
  -- and in case of Python from
    # -*- coding: utf-8 -*-
  
utf8 encoded filters are working now.
2008-02-26 11:43:49 +00:00
Artem Pavlenko
cb905b533a restored templated version 2008-02-26 08:48:47 +00:00
Tom Hughes
02962156c5 Add support for rendering to a cairo surface. 2008-02-23 00:17:53 +00:00
Artem Pavlenko
f3a3ce04db convert to degrees if projection is geographic 2008-02-20 12:44:34 +00:00
Artem Pavlenko
b54aa9091b removed unneeded headers 2008-02-19 11:27:06 +00:00
Artem Pavlenko
308e315432 added Unicode support based on ICU 2008-02-18 21:40:34 +00:00
Artem Pavlenko
1ea7bffd4c pass parameter by reference
store reference to wstring in text_path
2008-02-12 20:05:04 +00:00
Artem Pavlenko
01f4984804 don't fail if file can not be open 2008-02-12 20:03:04 +00:00
Andreas Volz
ba5c156c45 fixed autotools build 2008-02-08 19:41:57 +00:00
Dave
a3652c6e66 Return old label_position_tolerance=0 behaviour.
- Place within 1/2 of spacing rather than 1/3.
2008-02-06 20:38:54 +00:00
Artem Pavlenko
1b03c81e84 hide implementation details 2008-02-05 13:58:47 +00:00
Artem Pavlenko
b44762e592 allow multi/single threaded variants 2008-02-04 16:12:13 +00:00
Artem Pavlenko
f4949ffca5 patch from TomH adds a global mutex to protect all access to the
proj4 library and ensure that only one thread can be inside a call to
the library at a time.
2008-02-04 11:54:07 +00:00
Dave
6b2285f237 Fix placing 1 character line labels. 2008-01-28 21:41:53 +00:00
Artem Pavlenko
3c5b7f02f3 applied freebsd patch from Beau Gunderson 2008-01-28 14:51:10 +00:00
Artem Pavlenko
a9348db058 part of previous commit 2008-01-25 14:42:13 +00:00
Artem Pavlenko
651cdbe968 added support for saving images into Python String object
(NOTE: some methods have different signitures now- API changed)
2008-01-25 14:40:48 +00:00
Dave
5bbe90b85f Remove find_placements, build_path_follow, build_path_horizontal.
Add new find_point_placements to cover the gap left.
Change shield symbolizer to use find_point_placements.
Results are the same as before, but with much less duplicate code.
2008-01-24 01:16:14 +00:00
Dave
f11a62b849 throw an exception rather than exit the program when an unknown font is specified.
It would be better if this was done when contructing the text_symbolizer, but this will do.
2008-01-23 21:56:04 +00:00
Dave
a73687aeee Woops, remove debug output. 2008-01-23 21:39:49 +00:00
Dave
1d556b54fd Make line placement retry if it places >= 50% of the characters upside down. 2008-01-23 21:38:48 +00:00
Dave
671c215ae6 Make specifying an invalid font a fatal error. ticket #31 2008-01-23 20:31:50 +00:00
Artem Pavlenko
f802250e0f refactored image i/o , see ticket #15 for more details. 2008-01-23 11:34:59 +00:00
Dave
918bd1ef6b Improved character placement code.
Slightly changes the result of max_char_angle_delta as now character angles aren't strict against the line angles.
Example screenshots on mailing list! :)
2008-01-23 04:18:17 +00:00
Artem Pavlenko
2b60d6d425 applied patch to build on OSX Leopard and Sun's C++ compiler on Solaris from Justin Bronn 2008-01-21 20:15:07 +00:00
Artem Pavlenko
2fe6e6a0cb link to iconv on Darwin 2008-01-21 16:40:50 +00:00
Artem Pavlenko
a61553edb8 removed redundant bounding box from label_placement 2008-01-21 16:18:46 +00:00
Dave
d3ec70aff9 Return pre-r557 rendering of line aligned labels. (Not the code, the algorithm ideas)
Spacing and no spacing line rendering are done by the same function.
Code is cleaner, performance should be equal or improved.
Text displacement is "Different", better in some cases and worse in others, I can revert it if wanted.
Old non spacing code is not yet removed as it is used by ShieldSymbolizer which I haven't investigated yet.
Individual character placement still has issues, that is my next task to fix!
2008-01-21 03:08:18 +00:00
Dave
e96e7b18fa Fix find_placements_with_spacing in relation to http://trac.mapnik.org/ticket/62
force_odd_labels also works again.
2008-01-16 01:13:27 +00:00
Dave
a401a26ccb Additional comments for the placement finder. 2008-01-15 22:32:14 +00:00
Dave
017a966ea1 Fix blending onto transparent background. Detailed on mailing list. 2008-01-14 20:43:55 +00:00
Artem Pavlenko
30968b337e only print to clog when MAPNIK_DEBUG is defined 2008-01-11 10:09:54 +00:00
Artem Pavlenko
16f481fc27 applied mapniksoname.patch from Martjin 2008-01-03 12:16:27 +00:00
Artem Pavlenko
0390f129a1 refactored transcoder stuff 2008-01-03 11:41:00 +00:00
Artem Pavlenko
0c7b9e3736 setup install_name (soname on Darwin) for libmapnik 2007-12-31 12:34:31 +00:00
Artem Pavlenko
52bed0b89a applied patch from Jochen (throw an exception if unknown type) 2007-12-19 16:34:36 +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
002f37bdc9 corrected parameters order 2007-12-17 12:46:11 +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
4586586448 added convinence overloads for 'save_to_file' and 'render_to_file'
Example:
	>>> from mapnik import *
	>>> im = Image(200,200)
	>> save_to_file('test.png',im) # Guess image type from file extension
	>> save_to_file('test.png,'jpeg',im) # Explicitly save as JPEG
2007-12-06 12:14:29 +00:00
Artem Pavlenko
27f88c9ec0 small fix 2007-12-06 10:59:28 +00:00
Artem Pavlenko
c5bca5ab96 removed unused variables to calm msvc toolset 2007-11-08 21:11:12 +00:00
Artem Pavlenko
c0d411d14e small cleanup 2007-11-07 14:07:12 +00:00
Artem Pavlenko
6eadaafd49 use 'avoid_edges' parameter for point placement 2007-11-06 09:07:18 +00:00
Artem Pavlenko
01de9d9e8c 1. revived 'avoid_edges' option
2. fixed 'placement_finder' extent in agg_renderer.cpp
3. added 'avoid_edges' to map loader
2007-11-05 10:32:01 +00:00
Artem Pavlenko
ce6985aaad use 'contains' instead of 'intersects' test to provide 'avoid_edges' functionality.
(Should 'avoid_edges' be always enabled ???)
2007-11-05 09:15:53 +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
2cf8278f1d Generic python binding for mapnik::enumeration 2007-10-19 22:17:16 +00:00
Artem Pavlenko
b40706c295 1. templated save_as_png and save_as_jpeg
2. use std::iostream for I/O in save_to_file

TODO: allow writing an output image to memory buffer (i.e Python StringIO)
2007-10-17 14:47:56 +00:00
David
bc54b150ea - reversed header include order 2007-10-08 17:42:41 +00:00
Artem Pavlenko
d1a345a3d2 1.don't share FT_Library object between threads (TODO : implement freetype_engine pool)
2. merged changes with latest load_map
2007-10-05 11:27:00 +00:00
Andreas Volz
f0cca52c3b optional build with libxml2 2007-10-02 21:43:13 +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
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
beebee468b fixed is_datasource_plugin predicate 2007-08-28 10:19:48 +00:00
Artem Pavlenko
7f3bbace30 check if file ends with '.input' before attempting to load it 2007-08-15 17:23:45 +00:00
Artem Pavlenko
80566ea1ba added accesor to styles 2007-08-07 12:02:24 +00:00
Artem Pavlenko
a53fbf2ca3 applied patch that makes sure names of vertical roads are
rendered in a consistent direction (from Cameron Patrick)
2007-08-01 10:57:27 +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
8eac22911a applied mapnik_line_displacement patch from Cameron Patrick 2007-07-26 21:09:40 +00:00
Artem Pavlenko
7c8a9f3075 added support for min_distance in shield/text symbolizer 2007-07-25 14:36:08 +00:00
vspader
9fe4a94c98 Added minimum_distance property to text symbolizers. This prevents the same label from appearing within N pixels (across features).
Shield symbolizer is now a subclass of text symbolizer.
Some small improvements to text rendering.
Fixed up placement finder for horizontal placement.
Cleaned up placement finder.
2007-07-02 13:39:08 +00:00
vspader
560de0b9b1 Fix so labels stay within the road. 2007-06-21 15:29:47 +00:00
Artem Pavlenko
f3ae318ca3 1. added 'allow_overlap' in load_map from xml
2. added overlap_ field to TextSymbolizer (ignored by renderer at the moment)
2007-06-20 21:08: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
15e73b98f4 small formatting 2007-06-05 09:10:40 +00:00
Artem Pavlenko
d3d40234c9 share collision detector between labels and text. 2007-05-12 11:34:55 +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
cacea81bce 1. check if plug-ins path is a directory
2. wrap dynamic loading into try/catch to play nicer on win32
2007-04-25 08:59:57 +00:00
Artem Pavlenko
5daa49ff41 forward declare ltdl stuff 2007-03-22 10:55:43 +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
4cc771546d small cleanup 2007-02-25 10:54:36 +00:00
Artem Pavlenko
2d256166b4 Store text attributes as USC-2 encoded std::wstring 2007-02-14 19:54:39 +00:00
Artem Pavlenko
d024c86b1b Restored support for the text displacement (point placement only at moment) 2007-02-09 16:32:44 +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
085f832a77 in query_point method expect (x,y) in Map coordinate system 2007-01-16 15:18:25 +00:00
Artem Pavlenko
199f3f6c12 include Layer instead of forward declaration 2007-01-11 17:19:51 +00:00
Artem Pavlenko
85f4bfc697 added queryable property and visible method to Layer (Python) 2007-01-09 11:23:19 +00:00
Artem Pavlenko
bb035bdc54 don't project query point if host projection is geographic 2006-12-31 11:42:57 +00:00
Artem Pavlenko
4772a16eb6 boost/filesystem.hpp is not in boost 1.33.1
reverted to <boost/filesystem/operations.hpp>
2006-12-30 21:48:15 +00:00
Artem Pavlenko
37ebe481c9 1. is_regular is not supported in boost 1.33.*
2. cleanups
2006-12-21 22:51:53 +00:00
Artem Pavlenko
b5cf9da686 1.added more accessors
2.in tiff_reader check for valid file prior opening.
2006-12-20 00:22:45 +00:00
Artem Pavlenko
77854e7d76 use PNG_MMX_CODE_SUPPORTED instead of PNG_ASSEMBLER_CODE_SUPPORTED (mmx.patch from Dominic Hargreaves) 2006-12-18 10:27:09 +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
c7c4659e30 check if featureset is valid before passing to filter_featureset 2006-12-07 15:02:08 +00:00
Artem Pavlenko
05424a5f12 added query_point method that accepts lat,lon coordinates :
>>> for f in m.query_point([ layer.name for layer in m.layers ].index('world'),51,0):
...     print f
...

feature (
  f_code:FA001
  fac_id:193
  id:3147
  na2:UK
  na3:E
  nam:ENGLAND
  tile_id:10
)

>>>
2006-12-06 21:21:17 +00:00
Artem Pavlenko
af44541598 implemented query_map_point method on map object:
fs = m.query_map_point(x,y)  # Map (screen) coordinates
   for feature in fs:
       print feature

TODO: provide interface to feature in Python, at the moment only __str__ implemented which dumps attributes
2006-12-06 20:26:59 +00:00
Artem Pavlenko
dcfe5d3fad oops, fixed 2006-12-05 13:15:43 +00:00
Artem Pavlenko
00fd2a9f00 1. placement_finder.cpp
fixed 'for' loops to work correctly when geom->num_points() < 2
    always use prefix increment even for built-in types (good practice!)
    e.g ++i 

2. agg_renderer.cpp 
    check for number points in geometries when 
    applying text/shield_symbolizer.
2006-12-05 00:16:05 +00:00
Artem Pavlenko
a688c06035 added support for PolygonPatternSymbolizer 2006-12-04 11:36:39 +00:00
Artem Pavlenko
bbab2d90bf fixed png reader bug :
fill alpha channel with 0xff on expansion
2006-12-01 15:23:19 +00:00
Artem Pavlenko
c6ee7ce438 trim strings at data source level 2006-12-01 10:37:15 +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
8c374a22a6 Label position tolerance and text spacing patch from David Leaver. Thanks! 2006-11-29 10:44:42 +00:00
Artem Pavlenko
6b88293808 use 2*M_PI for max_char_angle_delta normalizing. 2006-11-28 22:24:24 +00:00
Artem Pavlenko
7ee890bc12 define M_PI if undef 2006-11-28 10:38:56 +00:00
Artem Pavlenko
6fd7d3e488 use libpng native alloc/dealloc
(/valgrind-new-delete2.patch from Jon Burgess)
2006-11-28 00:13: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
vspader
a6994cfc45 Fixed up text placement.
Removed the patch for better cornering from r365,
since it wasn't working properly.
2006-11-22 22:09:11 +00:00
Artem Pavlenko
1c5eeb19af added basic support for unicode string 2006-11-22 22:01:37 +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
004f720fbd commented out usage of rasterizer_outline_aa for strokes <= 1.0 2006-11-18 16:47:29 +00:00
vspader
d7b94f5d8c Added avoid_edges property to shield and text symbolizers.
If this is enabled, no shield/text symbolizers will be cut off
at the edges of the image.
2006-11-17 14:07:41 +00:00
Artem Pavlenko
81fbe706a6 fixed scale_denomitator 2006-11-17 02:01:21 +00:00
Artem Pavlenko
bf297ec3ca 1.upgrade to latest agg2.4
2.added default PointSymbolizer in load_map.cpp
2006-11-09 23:44:34 +00:00
Artem Pavlenko
e7bab0b8c8 1. fixed vertical alignement (??)
2. initialize overlap_ in ctor
2006-11-08 20:58:40 +00:00
Artem Pavlenko
889ac41694 Patch from Toby: adds a maximum angle delta for text placement (if the
angle changes too much between characters it finds an alternate
placement), this is specified in the max_char_angle_delta property in
radians (feel free to change it to degrees).

It also improves the text placement around corners trying to minimise
the distance between the center of the character and the line on each
side. This is the major portion of the patch.
2006-11-04 10:38:24 +00:00
Artem Pavlenko
e924b597f4 1. patch from Toby that allows repeated labels to be placed on a line
geometry (such as roads)
2. restored text labels for point geometry.
3. process 'spacing' attribute in load_map.cpp
2006-11-01 23:17:05 +00:00
Artem Pavlenko
d7fcefc848 1. applied text-wrap patch from Robert Coup. Thanks!
2. by default use tinyxml as a property_tree parser
3. modified load_map.cpp to allow to test new features
2006-10-27 17:29:39 +00:00
Artem Pavlenko
c091289ffa added extra check to compile on x86_64 Gentoo.
&& defined(PNG_ASSEMBLER_CODE_SUPPORTED)

Thanks to Vincent Schut!
2006-10-26 20:23:12 +00:00
Artem Pavlenko
62a0fb5f89 support for ShieldSymbolizer and LinePatternSymbolizer tags 2006-10-26 20:20:41 +00:00
Artem Pavlenko
a3817cc362 added missing projection transformation for label placement.
TODO: move to geometry class to always return transformed label position
2006-10-21 12:16:19 +00:00
vspader
118e8f0d52 Added face_name parameter to text and shield symbolizers,
which specifies the font face to be used for rendering.
New constructor is: text_symbolizer(name, face_name, size, ...)
2006-10-19 17:11:45 +00:00
Artem Pavlenko
7cae55f73f * trim leading and trailing whitespace from all strings before
rendering them as labels when using the text or shield symbolisers
  (blame my horrible datasets)
* correctly recognise the Postgis "text" data type (it was in
  postgisfs.cpp just not postgis.cpp) - my initial workaround to the
  above was "SELECT trim(from label) AS label ..." which failed
  miserably because it returned a text data type. 

Thanks to Robert Coup for the patch!
2006-10-19 09:24:26 +00:00
Artem Pavlenko
69bde0b206 added scale_denominator calc + great-circle distance
(needs checking with different projections)
2006-10-18 22:44:37 +00:00
Artem Pavlenko
110016fe78 1. refactored proj stuff into separate files
2. added is_geographic property
3. added basic support for text_symbolizer in load_map
2006-10-17 17:26:35 +00:00
vspader
f76079f15b 1) Added line following labels. Use set_label_placement(POINT_PLACEMENT) or set_label_placement(LINE_PLACEMENT) on a text symbolizer.
2) Added placement_finder class so labels try to avoid each other.
3) Added Shield Symbolizer which is essentially a combined image/text symbolizer.
2006-10-17 14:12:53 +00:00
Artem Pavlenko
bb235fa316 1.added projection transformation support based on proj4 (new dependency!!!)
Map and Layer objects both have a new parameter 'srs', initialized to "+proj=latlong +datum=WGS84" by default. 
    
  Basic usage (Python):
    p = Projection("+proj=merc +datum=WGS84")
    point = p.forward(Coord(-2,51))
    ...        
2.reflected arithmetic operators for Envelope/Coord into Python
3.altered return policies for python objects
4.modified build system to require proj4 lib and headers
2006-10-16 13:44:52 +00:00
Artem Pavlenko
1988181bd7 added operators +,-,*,/ 2006-10-16 13:31:52 +00:00
Artem Pavlenko
72e296945f added <ElseFilter/> tag support in map loader. 2006-10-09 20:49:56 +00:00
Artem Pavlenko
9cc2237290 in remove_all clear all styles as well! 2006-10-09 10:29:57 +00:00
Artem Pavlenko
e2d645ad80 simplified coord transformation interface. 2006-10-09 09:52:15 +00:00
Artem Pavlenko
b2ce94166b added remove_all 2006-10-09 09:43:09 +00:00
Artem Pavlenko
c8042c959f removed boost::foreach.hpp 2006-10-04 18:54:27 +00:00
Artem Pavlenko
a71c36ec2e BOOST_FOREACH is not released yet, revert to std::const_iterator 2006-10-04 13:57:08 +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
c1cce2742f added missing header 2006-10-03 10:04:28 +00:00
Artem Pavlenko
0c32c2bf4a update build system to include map_{load,save} 2006-10-03 10:03:31 +00:00
Artem Pavlenko
8328424af5 1. datasource is now a property of Layer object.
2. modified python/c++ demos to reflect the above.
3. removed large 'blobby' mapnik.hpp (compilation times!!!)
2006-10-03 08:44:04 +00:00
Artem Pavlenko
88892c196b added save/load functionality based on boost::property_tree (aka ElementTree in c++) 2006-10-03 08:39:43 +00:00
Artem Pavlenko
c0fa1a6004 * create_filter moved to core lib
* modified demo/c++/rundemo.cpp to reflect the above
2006-09-17 19:45:01 +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
26a406706e wrap C headers with :
extern "C" 
{
 // 
}
2006-08-31 21:32:07 +00:00
Artem Pavlenko
4ae66cef36 small cleanup 2006-08-23 20:34:24 +00:00
Artem Pavlenko
72fae1daa1 1. removed dependency on boost_serialization ( we don't really need it) at this time.
2. coord and envelope operator<< to use 16 digit precision.
3. added 'inside polygon' method impl.
2006-08-20 18:49:22 +00:00
Artem Pavlenko
0bb121a747 formatting mostly 2006-07-24 20:08:32 +00:00
Artem Pavlenko
1cacabdc2b corrected operator= 2006-05-30 21:59:47 +00:00
Artem Pavlenko
ffe47e4816 1. return shared_ptr from point_symbolizer
2. small cleanup
2006-05-26 13:11:31 +00:00
Artem Pavlenko
10b7debd72 oops..layer.cpp got broken by mistake, reverting back. 2006-05-24 22:15:04 +00:00
Artem Pavlenko
b73ca350fb added const Style iterators to Map 2006-05-23 17:23:20 +00:00
Artem Pavlenko
d0ddc88253 1. move parameters to datasource
2. general cleanup
2006-05-23 16:52:10 +00:00
Jean-Francois Doyon
799d5d9691 - Fix a bug with missing version.
- Add support for layer title and asbtract to c++ and python
- Make WMS server use above changes, edit docs
2006-05-22 17:00:35 +00:00
Artem Pavlenko
ef5931d915 added default point_symbolizer 4x4px black square 2006-05-22 10:30:55 +00:00
Artem Pavlenko
f59a949464 replaced tabs with spaces 2006-05-19 16:09:32 +00:00
Artem Pavlenko
d3a8570a78 added set_name method 2006-05-19 16:07:13 +00:00
Jean-Francois Doyon
4705e9526e Oops, that previous problem was from local modifications, setting everything back to normal.
Sorry!
2006-05-03 23:56:47 +00:00
Jean-Francois Doyon
5775a9be0e Switched from <fstream.h> to <fstream> as per the warning the compiler gave me, and the C++ standard. 2006-05-03 23:46:32 +00:00
Artem Pavlenko
62019e0849 small cleanup 2006-04-22 19:37:59 +00:00
Artem Pavlenko
cdc48edfd6 1. validate image reader
2. open files in binary mode (win32)
2006-04-05 08:27:45 +00:00
Artem Pavlenko
61fd258fd1 changing licence from GPL to LGPL 2006-03-31 10:32:02 +00:00
Artem Pavlenko
ead91700c2 small optimization 2006-03-31 08:55:35 +00:00
Artem Pavlenko
bb606d04f5 added non-const getLayer 2006-03-28 15:39:38 +00:00
Artem Pavlenko
8986108775 added set_datasource method (TODO!!!)
fixed pointz in shapeindex
2006-03-28 08:29:36 +00:00
Artem Pavlenko
fce4076ad5 refactored font engine to export symbols correctly on win32 2006-03-23 11:54:50 +00:00
Artem Pavlenko
ddaa9b5368 removed unused static gamma member 2006-03-22 15:57:12 +00:00
Artem Pavlenko
f69ac02a65 removed unused files 2006-03-22 15:53:38 +00:00
Artem Pavlenko
3848515e6e removed unused files 2006-03-22 15:48:54 +00:00
Artem Pavlenko
e21c3b36f6 removed save and load to text archive functionality to keep x86_64 build happy 2006-03-19 21:59:16 +00:00