Commit graph

1144 commits

Author SHA1 Message Date
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
Artem Pavlenko
673bd4bc19 replaced cout and cerr with clog (by default redirected to cerr) 2006-03-19 21:53:47 +00:00
Artem Pavlenko
e8d68b615e removed unused text.{hpp,cpp} 2006-03-19 21:51:40 +00:00
Artem Pavlenko
89cad86d8e added anchor and displacement to text_symbolizer 2006-03-10 12:08:55 +00:00
Artem Pavlenko
cba1063346 fixed label bbox calc 2006-03-08 23:03:19 +00:00
Artem Pavlenko
0f3fcc7f34 updated text symboilizer
fixed memory leak in FT_Glyph
2006-03-01 15:16:45 +00:00
Artem Pavlenko
3818da6bc5 added quad_tree implementaion 2006-02-27 21:25:25 +00:00
Jean-Francois Doyon
34dc842d2d Reworked all the svn:ignore properties. They are all set explicitely now, and nothing should be left unacounted for.
Changed SConstruct to use freetype-config.  Updated INSTALL to reflect.

Added a RAM requirement for building in the INSTALL doc.

Fixed some python styling and added some basic docstrings.
2006-02-26 21:47:35 +00:00
Artem Pavlenko
9de253198b 1.python bindings updated to reflect symbolizers changes
2.added label collision detector ( TODO - proper impl!)
2006-02-25 11:03:30 +00:00
Artem Pavlenko
1728bdbc7e added:
1. start/end map/layer handlers 
2. some cleanups
2006-02-21 20:17:08 +00:00
Artem Pavlenko
bd173527a0 added font_engine impl - work in progress:) 2006-02-21 19:55:24 +00:00
Artem Pavlenko
9f8460fb0b changed headers order to keep boost::serialization (1_33_0) happy! (trunk) 2006-02-13 20:28:21 +00:00
Artem Pavlenko
e3c1365043 some line rendering fixes and optimizations 2006-02-11 00:39:50 +00:00
Artem Pavlenko
aed5516197 1. new feature model - based on boost::property_map concept
f = feature(id);
       f["name"] = "what is my name?";
       boost.put(f,"area",123123.4325);
       
2. simplified and corrected value class and operators
3. updated input plug-ins to work with new features
4. add text_symbolizer (getting there:)
5. template version of agg_renderer 
6. attribute_collector how accepts rules 
	(to collect attribute names for text labels)
