/usr/include/geos/geom/Envelope.inl is in libgeos-dev 3.2.2-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | /**********************************************************************
* $Id: Envelope.inl 2470 2009-05-05 14:28:27Z strk $
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2005-2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: geom/Envelope.java rev 1.46 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_GEOM_ENVELOPE_INL
#define GEOS_GEOM_ENVELOPE_INL
#include <cassert>
#include <geos/geom/Coordinate.h>
#include <geos/geom/Envelope.h>
namespace geos {
namespace geom { // geos::geom
/*public*/
INLINE double
Envelope::getMaxY() const { return maxy; }
/*public*/
INLINE double
Envelope::getMaxX() const { return maxx; }
/*public*/
INLINE double
Envelope::getMinY() const { return miny; }
/*public*/
INLINE double
Envelope::getMinX() const { return minx; }
/*public*/
INLINE bool
Envelope::intersects(const Coordinate& other) const
{
return (other.x <= maxx && other.x >= minx &&
other.y <= maxy && other.y >= miny);
}
/*public*/
INLINE bool
Envelope::intersects(const Envelope& other) const
{
return intersects(&other);
}
/*public*/
INLINE bool
Envelope::isNull(void) const
{
return maxx < minx;
}
/*public*/
INLINE bool
Envelope::intersects(const Envelope* other) const
{
// Optimized to reduce function calls
if ( isNull() || other->isNull() ) return false;
return !(other->minx > maxx ||
other->maxx < minx ||
other->miny > maxy ||
other->maxy < miny);
}
/*public*/
INLINE bool
Envelope::intersects(double x, double y) const
{
return (x <= maxx && x >= minx && y <= maxy && y >= miny);
}
/*public*/
INLINE bool
Envelope::covers(const Coordinate *p) const
{
return covers(p->x, p->y);
}
} // namespace geos::geom
} // namespace geos
#endif // GEOS_GEOM_ENVELOPE_INL
|