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

- File List

# OffsetPointGenerator.h

    00001 /**********************************************************************
    00002  * $Id: OffsetPointGenerator.h 3255 2011-03-01 17:56:10Z 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 Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  ***********************************************************************
    00015  *
    00016  * Last port: operation/overlay/validate/OffsetPointGenerator.java rev. 1.1 (JTS-1.10)
    00017  *
    00018  **********************************************************************/
    00019
    00020 #ifndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
    00021 #define GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
    00022
    00023 #include <geos/export.h>
    00024 #include <geos/algorithm/PointLocator.h> // for composition
    00025 #include <geos/geom/Geometry.h> // for auto_ptr visibility of dtor
    00026 #include <geos/geom/MultiPoint.h> // for auto_ptr visibility of dtor
    00027 #include <geos/geom/Coordinate.h> // for use in vector
    00028
    00029 #include <vector>
    00030 #include <memory> // for auto_ptr
    00031
    00032 #ifdef _MSC_VER
    00033 #pragma warning(push)
    00034 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
    00035 #endif
    00036
    00037 // Forward declarations
    00038 namespace geos {
    00039         namespace geom {
    00040                 //class Geometry;
    00041                 //class MultiPoint;
    00042                 class LineString;
    00043                 //class Coordinate;
    00044         }
    00045 }
    00046
    00047 namespace geos {
    00048 namespace operation { // geos::operation
    00049 namespace overlay { // geos::operation::overlay
    00050 namespace validate { // geos::operation::overlay::validate
    00051
    00053 //
    00054 class GEOS_DLL OffsetPointGenerator {
    00055
    00056 public:
    00057
    00058         OffsetPointGenerator(const geom::Geometry& geom, double offset);
    00059
    00061         std::auto_ptr< std::vector<geom::Coordinate> > getPoints();
    00062
    00063 private:
    00064
    00065         const geom::Geometry& g;
    00066
    00067         double offsetDistance;
    00068
    00069         std::auto_ptr< std::vector<geom::Coordinate> > offsetPts;
    00070
    00071         void extractPoints(const geom::LineString* line);
    00072
    00073         void computeOffsets(const geom::Coordinate& p0,
    00074                         const geom::Coordinate& p1);
    00075
    00076     // Declare type as noncopyable
    00077     OffsetPointGenerator(const OffsetPointGenerator& other);
    00078     OffsetPointGenerator& operator=(const OffsetPointGenerator& rhs);
    00079 };
    00080
    00081 } // namespace geos::operation::overlay::validate
    00082 } // namespace geos::operation::overlay
    00083 } // namespace geos::operation
    00084 } // namespace geos
    00085
    00086 #ifdef _MSC_VER
    00087 #pragma warning(pop)
    00088 #endif
    00089
    00090 #endif // ndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
    00091
    00092 /**********************************************************************
    00093  * $Log$
    00094  **********************************************************************/
    00095