|
Geometry : |
Subject: [ggl] intersection() and mixed geometries
From: Barend Gehrels (barend.gehrels)
Date: 2010-10-10 16:51:41
Hi Bill,
>
> (...)
> ../../ext/boost-geometry/boost/geometry/algorithms/detail/overlay/assemble.hpp:651: error: 'apply' is not a member of 'boost::geometry::detail::overlay::add_to_containment<boost::geometry::multi_linestring_tag, GeoKit::impl::_GeometryMultiLinestring>'
Intersection of multi_linestrings were/are not supported.
This method from "apply" from some very internal function
("add_to_containment") was somewhat awkward. So I changed the
implementation and it will now give a more proper message (some MPL
message saying that it is not implemented for that geometry type (or
geometry type combination).
In the meantime I also added the intersection for two multi_linestrings,
delivering intersection points. But IIUC you ask for an intersection of
two multi_linestrings and want the intersection linestring pieces back;
that is still not implemented and I don't think it will be in the near
future (say, this year) - the basic stuff is not yet there for that
functionality. It is also not there for two linestrings.
> The types _GeometryMultiLinestring and _GeometryMultiPolygon have been defined as follows:
> struct _GeometryMultiLinestring : std::vector<_GeometryLinestring>
> {
> };
> struct _GeometryMultiPolygon : std::vector<_GeometryPolygon>
> {
> };
>
> The following tags have also been defined:
> namespace boost { namespace geometry { namespace traits {
> template<> struct tag<GeoKit::impl::_GeometryMultiPoint>
> {
> typedef multi_point_tag type;
> };
> template<> struct tag<GeoKit::impl::_GeometryMultiLinestring>
> {
> typedef multi_linestring_tag type;
> };
> template<> struct tag<GeoKit::impl::_GeometryMultiPolygon>
> {
> typedef multi_polygon_tag type;
> };
> }}}
This all sounds OK to me.
Regards, Barend
-- ------------------------------------- Barend Gehrels ------------------------------------- http://www.erplex.com http://trac.osgeo.org/ggl http://www.geodan.nl ------------------------------------- Geodan President Kennedylaan 1 1079 MB Amsterdam The Netherlands ------------------------------------- Tel: +31 (0)20 5711 335 Mob: +31 (0)6 175 447 62 Fax: +31 (0)20 5711 333 ------------------------------------- E-mail: barend.gehrels_at_[hidden] Kvk-nummer: 33 207089 Disclaimer: www.geodan.nl/disclaimer -------------------------------------
Geometry list run by mateusz at loskot.net