GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 ********************************************************************** 00014 * 00015 * Last port: operation/distance/GeometryLocation.java rev. 1.7 (JTS-1.10) 00016 * 00017 **********************************************************************/ 00018 00019 #ifndef GEOS_OP_DISTANCE_GEOMETRYLOCATION_H 00020 #define GEOS_OP_DISTANCE_GEOMETRYLOCATION_H 00021 00022 #include <geos/export.h> 00023 00024 #include <geos/geom/Coordinate.h> // for composition 00025 00026 // Forward declarations 00027 namespace geos { 00028 namespace geom { 00029 class Geometry; 00030 } 00031 } 00032 00033 00034 namespace geos { 00035 namespace operation { // geos::operation 00036 namespace distance { // geos::operation::distance 00037 00038 00050 class GEOS_DLL GeometryLocation { 00051 private: 00052 const geom::Geometry *component; 00053 int segIndex; 00054 geom::Coordinate pt; 00055 public: 00063 static const int INSIDE_AREA = -1; 00064 00074 GeometryLocation(const geom::Geometry *component, 00075 int segIndex, const geom::Coordinate &pt); 00076 00084 GeometryLocation(const geom::Geometry *component, 00085 const geom::Coordinate &pt); 00086 00090 const geom::Geometry* getGeometryComponent(); 00091 00100 int getSegmentIndex(); 00101 00105 geom::Coordinate& getCoordinate(); 00106 00111 bool isInsideArea(); 00112 }; 00113 00114 } // namespace geos::operation::distance 00115 } // namespace geos::operation 00116 } // namespace geos 00117 00118 #endif // GEOS_OP_DISTANCE_GEOMETRYLOCATION_H 00119