mapnik-org/mapnik — Issue #399: STRM plugin and raster coloring support
Author: artemp
Created: 2011-10-11 07:53:25+00:00
State: open
Labels: Core_Library

From May 21st [http://lists.berlios.de/pipermail/mapnik-devel/2009-May/000906.html email from Oleg Shaniuk]:

Hi All,

I'm going to share the SRTM plugin for Mapnik which allows to use NASA's srtm data as source and colourize it via style xml, which, though, requires adding some symbolizers to mapnik source.

The plugin still needs a lot of work - it has pretty bad performance, especially for big bboxes, but we thought it would be useful to release it anyway. Hopefully it will be of use for the hill shading features planned for release 0.7

So, we presenting it "as is"

The code originally written by Matt Amos (matt@cloudmade.com). I've made few fixes to it.

Please feel free to ask questions about the code structure or algorithms.

Diff is will be attached to next message, and valid for mapnik trunk revision 1150

New Files:

SRTM plugin
plugins/input/srtm/SConscript
plugins/input/srtm/srtm_datasource.hpp
plugins/input/srtm/srtm_datasource.cpp
plugins/input/srtm/srtm_featureset.hpp
plugins/input/srtm/srtm_featureset.cpp

include/mapnik
include/mapnik/colour_map.hpp
include/mapnik/height_field_symbolizer.hpp

src
src/colour_map.cpp
src/height_field_symbolizer.cpp

Mapnik changes:

include/mapnik/polygon_symbolizer.hpp

- added polygon_value_symbloizer class

Symbolizer for polygons with a colour mapped to one of their properties.

include/mapnik/value.hpp

- added static_visitor for double

include/mapnik/cairo_renderer.hpp
src/cairo_renderer.cpp

- added empty methods for drawing polygon_value_symbloizer and height_field_symbolizer

include/mapnik/agg_renderer.hpp
src/agg_renderer.cpp

- added methods for drawing polygon_value_symbloizer and height_field_symbolizer

include/mapnik/rule.hpp

- rules for polygon_value_symbloizer and height_field_symbolizer

src/load_map.cpp

- added methods to parse values for new symbolizers

src/save_map.cpp

- added empty methods to parse values for new symbolizers

src/SConscript
- added targets: height_field_symbolizer.cpp and colour_map.cpp

SConstruct
- added srtm building by default
- added libzzip dependency ( for srtm plugin )