GEOS: LineSegmentIndex.h Source File

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# LineSegmentIndex.h

    00001 /**********************************************************************
    00002  * $Id: LineSegmentIndex.h 2785 2009-12-03 19:55:11Z mloskot $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************
    00015  *
    00016  * Last port: simplify/LineSegmentIndex.java rev. 1.1 (JTS-1.7.1)
    00017  *
    00018  **********************************************************************
    00019  *
    00020  * NOTES
    00021  *
    00022  **********************************************************************/
    00023
    00024 #ifndef GEOS_SIMPLIFY_LINESEGMENTINDEX_H
    00025 #define GEOS_SIMPLIFY_LINESEGMENTINDEX_H
    00026
    00027 #include <geos/export.h>
    00028 #include <vector>
    00029 #include <memory> // for auto_ptr
    00030
    00031 // Forward declarations
    00032 namespace geos {
    00033         namespace geom {
    00034                 class Envelope;
    00035                 class LineSegment;
    00036         }
    00037         namespace simplify {
    00038                 class TaggedLineString;
    00039         }
    00040         namespace index {
    00041                 namespace quadtree {
    00042                         class Quadtree;
    00043                 }
    00044         }
    00045 }
    00046
    00047 namespace geos {
    00048 namespace simplify { // geos::simplify
    00049
    00050 class GEOS_DLL LineSegmentIndex {
    00051
    00052 public:
    00053
    00054         LineSegmentIndex();
    00055
    00056         ~LineSegmentIndex();
    00057
    00058         void add(const TaggedLineString& line);
    00059
    00060         void add(const geom::LineSegment* seg);
    00061
    00062         void remove(const geom::LineSegment* seg);
    00063
    00064         std::auto_ptr< std::vector<geom::LineSegment*> >
    00065                         query(const geom::LineSegment* seg) const;
    00066
    00067 private:
    00068
    00069         std::auto_ptr<index::quadtree::Quadtree> index;
    00070
    00071         std::vector<geom::Envelope*> newEnvelopes;
    00072
    00073         // Copying is turned off
    00074         LineSegmentIndex(const LineSegmentIndex&);
    00075         LineSegmentIndex& operator=(const LineSegmentIndex&);
    00076 };
    00077
    00078 } // namespace geos::simplify
    00079 } // namespace geos
    00080
    00081 #endif // GEOS_SIMPLIFY_LINESEGMENTINDEX_H
    00082
    00083 /**********************************************************************
    00084  * $Log$
    00085  * Revision 1.2  2006/04/13 09:28:09  mloskot
    00086  * Removed definition of copy ctor and assignment operator for LineSegmentString class.
    00087  *
    00088  * Revision 1.1  2006/04/12 15:20:37  strk
    00089  * LineSegmentIndex class
    00090  *
    00091  **********************************************************************/