Commit graph

3520 commits

Author SHA1 Message Date
Matt Amos
79f29f3894 Disable missing geometry functions in older Boost versions.
The functions `is_valid` and `is_simple` and their associated
headers are only present in versions of Boost >= 1.56, and will
cause compilation errors with previous versions of Boost. This
masks them with preprocessor macros to allow the compilation to
complete, at the cost of some (currently not widely used)
functionality.
2015-04-23 03:52:46 +01:00
Dane Springmeyer
2c35a0f8a1 Merge pull request #2739 from mapnik/mapnik-geometry
New geometry storage and API
2015-04-22 15:35:07 +02:00
artemp
3366e804c9 hit_test - cache x,y for MOVE_TO and use on CLOSE_PATH command 2015-04-22 15:30:59 +02:00
artemp
86cc903835 point_symbolizer - revive interior point placement 2015-04-22 15:01:52 +02:00
Dane Springmeyer
124362d2d4 stop correcting geometries at decode time
- the original motivation for this was to avoid needing to
   mutate a copy later on (for operations needing correct winding order)
 - but mutating a copy is looking feasible, so removing this now.
2015-04-22 14:27:43 +02:00
artemp
1f83eaa6ac geometry_adapters - make generic 2015-04-22 12:22:52 +02:00
artemp
2768aa6a4a Merge branch 'mapnik-geometry' into mapnik-geometry-template 2015-04-22 12:13:29 +02:00
Blake Thompson
d7f7bc18c1 A large set of changes that help allow WKT for int64_t type geometeries, modified some strategies, made it so that the clipper would use mapnik geometries. 2015-04-21 09:34:52 -05:00
Blake Thompson
edda6cb13f Updated several sections of code, noteably added strategy_group_first as another way to perform transforms with groups, added tests similar to uses of vector tiles in geometry_strategy_test.cpp 2015-04-17 15:49:23 -05:00
Blake Thompson
8ad5648c10 Working version of strategy grouping 2015-04-17 11:15:45 -05:00
Blake Thompson
75ccfdf934 A venture into variadic templates for strategies and transforms. 2015-04-16 23:37:20 -05:00
Blake Thompson
a19da799e0 Slight fixes after merge 2015-04-15 16:05:56 -05:00
Blake Thompson
7a50bb5214 Merge branch 'mapnik-geometry' into mapnik-geometry-template 2015-04-15 15:16:47 -05:00
Dane Springmeyer
cdb9a2ead4 add debug symbolizer mode for visualizing exterior and interior rings and their winding order 2015-04-14 02:44:14 +02:00
Dane Springmeyer
1dc77443ab add vertex_adapter to work per polygon ring 2015-04-13 18:48:45 +02:00
artemp
87e978a6b9 prefer c++11 alias type declaration over typedef for consistency 2015-04-13 15:03:19 +02:00
artemp
41aa591878 Merge branch 'master' into mapnik-geometry 2015-04-13 12:47:41 +02:00
artemp
4f3c8663a3 visual tests : fix marker-on-hex-grid 2015-04-13 11:38:38 +02:00
artemp
c1bc8ffc64 simlified_converter - use start (move_to) x,y on close_path command (drops tiny islands) 2015-04-13 11:17:17 +02:00
Blake Thompson
f98fd0da7c Added tests for non standard projections, forcing use of proj4. 2015-04-10 14:05:58 -05:00
Blake Thompson
2392c7eb12 Added geometry_reprojection_impl 2015-04-10 10:55:30 -05:00
artemp
33661c818d Merge branch 'mapnik-geometry' into mapnik-geometry-template
Conflicts:
	benchmark/test_polygon_clipping.cpp
	include/mapnik/geometry.hpp
	include/mapnik/geometry_adapters.hpp
	include/mapnik/marker_helpers.hpp
2015-04-10 14:52:40 +02:00
artemp
90b6fee2ac don't return from void function 2015-04-10 14:15:12 +02:00
Blake Thompson
87fb41907a Added template to geometries 2015-04-09 15:22:51 -05:00
artemp
fb61a2bb90 ref #2755 test if centroid is within bounding box 2015-04-09 12:40:06 +02:00
artemp
3f1aa7b4b4 geometry : allow boost::geoemetry algorithms to work directly with box2d<double>, removing bounding_box 2015-04-09 12:33:31 +02:00
artemp
2581e48087 vertex_converters - attempt to improve size and compilation times 2015-04-09 10:55:09 +02:00
artemp
938709955e support all geomtry types 2015-04-08 18:48:41 +02:00
artemp
24dbaf5217 add geometry_to_path implementation 2015-04-08 18:48:41 +02:00
artemp
bfae2a8df6 cleanup 2015-04-08 18:48:41 +02:00
Blake Thompson
c5d5a1f22e Added several unit tests around reprojection. 2015-04-07 17:20:29 -05:00
Blake Thompson
0fec41a87e Updated reprojection code 2015-04-07 11:55:45 -05:00
artemp
6afc4531ec add value_type alias 2015-04-07 15:39:47 +02:00
artemp
10a07bc142 generic geometry transform algorithm 2015-04-07 15:38:00 +02:00
Blake Thompson
6be658f5b5 Moved geometry envelope to an impl 2015-04-06 11:00:03 -05:00
Dane Springmeyer
159997fe25 avoid -Wsign-compare warning 2015-04-05 08:56:06 -04:00
Dane Springmeyer
c4273ffed6 be explicit about where value_converter is 2015-04-05 03:10:53 -04:00
Dane Springmeyer
bc77157c57 re-expose geometry_empty test / fix compile 2015-04-04 13:24:00 -04:00
Dane Springmeyer
d4ce36a41e remove unneeded headered detected by iwyu 2015-04-04 13:21:33 -04:00
Dane Springmeyer
bd673c0dbe more iwyu 2015-04-04 13:21:09 -04:00
Dane Springmeyer
ae50ce7321 add headers detected as needed by include-what-you-use 2015-04-04 13:20:40 -04:00
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