/usr/include/geos/noding/FastNodingValidator.h is in libgeos-dev 3.2.2-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | /**********************************************************************
* $Id: FastNodingValidator.h 2778 2009-12-03 19:44:00Z mloskot $
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: noding/FastNodingValidator.java rev. ??? (JTS-1.8)
*
**********************************************************************/
#ifndef GEOS_NODING_FASTNODINGVALIDATOR_H
#define GEOS_NODING_FASTNODINGVALIDATOR_H
#include <geos/noding/SingleInteriorIntersectionFinder.h> // for composition
#include <geos/algorithm/LineIntersector.h> // for composition
#include <memory>
#include <string>
#include <cassert>
// Forward declarations
namespace geos {
namespace noding {
class SegmentString;
}
}
namespace geos {
namespace noding { // geos.noding
/** \brief
* Validates that a collection of {@link SegmentString}s is correctly noded.
*
* Uses indexes to improve performance.
* Does NOT check a-b-a collapse situations.
* Also does not check for endpt-interior vertex intersections.
* This should not be a problem, since the noders should be
* able to compute intersections between vertices correctly.
* User may either test the valid condition, or request that a
* {@link TopologyException}
* be thrown.
*
* @version 1.7
*/
class FastNodingValidator
{
public:
FastNodingValidator(std::vector<noding::SegmentString*>& newSegStrings)
:
li(), // robust...
segStrings(newSegStrings),
segInt(),
isValidVar(true)
{
}
/**
* Checks for an intersection and
* reports if one is found.
*
* @return true if the arrangement contains an interior intersection
*/
bool isValid()
{
execute();
return isValidVar;
}
/**
* Returns an error message indicating the segments containing
* the intersection.
*
* @return an error message documenting the intersection location
*/
std::string getErrorMessage() const;
/**
* Checks for an intersection and throws
* a TopologyException if one is found.
*
* @throws TopologyException if an intersection is found
*/
void checkValid();
private:
geos::algorithm::LineIntersector li;
std::vector<noding::SegmentString*>& segStrings;
std::auto_ptr<SingleInteriorIntersectionFinder> segInt;
bool isValidVar;
void execute()
{
if (segInt.get() != NULL) return;
checkInteriorIntersections();
}
void checkInteriorIntersections();
// Declare type as noncopyable
FastNodingValidator(const FastNodingValidator& other);
FastNodingValidator& operator=(const FastNodingValidator& rhs);
};
} // namespace geos.noding
} // namespace geos
#endif // GEOS_NODING_FASTNODINGVALIDATOR_H
/**********************************************************************
* $Log$
**********************************************************************/
|