Commit graph

3529 commits

Author SHA1 Message Date
Dane Springmeyer
633668f1d2 no need for iostream in geometry_envelope 2015-04-04 13:20:11 -04:00
Dane Springmeyer
9bd171bcd1 geometry_is_empty should only accept const& 2015-04-04 13:19:55 -04:00
Blake Thompson
19eaf4cfff Fix for geometry envelope with geometry collections and added tests. 2015-04-03 18:56:57 -05:00
Blake Thompson
fb0ea81606 Modified envelope so that it no longer keeps creating new bboxes, fix in hit filter for rings with too little geometry 2015-04-03 11:24:47 -05:00
Blake Thompson
4091504dac Optimization for when point is found in a hole 2015-04-03 11:24:47 -05:00
Blake Thompson
2460f7ba04 Corrected ray casting check in polygon hit test 2015-04-02 14:27:39 -05:00
Blake Thompson
6f4f7a07be Added a feature to geojson helper method 2015-04-02 09:28:45 -05:00
artemp
63b97e2e52 attempt to fix SEG_CLOSE command handling 2015-04-02 16:12:56 +02:00
Blake Thompson
5ca850a17e Added proper use of auto in several for loops 2015-04-01 17:55:36 -05:00
Blake Thompson
78835c9d87 Initial commit for new method to provide geometry reprojection 2015-04-01 16:18:05 -05:00
Dane Springmeyer
928ebad6b9 Avoid inf recursion in geometry::is_empty 2015-03-31 12:29:14 -07:00
Dane Springmeyer
f96744c0e2 split out to_wkt and from_wkt as was previously done 2015-03-31 09:15:23 -07:00
artemp
3c2430150d add 'is_clockwise' as generic function
shape_io -- rely on RVO optimisation (remove an extra std::move)
2015-03-31 13:43:37 +02:00
artemp
7775089a24 make is_simple and is_valid work typed geometries directly 2015-03-31 13:43:37 +02:00
Jiri Drbalek
9862ac66bf fix compile json grammar with boost 1.49 2015-03-31 10:29:33 +00:00
Dane Springmeyer
7cbabd9b46 workaround boost bug on osx - refs #2747 2015-03-30 13:34:46 -07:00
artemp
8735311f83 radial distance - set x=y=0 on SEG_CLOSE command 2015-03-30 12:40:28 +02:00
artemp
6a6af26566 handle SEG_CLOSE in visvalingam_whyatt and douglas_peucker 2015-03-29 19:11:07 +02:00
artemp
3593f3c52c attempt to fix zhao simplification to handle zZ (SEG_CLOSE) command correctly 2015-03-29 18:49:09 +02:00
artemp
919d41aeb6 remove unused member variable 2015-03-29 13:55:46 +02:00
Dane Springmeyer
d5f98ba07c avoid duplicated line_to - matches 6a827f50, rolls back a2185bb9d8 2015-03-28 23:55:20 -07:00
Dane Springmeyer
a2185bb9d8 add vertex_adapter.cpp tests
- focus is on behavior of polygons (including with holes)
 - reverts 6a827f501 because it seems incorrect to me and without it the vertex_adapter.cpp tests pass
 - @artemp if you see something I don't please restore 6a827f501, but updated the vertex_adapter.cpp tests
   to show what the expected behavior should be
