Boost logo

Boost :

Subject: Re: [boost] Formal Review: Boost.Polygon starts today August 24, 2009
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-08-26 17:08:21


Thomas Klimpel wrote:
>> - What is your evaluation of the documentation?
>
> Don't know yet. I have a bit the impression that I'm supposed to read
> the sample programs and abstract myself from this what it does. But
> it somehow seems to work, so I will report my observations in the
> same style:

Thank you for your careful reading of the examples and some of their associated documentation. Are you suggesting that I should add more explanation (in the form of comments) to the example code?

> - Slight inconsistency of Contents menu for "Polygon 45 Concept" and
> "Property Merge 45"

fixed
 
> - point_usage.cpp:
> assert(gtl::euclidean_distance(pt, pt2) == 10.0f);
> is not a good idea, because floating point comparison will not work
> out

Floating point comparision does work and the assert is not triggered when the code is run.

All exact comparsions performed in the example code with floating point literals are safe because I contrived the input parameters so that the floating opint calculations are able to produce exact and not approximate results.

> - gtl_polygon_usage.cpp:
> assert(gtl::extents(rect, poly)); //get bounding box of poly

I see nothing wrong with this line.

> - custom_polygon.cpp:
> static inline unsigned int size(const CPolygon& t) {

Technically this line should return std::size_t, is that what you are pointing out?

> - connectivity_extraction_usage.cpp:
> assert(ce.insert(test_data[i]) == i);

Not sure what you are calling out. The id assigned by insert starts at zero and increments, meaning it happens to be equal to i in my example code.

> //Now you know how to use the connectivity extraction algorithm
> //to extract the connectivity graph for overlapping geometry

Not sure what you are calling out.

> - property_merge_usage.cpp:
> //Now you know how to use the manhattan and arbitrary angle property
> //merge algorithms to perform map overlay on n layers of input
> geometry

Not sure what you are calling out.

> - gtl_property_merge_90.htm:
> std::map<std::set<property_type>, polygon_set_data<coordiante_type> >
> std::map<std::vector<property_type>,
> polygon_set_data<coordiante_type> >

fixed

> coordiante_type should be coordinate_type, but what's the meaning of
> "polygon_set_data<coordinate_type>"?

polygon_set_data<coordinate_type> is a class defined in the library documented in the polygon set concept page. It is storage for geometry with the assoicated set of properties in the result of the property merge algorithm. Recall that property merge is map-overlay. The polygon_set_data<coordinate_type> is the polygons that are associated with the overlay of several properties which constitute the key of the map that stores the result of the map overlay.

> void merge(result_tyep& result)

fixed

Thanks again,
Luke


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk