|
Geometry : |
Subject: [ggl] Questions about Boost.Geometry
From: Barend Gehrels (barend)
Date: 2011-05-18 11:57:02
Hi Dragos,
Welcome to the list!
> I am developing a small C++ framework (which I plan to release as
> open-source soon), focusing on post-processing of climate datasets.
> Some computational geometry is a necessary component (for example, for
> filtering data inside a polygon on the sphere). For this component, I
> am currently trying to implement a separate library.
Very interesting.
> 1. (Approximately) when will the "official" Boost-version be released?
> I am already using other Boost libraries, and my core users would
> prefer to use a single, stable Boost package.
I see. It is already late, but I'm not sure about the exact date. Right
at this moment there is BoostCon 2011 , people were busy with that, and
I think more news about the date will come next week.
It will be about June/July, I guess.
>
> 2. For an initial version of my software, simple spherical coordinates
> would suffice. Therefore, can Boost.Geometry (using the spherical
> coordinate system):
>
> a) determine whether a GeoLocation (lon, lat) lies inside a GeoPolygon
> (specified as a vector of (lon,lat)-pairs)?
At this moment: no. This is because there was a bug in the side-routine
for lon,lat. But the using point-in-polygon algorithm is agnostic so
depends on that side, if it is fixed, yes. I postponed this last months
for other priorities, but probably it is very small, will have a look,
at least to the state of it.
>
> * This is not a problem for my geometric routines, since I can use a
> cylinder projection, then compute as in the plane case. But can this
> be easily achieved with Boost.Geometry?
>
> b) compute the area of intersection between two GeoPolygons?
No, it is planned but not implemented. This depends also on side but,
more important, to segment-intersection which should be correctly
implemented for lon,lat segments. Also the bounding box (used e.g. for
partitioning) should be considered / handled in the right way, for
spherical. If all that is done, it should basically run but there will
some things to finetune.
Yes, it would be exciting if this is running correctly.
>
> * This is actually one of my biggest problems, since my
> (non-specialist) solution is to:
> - project both GeoPolygons onto a plane cutting the sphere;
> - compute the clipping polygon in 2D, then
> - project back on the sphere and
> - compute the area of the spherical polygon.
I see, this is not the ideal solution.
>
> This does not feel like a good solution, and has many limitations
> (depending on the size of the GeoPolygons, a projection plane might
> not exist, in which case I have to divide them and try to repeat the
> procedure). So, is this possible (maybe trivial) in Boost.Geometry?
I'm quite sure it is feasible but it will certainly not be in Boost 1.47
>
> I hope this is the right place for these questions. Any input would be
> greatly appreciated!
Sure this is the right place.
Regards, Barend
Geometry list run by mateusz at loskot.net