Commit graph

9353 commits

Author SHA1 Message Date
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
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
a0411b8d4c postgis: make sure to close the attribute collection resultset and print the type name of unknown oid attribute values when in debug 2009-10-14 17:42:27 +00:00
Dane Springmeyer
60ca6a5677 postgis: allow for altering the default behavior of keeping open postgresql connections until the whole process ends - when 'persist_connection' = false new connections will be opened and closed for each datasource instance. (closes #434) 2009-10-14 04:21:46 +00:00
Dane Springmeyer
eee88806b8 remove testing debug line 2009-10-12 05:27:16 +00:00
Dane Springmeyer
27fbc4549d change the method for calculating offsets to pass to GDALRasterIO, as the 'start_x, start_y' implementation added in r1321 was leading to large shifts in 1-banded srtm data without overviews - this new approach works with and without overviews and also with 3 band rbg data. Also added more debug output. 2009-10-12 05:25:36 +00:00
Dane Springmeyer
6d3dcdeac6 add a bit more debug printing to gdal plugin and make raster width and height class attributes 2009-10-12 04:09:36 +00:00
Dane Springmeyer
56f0c33465 format raster plugin to only print output in debug mode 2009-10-12 03:58:11 +00:00
Dane Springmeyer
7785461d1f remove testing debug line from gdal plugin 2009-10-11 16:12:36 +00:00
Dane Springmeyer
e6306010f8 when a SQL query sent to postgres fails, output the whole thing so users know what mapnik tried to send (as the PSQL error hint truncates the sql) 2009-10-02 05:16:15 +00:00
Dane Springmeyer
2a880432d3 fix typo 2009-09-30 19:42:52 +00:00
Dane Springmeyer
ce5bfdaf5b set proper mime type 2009-09-30 19:00:43 +00:00
Dane Springmeyer
9305023369 add unifont from unifoundry.com (for ease of use for OSM styles/fonset), and upgrade dejavu fonts to 2.30 2009-09-30 18:59:05 +00:00
Dane Springmeyer
fdb64c27d8 add dave to committers list for his label work 2009-09-30 18:43:48 +00:00
Dane Springmeyer
ba9376626a add a filter parsing alias of '!=' for '<>' - closes #427 2009-09-29 23:40:40 +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
4367b813a8 cleanup up gdal featureset code, removing old or unneeded debug lines 2009-09-28 16:56:01 +00:00
Dane Springmeyer
a4245a9b4a clear out test_api folder when test python api docs are rebuilt 2009-09-27 17:46:18 +00:00
Dane Springmeyer
baaf45e298 enable fuller PointSymbolizer test now that #114 is closes 2009-09-27 17:45:52 +00:00
Dane Springmeyer
c808cf62b9 add support for gdal overviews to the Gdal Plugin (use http://www.gdal.org/gdaladdo.html to build overviews) - modified patch from gdalcolors branch from Alberto Valverde (I removed dependence on color/masking code until that support lands in trunk) - addresses #54 2009-09-27 17:23:09 +00:00
Dane Springmeyer
fdf7ca3a66 add docstrings to enum's in mapnik_stroke - patch from podolsir 2009-09-27 17:10:26 +00:00
Dane Springmeyer
ad47ad321d avoid namespace pollution by defining __all__ in __init__.py - nice patch from podolsir 2009-09-27 17:07:41 +00:00
Dane Springmeyer
f637ed6cf8 fix typo in rundemo.py found by szotsak - closes #419 2009-09-27 02:55:31 +00:00
Dane Springmeyer
8fd907f8fc remove self argument in python docstring for boost <1.35 compatibility allowing the removal of boost version checking - addresses #29 2009-09-27 01:31:30 +00:00
Dane Springmeyer
10dff4b8cf mapnik_coord_env_projection.patch from podolsir which adds docstrings to mapnik_envelope.cpp, mapnik_coord.cpp, and mapnik_projection.cpp as well as the __init__.py - addresses #29 2009-09-26 17:15:22 +00:00
Dane Springmeyer
78fd5dc89a avoid deprecation warnings with boost 1_40 related to location of property_map.hpp 2009-09-25 22:08:52 +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
a414832338 fix boost version available with docs support 2009-09-25 17:59:57 +00:00
Dane Springmeyer
ef1e210269 improve boost::python docstrings for map, color, and stroke, adding currently unused patch against enumeration from podolsir 2009-09-25 17:50:37 +00:00
Dane Springmeyer
23ab337f5c use the 'arg' class instead of the deprecated 'args' for boost::python docs http://www.boost.org/doc/libs/1_40_0/libs/python/doc/v2/args.html 2009-09-25 17:38:38 +00:00
Dane Springmeyer
016659f22a add missing boost version include to enable new docstrings 2009-09-25 17:16:54 +00:00
Dane Springmeyer
2acf395203 add more python pickling tests 2009-09-25 16:57:03 +00:00
Dane Springmeyer
a50bfa3811 fix typos in docstrings 2009-09-25 04:21:14 +00:00
Dane Springmeyer
c1bebb79e4 add scripts to re-generate and test python api documentation 2009-09-25 03:55:04 +00:00
Dane Springmeyer
ca32939e35 formatting 2009-09-25 03:31:28 +00:00
Dane Springmeyer
6abc56ef08 Add docstrings to mapnik_color.cpp - modified patch from podolsir - thanks - addresses #29 2009-09-25 03:27:29 +00:00
Dane Springmeyer
71de9ab571 scons: don't attempt to print in color when building on win32 and more properly quote strings that are shelled out to python 2009-09-23 18:55:23 +00:00
Jon Burgess
6485039a0e Fix numeric2string to output the correct number of digits following the decimal point. Hopefully this covers all the cases correctly. 2009-09-12 11:31:53 +00:00
Jon Burgess
e8cff82a53 Fix numeric2string() to insert the correct number of 0's when building the string. This problem was reported as: [Mapnik-users] unusual problem with Mapnik output. 2009-09-12 10:49:35 +00:00
Dane Springmeyer
94a257c454 change python syntax of example in install doc, also fixing lacking Envelope import 2009-09-01 02:15:27 +00:00
Dane Springmeyer
9c3594fb30 postgis: add patch exposing srid parameter and when geometry_field also is provided avoid querying geometry_columns. Also fixed problem of missing srid in the bbox substitution. Thanks rcoup for revised patch - closes #376 2009-08-28 15:57:29 +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
72debc046c remove fontset from pickling for now, and properly set wrap_char from string 2009-08-27 23:39:18 +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
c7f85e70f8 postgis: add a hint if the extent parsing fails 2009-08-27 21:24:00 +00:00
Dane Springmeyer
5b9ddbaecd add pickling support for point_symbolizer and expose the filename property (patch from mishok13 - thanks) - closes #114, addresses #345 2009-08-27 21:11:17 +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
Dane Springmeyer
5c184a5075 load_map: improve formatting of error message within layer 2009-08-27 04:48:32 +00:00
Dane Springmeyer
9a0bb92acd Improve handling of BBOX query substitution - closes #415 2009-08-27 03:54:52 +00:00