2006-02-10 17:13:02 +00:00
Artem Pavlenko
6a4070a32a added raster_symbolizer 2006-02-07 16:16:54 +00:00
Artem Pavlenko
af2601eea0 1. new style/feature processor abstraction allowing plugable backends.
(to construct custom 'Output' derive from feature_style_processor (CRTP) e.g
	class MyOutput : public feature_style_processor<MyOutput>
     and implement:
	 process(***_symbolizer const&, Feature const&)
     methods
   At the moment only AGG renderer is implemented
2006-02-07 14:41:41 +00:00
Artem Pavlenko
2a858bcd19 1.removed named_style_cache
2.styles moved to Map object
2006-02-05 09:45:51 +00:00
Artem Pavlenko
d8dc53bcf4 new build system 2006-01-31 23:09:52 +00:00
Artem Pavlenko
c97fb0bf57 added check for num_points in line/polygon symbolizers:
1. don't bother with line_symbolizer unless at least 2 points
2. at least 3 points for polygon_symbolizer
2006-01-31 17:35:18 +00:00
Artem Pavlenko
6b7d874ff3 1.corrected set_rectangle and set_rectangle_alpha to use envelope intersection for proper clipping
2. clean up render.cpp
2006-01-28 16:05:51 +00:00
Artem Pavlenko
0875208c5b some minor changes (+fast line rendering needs fixing clipping) 2006-01-26 16:46:56 +00:00
Artem Pavlenko
db433452b6 switched on optimization in png writing code 2006-01-26 16:44:46 +00:00
Artem Pavlenko
b89195f9e6 added label_position method for geometry objects (todo line_string) 2006-01-26 16:43:10 +00:00
Artem Pavlenko
a6f96ea5c1 changed symbolizer interface to accept 'feature' and CoordTransform, instead of
geometry (feature centric OGC model:).
2006-01-23 22:33:37 +00:00
Artem Pavlenko
245be985e2 1.symbolizers refactored - split into hpp/cpp
(all AGG is private to libmapnik and not exposed to client code) 
2.removed unused files (more todo)
3.added line pattern symbolizer to python bindings
2006-01-23 13:24:41 +00:00
Artem Pavlenko
390b9c4655 1.added line pattern symbolizer
2.added layer envelope check in main rendering loop
2006-01-23 10:33:32 +00:00
Artem Pavlenko
119c352fe7 added alpha blending for image copying 2006-01-01 17:41:55 +00:00
Artem Pavlenko
955ff4c4f5 1. fixed shape datasource bug - attributes were ignored for point/pointz/pointm types
2. use boost::thread for mutex/lock 
3  use boost::noncopyable
4  build agg as a shared lib for now
5. corrected panning code in map.cpp
6. improved coord_transform
2005-12-23 12:31:54 +00:00
Artem Pavlenko
ec9b301364 removed unused headers 2005-12-16 16:08:41 +00:00
Artem Pavlenko
3814396eea removed erroneous break statement (was added to render OS MasterMap) 2005-12-14 20:33:14 +00:00
Artem Pavlenko
6f9528c2e3 1.added serialization support
2.some class names changes
2005-12-14 17:01:09 +00:00
Artem Pavlenko
a6191fade0 1. corrected LIBS in SConsctipt files
2. use boost::shared_ptr instead of ref_ptr
2005-12-12 13:15:33 +00:00
Artem Pavlenko
2d08614042 return object in envelope() 2005-12-01 10:06:40 +00:00
Artem Pavlenko
aaba4d08cf check datasource in envelope method 2005-11-30 00:24:08 +00:00
Artem Pavlenko
7f4df91371 check for valid datasource in the main loop 2005-11-30 00:21:07 +00:00
Artem Pavlenko
01f9df9b43 added feature factory 2005-11-24 15:51:29 +00:00
Artem Pavlenko
70f79a3e19 fixed path portability issue 2005-09-09 09:38:37 +00:00
Artem Pavlenko
e9fff475be try to dlopen any file in datasources dir 2005-09-08 13:52:42 +00:00
Artem Pavlenko
f5dda2f207 1. more pythonic feel:)
2. added CSS color string  parser and  color factory
3. added docs dir
2005-09-08 13:20:37 +00:00
Artem Pavlenko
820b6bb23a return ref_ptr<Feature> from datasource next() method
should play better with python
2005-09-08 13:09:04 +00:00
Artem Pavlenko
03467ac96e removed unused color.cpp 2005-09-08 13:05:39 +00:00
Artem Pavlenko
c946127bba removed unused color.cpp 2005-09-08 13:04:36 +00:00
Artem Pavlenko
b20007b440 gcc4.0.1 doesn't like volatile locals? 2005-08-31 19:30:54 +00:00
Artem Pavlenko
c7f9d1e568 1.polygon_symbolizer + using agg rasterrizer
2.render.cpp - exit rules loop (mastermap styles-?? not sure)
3.pre-allocate space for attributes
2005-06-24 08:39:47 +00:00
Artem Pavlenko
32c76d5a5f 1.added copyright notice to SConstruct/SConscript files
2.fixed include/libs in datasources
3.revived shapeindex utility (+ boost::program_options)
2005-06-17 12:40:51 +00:00
Artem Pavlenko
a8ec856a15 initial import 2005-06-14 15:06:59 +00:00