boostorg / geometry

Boost.Geometry - Generic Geometry Library | Requires C++14 since Boost 1.75
http://boost.org/libs/geometry
Boost Software License 1.0
457 stars 216 forks source link

Clarification regarding a statement in model::box docs #389

Closed agauniyal closed 7 years ago

agauniyal commented 7 years ago

I was reading the documentation here - http://www.boost.org/doc/libs/1_63_0/libs/geometry/doc/html/geometry/reference/models/model_box.html#geometry.reference.models.model_box.c1

and it mentions that

Box is always described by a min_corner() and a max_corner() point. If another rectangle is used, use linear_ring or polygon.

What is meant by - 'if another rectangle is used' here? Does it means more than 2 points are provided or something else that I'm missing?

And what exactly is meant by min_corner() and max_corner()? Does it means more inclination to negative side and positive side? What happens if I reverse them while constructing?

awulkiew commented 7 years ago

Min/max corner means that a box is represented by exactly 2 points, the one with lower coordinates and the one with greater coordinates, e.g. min=(0, 1) and max=(10, 7). Rings (polygons without holes) and Polygons (polygons with holes) can also represent 2d Boxes, i.e. rectangles but in this case they need 4 or 5 points (open v.s. closed), e.g. in WKT POLYGON((0 1, 0 7, 10 7, 10 1, 0 1)).

There are more differences between them:

agauniyal commented 7 years ago

Thankyou for replying so quickly, my query is resolved 👍