Const-correctness of intersection_result::get_connection_type()

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Const-correctness of intersection_result::get_connection_type()

Mateusz Loskot
Administrator
Hi,

Just for records, as it may be important.
I have re-declared get_connection_type() - member of
intersection_result type - with const qualifier,
so the previous prototype:

inline connection_type get_connection_type()

has been changed to read:

inline connection_type get_connection_type() const

Committed in revision 547.

I hope it's OK.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Const-correctness of intersection_result::get_connection_type()

Barend Gehrels
Hi Mateusz,

> Hi,
>
> Just for records, as it may be important.
> I have re-declared get_connection_type() - member of
> intersection_result type - with const qualifier,
> so the previous prototype:
>
> inline connection_type get_connection_type()
>
> has been changed to read:
>
> inline connection_type get_connection_type() const
>
> Committed in revision 547.
>
> I hope it's OK.
>
>  

It is OK, sure, but... I think I mailed you before that I'm busy
revising the intersections. The file intersection_segment.hpp will be
replaced completely with the file intersection_policies.hpp from
strategies (which is not completely finished yet, it will be splitted
and one policy will be added).

The idea is as following: for many operations (e.g. touch) it is
necessary to know IF two segments intersect, and often HOW they
intersect, but it is often not necessary to know the intersection
point(s). The new approach is already used in e.g. de9im_segment.cpp and
ogc_relationships.cpp in the geometry/dev, although unfinished. I will
check them tomorrow such that they compile using gcc (they already
should using MSVC).

Barend



Reply | Threaded
Open this post in threaded view
|

Const-correctness of intersection_result::get_connection_type()

Mateusz Loskot
Administrator
Barend Gehrels wrote:

> Hi Mateusz,
>> Hi,
>>
>> Just for records, as it may be important. I have re-declared
>> get_connection_type() - member of intersection_result type - with
>> const qualifier, so the previous prototype:
>>
>> inline connection_type get_connection_type()
>>
>> has been changed to read:
>>
>> inline connection_type get_connection_type() const
>>
>> Committed in revision 547.
>>
>> I hope it's OK.
>>
>>
>
> It is OK, sure, but... I think I mailed you before that I'm busy
> revising the intersections.

Yes, that's clear.

> The file intersection_segment.hpp will be replaced completely with
> the file intersection_policies.hpp from strategies (which is not
> completely finished yet, it will be splitted and one policy will be
> added).

OK

> The idea is as following: for many operations (e.g. touch) it is
> necessary to know IF two segments intersect, and often HOW they
> intersect, but it is often not necessary to know the intersection
> point(s). The new approach is already used in e.g. de9im_segment.cpp
> and ogc_relationships.cpp in the geometry/dev, although unfinished.

Right, good point.

> I will check them tomorrow such that they compile using gcc (they
> already should using MSVC).

I can validate gcc compilation too.
Actually, I've started building with GGL using GCC 4.x.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
--
Mateusz Loskot
http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Const-correctness of intersection_result::get_connection_type()

Barend Gehrels

>> I will check them tomorrow such that they compile using gcc (they
>> already should using MSVC).
>>    
>
> I can validate gcc compilation too.
> Actually, I've started building with GGL using GCC 4.x.
>  
I know, perfect. I'm using gcc 4.3 on mingw and also gcc on ubuntu,
besides MSVC 2005 and 2008.

It was not only gcc, more had to be checked, there were some missing
files as this project was in "dev". The files are checked and committed.

I've incorporated and committed the Spatial Indexes (created by Federico
during the Google Summer of Code 2008) now, at least the rtree part.
Note that it should be enhanced further. But the results are OK and
there is a performance gain. The are used on dev/ogc_relationships.cpp

There are now two files in dev using the new segment intersection
approach: de9im_segments.cpp (the most of this will go to "test") and
ogc_relationships.cpp (a sort of performance research for the base for
touch algorithm, and others, will mail more about this).

Barend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20090414/1ac16400/attachment.html
Reply | Threaded
Open this post in threaded view
|

Const-correctness of intersection_result::get_connection_type()

Mateusz Loskot
Administrator
Barend Gehrels wrote:

>
>>> I will check them tomorrow such that they compile using gcc (they
>>>  already should using MSVC).
>>>
>>
>> I can validate gcc compilation too. Actually, I've started building
>> with GGL using GCC 4.x.
>>
> I know, perfect. I'm using gcc 4.3 on mingw and also gcc on ubuntu,
> besides MSVC 2005 and 2008.

I use GCC 4.x, Visual C++ 2005 and 2008. I also have access
to Visual C++ 2003 (7.1), if we need to test it.

> It was not only gcc, more had to be checked, there were some missing
> files as this project was in "dev". The files are checked and
> committed.

I see.

> I've incorporated and committed the Spatial Indexes (created by
> Federico during the Google Summer of Code 2008) now, at least the
> rtree part. Note that it should be enhanced further. But the results
> are OK and there is a performance gain. The are used on
> dev/ogc_relationships.cpp


Great!

> There are now two files in dev using the new segment intersection
> approach: de9im_segments.cpp (the most of this will go to "test") and
>  ogc_relationships.cpp (a sort of performance research for the base
> for touch algorithm, and others, will mail more about this).

OK

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
--
Mateusz Loskot
http://mateusz.loskot.net