Commit graph

358 commits

Author SHA1 Message Date
Dane Springmeyer
6abbfca492 fix default values for vertical_alignment in the TextSymbolizer and ShieldSymbolizer - closes #468 2010-01-07 02:21:07 +00:00
Dane Springmeyer
9750e6cd24 fix memory leak in load_map when using libxml2 by freeing the libxml tree as per http://xmlsoft.org/xmlmem.html - closes #473 - thanks mishok13 for the detailed report and testing 2010-01-01 22:41:43 +00:00
Artem Pavlenko
47dc1e197b + merge mapnik2 to trunk 2009-12-16 20:02:06 +00:00
Dane Springmeyer
5e2e6a76ad apply fixes from David Eastcott originally applied to 0.7 branch 2009-12-13 23:30:36 +00:00
Dane Springmeyer
bd0a1ee08f cherry pick one more changeset from mapnik2 into trunk 2009-12-07 06:43:02 +00:00
Dane Springmeyer
c01d1d0c69 integrate a few changes from mapnik2 branch - making sure to pass strings by const ref + formatting 2009-12-07 04:15:17 +00:00
Dane Springmeyer
fe3ffe6c2d rename map.save_map_string to map.save_map_to_string 2009-12-06 22:33:47 +00:00
Dane Springmeyer
d0b4db9ba3 add support for relative paths for entities when using libxml2 and loading xml from string - thanks dodobas for the initial patch 2009-12-06 22:18:45 +00:00
Dane Springmeyer
0e18aa63cd add feature to Map node to allow for throwing a friendly error if the map styles use features not supported by the installed mapnik version - thanks Ldp for the review - closes #395 2009-12-05 03:58:48 +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
75d67f4b43 only serialize non-default values for layers as well as styles 2009-11-16 00:04:47 +00:00
Dane Springmeyer
b89f468eaf add support for using CDATA with libxml2 parser. New tests for filters work nicely - TODO add datasource tests for CDATA in sql 'table' param 2009-11-11 23:37:57 +00:00
Artem Pavlenko
d2f3e669b0 * correct operator= implementation 2009-11-08 10:35:36 +00:00
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