|  | Home | Libraries | People | FAQ | More | 
Checks if the first geometry is inside or on border the second geometry using the specified strategy.
The free function covered_by checks if the first geometry is inside or on border the second geometry, using the specified strategy. Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation.
template<typename Geometry1, typename Geometry2, typename Strategy> bool covered_by(Geometry1 const & geometry1, Geometry2 const & geometry2, Strategy const & strategy)
| Type | Concept | Name | Description | 
|---|---|---|---|
| Geometry1 const & | Any type fulfilling a Geometry Concept | geometry1 | A model of the specified concept which might be inside or on the border of the second geometry | 
| Geometry2 const & | Any type fulfilling a Geometry Concept | geometry2 | A model of the specified concept which might cover the first geometry | 
| Strategy const & | strategy | strategy to be used | 
true if geometry1 is inside of or on the border of geometry2, else false
Either
            #include <boost/geometry.hpp>
          
Or
            #include <boost/geometry/algorithms/covered_by.hpp>
          
The function covered_by is not defined by OGC.
| ![[Note]](../../../../../../../../doc/src/images/note.png) | Note | 
|---|---|
| Both PostGIS and Oracle contain an algorithm with the same name and the same functionality. See the PostGIS documentation. | 
| Point | Segment | Box | Linestring | Ring | Polygon | MultiPoint | MultiLinestring | MultiPolygon | Variant | |
|---|---|---|---|---|---|---|---|---|---|---|
| Point | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| Segment | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| Box | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| Linestring | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| Ring | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| Polygon | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| MultiPoint | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| MultiLinestring | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| MultiPolygon | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| Variant | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
                       | 
| ![[Note]](../../../../../../../../doc/src/images/note.png) | Note | 
|---|---|
| In this status matrix above: columns are types of first parameter and rows are types of second parameter. So a point can be checked to be covered by a polygon, but not vice versa. | 
Linear
| ![[Note]](../../../../../../../../doc/src/images/note.png) | Note | 
|---|---|
| 
              The difference with the  |