Subject: Re: [geometry] access to poligon point list
From: nicola81 (nicola_cavallini_at_[hidden])
Date: 2012-05-19 11:16:10
In the example below what I actually
meant, that I could achieve thanks to your suggestion.
I would call solved this point.
Now I need to move to the next phase,
which is intersecting two sets of polygons.
I bumped into this discussion and I
find it extremely interesting.
Really think this is going to work
great for me.
>Could you point which examples from
the geometry library website
>do not compile for you?
I tried compiling them with g++ and I
could get clearer error messages, I was missing some include.
Getting the code from the trunk means
getting an svn directory and update/compile/install new
Thanks a lot for your help!
polygon green, blue;
"POLYGON((0 0,0 1.75,1.75
0,0 0))", green);
"POLYGON((.5 .5, .5 1, 1
1, 1 .5, .5 .5))", blue);
boost::geometry::intersection(green, blue, output);
red = output;
// ring is a vector
points = red.outer();
i = 0; i < points.size(); ++i)
std::cout << "Size Px =
"<< Px.size() << std::endl;
std::cout << "Size Py =
"<< Py.size() << std::endl;
for (int i = 0; i < Px.size();
<< i << "] = " << Px[i] << ",
Py[" << i << "] = "<< Py[i] <<
Da: Mateusz Loskot [via Boost Geometry] <ml-node+s203548n4000004h50_at_[hidden]>
A: nicola81 <nicola_cavallini_at_[hidden]>
Inviato: VenerdÃ¬ 18 Maggio 2012 1:41
Oggetto: Re: access to poligon point list
On 17 May 2012 19:23, nicola81 <[hidden email]> wrote:
> I would like to get the polygon points in a standard vector, or into some
> other (simple :( ) structure I can access to.
Based on your example, is this what you look for?
red = output;
// ring is a vector
std::vector<point> const& points = red.outer();
for (std::vector<point>::size_type i = 0; i < points.size(); ++i)
Â Â list_coordinates(points[i]);
> I've spent several days trying to get something out of Google, but I
> couldn't get anything useful. I cannot compile most of the code examples on
> stackoverflow or on the geometry library website.
Could you point which examples from the geometry library website
do not compile for you?
> I run the last Intel compiler 12.something, and boost 1.49.
I'd encourage you to try the geometry library for Boost trunk.
> The example I was working on is attached, and is actually from the boost
> website. My guess was trying to get a couple of standard vectors (Px, Py)
> out object function âlist_coordinatesâ.
I have to admit, it is not clear to me what you mean as "get a couple of
standard vectors". But, try my example above and see if this is
what you are looking for.
-- Mateusz Loskot, http://mateusz.loskot.net _______________________________________________ Geometry mailing list [hidden email] http://lists.boost.org/mailman/listinfo.cgi/geometry -- Mateusz Loskot http://mateusz.loskot.net ________________________________ If you reply to this email, your message will be added to the discussion below:http://boost-geometry.203548.n3.nabble.com/access-to-poligon-point-list-tp3999541p4000004.html To unsubscribe from access to poligon point list, click here. NAML -- View this message in context: http://boost-geometry.203548.n3.nabble.com/access-to-poligon-point-list-tp3999541p4002387.html Sent from the Boost Geometry mailing list archive at Nabble.com.
Geometry list run by mateusz at loskot.net