Boost logo

Geometry :

Subject: Re: [geometry] Geometries represented in multiple point types
From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2013-01-31 15:13:12


Hi,

    DualBox db(grid_point(0,0), grid_point(2,2));
> world_point wpi(1.0,1.0);
> world_point wpo(3.0,3.0);
> grid_point gpi(1,1);
> grid_point gpo(3,3);
>
> bool wptrue = boost::geometry::within(wpi,db);
> bool wpfalse = boost::geometry::within(wpo,db);
> bool gptrue = boost::geometry::within(gpi,db);
> bool gpfalse = boost::geometry::within(gpo,db);
>

Since within() can take 2 different geometries with potentially different
point types, I'm not sure to understand what can't be done in the code
above using a mere grid point box. I.e. a grid point box can be passed as
first argument of within() while passing a world point as 2nd argument. But
maybe this particular code doesn't tell the full story of what you're
trying to achieve?

Regarding the possible difference of scale between a grid point and a world
point (your comment in the code), this is a different issue that probably
appeals for something like a transformed view...

Regards
Bruno



Geometry list run by mateusz at loskot.net