Subject: Re: [geometry] Integrating OGR library with Boost.Geometry
From: Eric MSP Veith (eveith_at_[hidden])
Date: 2015-05-22 04:39:41


Hello Menelaos,

thanks for your reply!

On Friday 22 May 2015, 08:42:58, Menelaos Karavelas wrote:
> I cannot really tell what the problem is but there is one thing that I
> think needs investigation:
>
> Please make sure that you have correctly defined the specializations
> required by Boost.Range. It seems that you are missing the
> range_mutable_iterator specialization. See
> http://www.boost.org/doc/libs/1_58_0/libs/range/doc/html/range/reference/ext
> ending.html for the details.

Doesn't range_mutable_iterator mean that the return type of the iterator's
dereference operator is a modifiable reference? If so, I cannot do this due to
the OGRLineString's API. :-/

Please correct me if I'm mistaken here; I'm by no means an expert in C++ STL-
conformant iterator design.

> Another thing: would it be possible to also try with boost 1.58? It
> would be helpful to know if the problem persists there.

Just upgraded to Boost 1.58.0. I used a different machine to make sure there
are no leftovers that interfer on the original machine. Same problem, sadly.

> > QCOMPARE(
> >
> > bg::distance(bls1, bls2),
> > bg::distance(*ls1, *ls2));
> >
> > QCOMPARE(
> >
> > bg::distance(*ls1, *ls2),
> > ls1->Distance(ls2));
>
> Which one(s) of the three tests above fail? All of them? Just the second?

These two both fail. From that I conclude that (a) the OGRPoint adapter to
Boost.Geometry works, since I can successfully use bg::distance with my
`typedef bg::model::linestring<OGRPoint> boostLinestring` linestring. However,
the OGRLineString version uses my iterator code and fails. So the only bug
that can be found here is most probably in my own iterator code.

Thanks
        Eric