|
Revision 891, 1.3 KB
(checked in by jjr8, 17 months ago)
|
|
* Incremented build number.
* Added Libraries/geos-3.3.2
|
| Line | |
|---|
| 1 | /**********************************************************************
|
|---|
| 2 | * $Id: ConvexHull.inl 1820 2006-09-06 16:54:23Z mloskot $
|
|---|
| 3 | *
|
|---|
| 4 | * GEOS - Geometry Engine Open Source
|
|---|
| 5 | * http://geos.refractions.net
|
|---|
| 6 | *
|
|---|
| 7 | * Copyright (C) 2005-2006 Refractions Research Inc.
|
|---|
| 8 | *
|
|---|
| 9 | * This is free software; you can redistribute and/or modify it under
|
|---|
| 10 | * the terms of the GNU Lesser General Public Licence as published
|
|---|
| 11 | * by the Free Software Foundation.
|
|---|
| 12 | * See the COPYING file for more information.
|
|---|
| 13 | *
|
|---|
| 14 | **********************************************************************/
|
|---|
| 15 |
|
|---|
| 16 | #ifndef GEOS_ALGORITHM_CONVEXHULL_INL
|
|---|
| 17 | #define GEOS_ALGORITHM_CONVEXHULL_INL
|
|---|
| 18 |
|
|---|
| 19 | #include <cassert>
|
|---|
| 20 | #include <geos/algorithm/ConvexHull.h>
|
|---|
| 21 | #include <geos/util/UniqueCoordinateArrayFilter.h>
|
|---|
| 22 | #include <geos/geom/Geometry.h>
|
|---|
| 23 |
|
|---|
| 24 | namespace geos {
|
|---|
| 25 | namespace algorithm { // geos::algorithm
|
|---|
| 26 |
|
|---|
| 27 | INLINE
|
|---|
| 28 | ConvexHull::ConvexHull(const geom::Geometry *newGeometry)
|
|---|
| 29 | :
|
|---|
| 30 | geomFactory(newGeometry->getFactory())
|
|---|
| 31 | {
|
|---|
| 32 | extractCoordinates(newGeometry);
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | INLINE
|
|---|
| 36 | ConvexHull::~ConvexHull()
|
|---|
| 37 | {
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | INLINE void
|
|---|
| 41 | ConvexHull::extractCoordinates(const geom::Geometry *geom)
|
|---|
| 42 | {
|
|---|
| 43 | util::UniqueCoordinateArrayFilter filter(inputPts);
|
|---|
| 44 | geom->apply_ro(&filter);
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | } // namespace geos::algorithm
|
|---|
| 48 | } // namespace geos
|
|---|
| 49 |
|
|---|
| 50 | #endif // GEOS_ALGORITHM_CONVEXHULL_INL
|
|---|