TaggedLineSegment.h

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 Licence as published
00010  * by the Free Software Foundation. 
00011  * See the COPYING file for more information.
00012  *
00013  **********************************************************************
00014  *
00015  * Last port: simplify/TaggedLineSegment.java rev. 1.1 (JTS-1.7)
00016  *
00017  **********************************************************************
00018  *
00019  * NOTES: Use of this class by DP simplification algorithms
00020  * makes it useless for a TaggedLineSegment to store copies
00021  * of coordinates. Using pointers would be good enough here.
00022  * We don't do it to avoid having to break inheritance from 
00023  * LineSegment, which has copies intead. Wheter LineSegment
00024  * itself should be refactored can be discussed. 
00025  *  --strk 2006-04-12
00026  *
00027  **********************************************************************/
00028 
00029 #ifndef GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
00030 #define GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
00031 
00032 #include <geos/export.h>
00033 #include <geos/geom/LineSegment.h> // for inheritance
00034 
00035 
00036 // Forward declarations
00037 namespace geos {
00038         namespace geom {
00039                 class Coordinate;
00040                 class Geometry;
00041         }
00042 }
00043 
00044 namespace geos {
00045 namespace simplify { // geos::simplify
00046 
00047 
00054 class GEOS_DLL TaggedLineSegment: public geom::LineSegment
00055 {
00056 
00057 public:
00058 
00059         TaggedLineSegment(const geom::Coordinate& p0,
00060                         const geom::Coordinate& p1,
00061                         const geom::Geometry* parent,
00062                         unsigned int index);
00063 
00064         TaggedLineSegment(const geom::Coordinate& p0,
00065                         const geom::Coordinate& p1);
00066 
00067         TaggedLineSegment(const TaggedLineSegment& ls);
00068 
00069         const geom::Geometry* getParent() const;
00070 
00071         unsigned int getIndex() const;
00072 
00073 private:
00074 
00075         const geom::Geometry* parent;
00076 
00077         unsigned int index;
00078 
00079 };
00080 
00081 
00082 
00083 } // namespace geos::simplify
00084 } // namespace geos
00085 
00086 #endif // GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H

Generated on 23 Sep 2013 for GEOS by  doxygen 1.4.7