2015-03-27 23:16:49 -07:00
artemp
51b65534f5 geojson bounding box grammar - don't require "type": "Feature" to appear in particular order (ref #2745) 2015-03-27 10:36:04 +01:00
artemp
64312a8dc1 geojson bounding box grammar - don't require "type": "Feature" to appear in particular order 2015-03-27 10:32:52 +01:00
artemp
6aae88f90f only apply unique to line_string and polygon 2015-03-26 18:41:15 +01:00
artemp
75699eb5b4 remove duplicate include 2015-03-26 18:33:17 +01:00
artemp
b025071b28 add geometry_unique algo (removes coincident points) 2015-03-26 18:32:09 +01:00
artemp
b0587a01c0 correct line_string/multi_line_string 2015-03-26 18:13:44 +01:00
artemp
a2933f9cb1 fix includes 2015-03-26 17:31:19 +01:00
artemp
330bc5686c avoid relying on x and y in SEG_CLOSE command - instead cache MOVE_TO's coordinates 2015-03-26 17:30:00 +01:00
artemp
6a827f5018 don't output last-vertex (== first-vertex) - SEG_CLOSE should be sufficient 2015-03-26 17:27:40 +01:00
artemp
bc913bcc59 fix names 2015-03-26 17:26:39 +01:00
artemp
a05225d8b1 move vertex_adpaters into separate header 2015-03-26 17:20:38 +01:00
artemp
74fb3ddde0 Merge branch 'master' into mapnik-geometry 2015-03-25 16:19:02 +01:00
artemp
06f512f584 markers_helper - add support for geometry collections 2015-03-25 16:15:48 +01:00
artemp
ba423f0955 wkt parser/genrator - handle POINT EMPTY by constructing geometry::geometry_empty 2015-03-25 15:52:12 +01:00
artemp
389d00d442 make geometry methods templated to allow using modified geometry types ( e.g variant<reference_wrapper<T>..>
symbolizer_helper - store geometries in custom varaint using reference_wrapper<T const>
2015-03-25 12:58:50 +01:00
artemp
22de30bb37 update variant (add support for 'unwrapping' std::reference_wrapper<T> and accessing std::reference_wrapper<T>::type through get<T>()) 2015-03-25 10:52:33 +01:00
Dane Springmeyer
834a74b1ed make geometry_correct more flexible but harder to misuse 2015-03-24 18:43:05 -07:00
Dane Springmeyer
93e825d727 delete previous incantation of boost polygon clipper 2015-03-24 16:44:50 -07:00
Dane Springmeyer
852776d5e3 geometry is_empty refactoring 2015-03-24 14:16:58 -07:00
Blake Thompson
3270d42b74 Standardizing on the output of a boolean to string is true or false rather then 0 or 1. 2015-03-24 14:32:25 -05:00
artemp
4389c80d84 and finaly, rename 'new_geometry' namespace to 'geometry' 2015-03-24 14:21:28 +01:00
artemp
7e03d41606 rename geometry_impl.hpp to geometry.hpp 2015-03-24 13:32:05 +01:00
artemp
323fdd5212 rename geometry -> path ( geometry_type -> path_type) 2015-03-24 13:17:07 +01:00
artemp
ac1ffa2bfb move geometry.hpp into path.hpp and update code base to reflect this change 2015-03-24 12:42:09 +01:00
artemp
1cf0a897ac move datasource::geometry_t into separate header and rename -> datasource_geometry_t to avoid cyclic dependencies issue
to_ds_type - return actual datasource_geometry_t (remove optional)
update across datasources
experssions - revert to using
2015-03-24 12:13:31 +01:00
artemp
163da958f4 mapnik-geometry - add 'geometry_empty' type to support unintialised geometries 2015-03-24 10:30:33 +01:00
artemp
446e6be7bd json geometry generator - output "null" for uninitialised geometry 2015-03-23 19:09:31 +01:00
artemp
2420604d8c check if geometry has been initialised before dispathing 2015-03-23 12:17:43 +01:00
artemp
807a940f1e ensure [mapnik::geometry_type] attribute is stored as mapnik::value_integer 2015-03-23 12:16:21 +01:00
artemp
e6905272b7 mapnik::feature_impl - add set_geometry_copy(geometry const&) 2015-03-23 10:43:20 +01:00
Dane Springmeyer
cb6f5a7ca4 add empty method on new_geometry::polygon 2015-03-22 12:14:43 -07:00
Dane Springmeyer
95ca3a02f8 update pgsql2sqlite to new geometry 2015-03-22 12:14:11 -07:00
Dane Springmeyer
1a57aef9c6 implement hit_test for new_geometry 2015-03-22 11:41:44 -07:00
Blake Thompson
63c72789d9 Fixed a segfault from occuring if to_wkb was called with a null geometry 2015-03-20 17:03:49 -05:00
artemp
a7174f181c handle collections 2015-03-20 11:06:04 +01:00
artemp
9352d69987 refactor local pattern alignment calc 2015-03-20 10:43:42 +01:00
artemp
360f920924 Merge branch 'master' into mapnik-geometry 2015-03-20 09:51:59 +01:00
Blake Thompson
be9d2ad53c Removed perhaps unrequired MAPNIK_DECL 2015-03-19 23:11:12 -05:00
Blake Thompson
0f76580f6e Tweaked image view null a little 2015-03-19 22:35:09 -05:00
Blake Thompson
08a3911b0a Added the introduction of an image_view_null, this could possibly fix windows build issues 2015-03-19 21:28:16 -05:00
Blake Thompson
f8010f0ba1 Updated image_view any with < and == operators, removed default constructor from image_view and image_view_any 2015-03-19 14:58:01 -05:00
Blake Thompson
702b91e369 Included image_view headers in impl 2015-03-19 14:39:37 -05:00
Dane Springmeyer
0cb9cec686 remove header gaurd from impl file 2015-03-19 12:14:24 -07:00
Blake Thompson
9fd4ea2829 Possibly fixing windows issues 2015-03-19 14:01:22 -05:00
Blake Thompson
454398985c Implementing < and == operators in image 2015-03-19 13:42:17 -05:00
artemp
8a0b4a6b6e Merge branch 'master' into mapnik-geometry 2015-03-19 19:17:01 +01:00
artemp
ea465b06a9 geojson generator - null geometries 2015-03-19 13:44:34 +01:00
Jiri Drbalek
5c65dadd72 add comment about compatibility 2015-03-19 12:32:30 +01:00
artemp
8de2621b99 datasource : temporary reinstate get_geometry_type() method to increese test coverage and ease migration to mapnik-geometry 2015-03-19 12:09:07 +01:00
artemp
8635c87118 wkt generator - handle 'EMPTY' geometries 2015-03-19 11:00:18 +01:00
Dane Springmeyer
4a831b4936 fix msvs compiler error: C2899: typename cannot be used outside a template declaration 2015-03-19 00:44:59 -07:00
Dane Springmeyer
85b20f45d7 Merge pull request #2682 from mapycz/fix-enum-word-separator
fix enum word separator
2015-03-19 00:22:31 -07:00
artemp
6a8e78ab9c fix group_symbolizer_helper 2015-03-18 13:50:15 +01:00
artemp
c1fca4f539 add vertex_adapter_traits 2015-03-18 13:49:51 +01:00
artemp
1bb06d89fa group_symbolizer - update to mapnik-geometry 2015-03-18 12:10:21 +01:00
artemp
e516583d6c building_symbolizer - update to mapnik-geometry 2015-03-17 15:47:51 +01:00
artemp
beb705acb3 Merge branch 'master' into mapnik-geometry 2015-03-17 09:45:19 +01:00
Blake Thompson
5a49842952 Moved image_null into a header 2015-03-16 12:18:07 -05:00
artemp
8747e0ff19 fix - don't forget to add poly's 2015-03-16 17:27:37 +01:00
artemp
71c9c04e92 Merge branch 'master' into mapnik-geometry 2015-03-16 16:20:46 +01:00
artemp
c528a31684 to_wkb - optimise to multi_point geometries 2015-03-16 16:19:24 +01:00
artemp
5f073ee299 mapnik-geometry based to_wkb() implementation 2015-03-16 16:14:17 +01:00
artemp
58d07338e9 polygon vertex adapter - output SEG_CLOSE for each loop 2015-03-16 12:01:57 +01:00
Blake Thompson
bd94cc6a60 Updated the image_view to add mapnik_decl 2015-03-13 18:21:24 -05:00
Blake Thompson
46ea6a5b1a Added impl for image_view_any and fix to benchmark that was missing include for mapnik/color.hpp 2015-03-13 17:28:22 -05:00
Blake Thompson
c262e51428 Fix for operator= in image 2015-03-13 16:49:28 -05:00
Blake Thompson
29099ece46 Added image_view implementation 2015-03-13 16:34:49 -05:00
artemp
12613b59d4 fix typo 2015-03-13 17:12:23 +01:00
Blake Thompson
bf61a033d3 Intial commit for impl 2015-03-13 10:52:39 -05:00
artemp
924536e0f2 formatting 2015-03-13 14:29:05 +01:00
artemp
0b90fe7209 avoid unnecessary copying 2015-03-13 13:40:29 +01:00
artemp
58b36badd9 minor formatting 2015-03-13 13:23:36 +01:00
artemp
abd10cab0c add support for all geometry types 2015-03-13 13:23:07 +01:00
artemp
f54eb68063 return geometry_type(geom) 2015-03-13 13:22:32 +01:00
artemp
6ef63aa7a5 memory_feature - update to use mapnik-geometry 2015-03-13 11:05:56 +01:00
artemp
914b8dbd76 Merge branch 'master' into mapnik-geometry 2015-03-12 15:14:45 +01:00
Artem Pavlenko
9117e7d9ff Merge pull request #2621 from mapycz/markers-upright
marker direction
2015-03-12 14:58:16 +01:00
artemp
50ca6fcbe8 Merge branch 'master' into mapnik-geometry 2015-03-12 14:55:45 +01:00
artemp
b823d6dc34 geojson - fix brackets blues 2015-03-12 14:53:47 +01:00
artemp
48ce3ccc38 wkt generator fix erroneous brackets 2015-03-12 14:43:19 +01:00
artemp
6d13454f72 reinstate 'from_wkt' interface 2015-03-12 14:12:53 +01:00
artemp
c4607aaeeb wkt-generator - update to mapnik-geometry model 2015-03-12 14:12:14 +01:00
artemp
2753db1c4c factor out boost::spirit::traits::transform_attribute into separate header 2015-03-12 14:11:52 +01:00
artemp
da45acb047 wkt parser grammar - allow MULTIPOINT(x0 y0, x1 y1,....,xN yN) as well
as MULTIPOINT((x0 y0), (x1 y1),....,(xN yN)) syntax
2015-03-12 11:58:09 +01:00
artemp
f72291650b fix line_string tag typo 2015-03-11 15:20:24 +01:00
artemp
26fdd0b680 python bindings - restore from_wkt method 2015-03-11 12:28:04 +01:00
artemp
525cb60f0c fix compilation (add required headers and typedef) 2015-03-11 12:23:27 +01:00
artemp
f3edf2dfc0 wkt_grammar - update to use mapnik-geometry and optimise(minimise) memory allocations 2015-03-11 11:55:43 +01:00
Blake Thompson
fe01d52845 Removed unused resolution data from grids 2015-03-10 23:19:30 -05:00
Blake Thompson
f715f9cf22 Updated the name of methods in grids from properties to fields because they are an array rather then a map. 2015-03-10 19:59:46 -05:00
artemp
c3284aa958 Merge branch 'master' into mapnik-geometry 2015-03-10 11:17:53 +01:00
Blake Thompson
7ee9745a8f Updated param to allow value_boolean 2015-03-09 16:33:20 -05:00
artemp
a89dd47a4b Merge branch 'master' into mapnik-geometry 2015-03-09 18:48:58 +01:00
artemp
0863ef1e92 vertex_processor - handle geometry_collection 2015-03-09 18:47:34 +01:00
Blake Thompson
e20c68d384 Corrected a bug in hsl2rgb where if s was equal to zero an incorrect result was achieved. 2015-03-09 12:07:39 -05:00
artemp
40c9abcb2b calc centroid 2015-03-09 17:00:00 +01:00
artemp
f919bd2c41 fix applying clip flag 2015-03-09 16:58:32 +01:00
artemp
cc3f8be837 remove unused headers 2015-03-09 16:37:26 +01:00
artemp
317e9c497f Merge branch 'master' into mapnik-geometry 2015-03-09 14:59:45 +01:00
Blake Thompson
ffad24f31d Added bugfix for image_view where if an image of zero width or height created a view, it would cause a segfault because it created a 1,1 size view. 2015-03-08 23:28:56 -05:00
Blake Thompson
61abe608ee Added the ability to get_type from an image, fixed possible bugs associated with image copy. 2015-03-06 17:24:23 -06:00
artemp
174bc5969a text symbolizer update to mapnik-geometry (partial) 2015-03-06 12:17:02 +01:00
Blake Thompson
ea6677df37 A fix to the jpeg driver making it operate with parameters like the other file formats. 2015-03-05 21:51:48 -06:00
artemp
8411cdfa0c add centroid 2015-03-05 22:30:38 +01:00
artemp
d682c5a201 markers placement update 2015-03-05 20:54:36 +01:00
artemp
aa5ae6b843 update markers_symbolizer to work with mapnik-geometry (work-in-progress) 2015-03-05 15:07:23 +01:00
artemp
38dc240d6d geometry - add generic is_valid(), is_simple() and correct() 2015-03-05 12:11:23 +01:00
artemp
d25ef607a2 cleanup 2015-03-05 12:09:16 +01:00
artemp
13a5bdf984 minor formatting 2015-03-05 12:08:21 +01:00
artemp
ee77a0ef10 correct arg type 2015-03-05 10:45:12 +01:00
artemp
24a586415c expose wkbByteOrder in wkb.hpp 2015-03-05 10:44:40 +01:00
artemp
b66739cf86 move fusion adapted geometry into separate header to avoid duplication 2015-03-05 10:43:03 +01:00
artemp
87e9c64fc4 topojson grammar - add optional bbox element which is omitted 2015-03-04 14:55:13 +01:00
artemp
a6f0c30a74 topojson grammar - add optional bbox element which is omitted 2015-03-04 14:52:55 +01:00
artemp
f4a1e9368b wkb_reader/json input grammar - correct polygons to have CCW exterioir/CW interior 2015-03-04 12:09:08 +01:00
artemp
9e35540b50 fix line_string iterator types
register CCW polygons - CCW exterior and CW interior rings
remove unused code (cleanups)
2015-03-04 12:07:22 +01:00
artemp
3ddfe34aa5 Merge branch 'master' into mapnik-geometry 2015-03-04 10:30:08 +01:00
artemp
587437c368 variant - add get<T> overloads where T is stored as recursive_wrapper<T> and avoid directly dealing with recursive_wrapper<T> 2015-03-04 10:19:30 +01:00
artemp
ec7f2f3f0c feature_generator - adapt to new geometry generator 2015-03-04 09:23:57 +01:00
artemp
920a9549c4 geometry_generator - new copy-less grammar 2015-03-04 09:21:22 +01:00
artemp
bdbaf947f7 default assignment op + cleanups 2015-03-04 09:19:53 +01:00
Dane Springmeyer
4afcac5563 try to solve #2714 2015-02-26 11:12:19 -08:00
artemp
c58a5b4151 json : geometry_generator_grammar for mapnik-geometry (TODO) 2015-02-26 16:24:07 +01:00
artemp
a3b7328936 add 'which' method for compatibility with boost::variant 2015-02-26 16:23:20 +01:00
artemp
da1bc2463d c++11 syntax 2015-02-26 16:22:56 +01:00
artemp
b74976d547 make inline 2015-02-26 16:22:34 +01:00
artemp
102fd539f9 generic way to apply vertex converters to mapnik-geometry 2015-02-24 15:18:46 +01:00
artemp
0d6eb8bcab rename polygon_vertex_adapter_3 -> polygon_vertex_adapter 2015-02-24 14:31:32 +01:00