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

- File List

# SegmentIntersectionTester.h

    00001 /**********************************************************************
    00002  *
    00003  * GEOS - Geometry Engine Open Source
    00004  * http://geos.refractions.net
    00005  *
    00006  * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
    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/predicate/SegmentIntersectionTester.java r378 (JTS-1.12)
    00017  *
    00018  **********************************************************************/
    00019
    00020 #ifndef GEOS_OP_PREDICATE_SEGMENTINTERSECTIONTESTER_H
    00021 #define GEOS_OP_PREDICATE_SEGMENTINTERSECTIONTESTER_H
    00022
    00023 #include <geos/export.h>
    00024
    00025 #include <geos/algorithm/LineIntersector.h> // for composition
    00026 #include <geos/geom/Coordinate.h> // for composition
    00027
    00028 // Forward declarations
    00029 namespace geos {
    00030         namespace geom {
    00031                 class LineString;
    00032                 class CoordinateSequence;
    00033         }
    00034 }
    00035
    00036 namespace geos {
    00037 namespace operation { // geos::operation
    00038 namespace predicate { // geos::operation::predicate
    00039
    00048 class GEOS_DLL SegmentIntersectionTester {
    00049
    00050 private:
    00051
    00056         algorithm::LineIntersector li; // Robust
    00057
    00058         bool hasIntersectionVar;
    00059
    00060   geom::Coordinate pt10;
    00061   geom::Coordinate pt11;
    00062   geom::Coordinate pt00;
    00063   geom::Coordinate pt01;
    00064
    00065
    00066 public:
    00067
    00068         SegmentIntersectionTester(): hasIntersectionVar(false) {}
    00069
    00070         bool hasIntersectionWithLineStrings(const geom::LineString &line,
    00071                 const std::vector<const geom::LineString *>& lines);
    00072
    00073         bool hasIntersection(const geom::LineString &line,
    00074                 const geom::LineString &testLine);
    00075
    00090         bool hasIntersectionWithEnvelopeFilter(const geom::LineString &line,
    00091                 const geom::LineString &testLine);
    00092
    00093
    00094 };
    00095
    00096 } // namespace geos::operation::predicate
    00097 } // namespace geos::operation
    00098 } // namespace geos
    00099
    00100 #endif // ifndef GEOS_OP_PREDICATE_SEGMENTINTERSECTIONTESTER_H