/usr/include/geos/io/WKTReader.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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | /**********************************************************************
* $Id: WKTReader.h 2579 2009-06-15 14:03:52Z strk $
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2005-2006 Refractions Research Inc.
* Copyright (C) 2001-2002 Vivid Solutions 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: io/WKTReader.java rev. 1.1 (JTS-1.7)
*
**********************************************************************/
#ifndef GEOS_IO_WKTREADER_H
#define GEOS_IO_WKTREADER_H
#include <geos/export.h>
#include <geos/geom/GeometryFactory.h>
#include <geos/geom/CoordinateSequence.h>
#include <string>
// Forward declarations
namespace geos {
namespace io {
class StringTokenizer;
}
namespace geom {
class Coordinate;
class Geometry;
class GeometryCollection;
class Point;
class LineString;
class LinearRing;
class Polygon;
class MultiPoint;
class MultiLineString;
class MultiPolygon;
class PrecisionModel;
}
}
namespace geos {
namespace io {
/**
* \class WKTReader io.h geos.h
* \brief WKT parser class; see also WKTWriter.
*/
class GEOS_DLL WKTReader {
public:
//WKTReader();
/**
* \brief Inizialize parser with given GeometryFactory.
*
* Note that all Geometry objects created by the
* parser will contain a pointer to the given factory
* so be sure you'll keep the factory alive for the
* whole WKTReader and created Geometry life.
*/
WKTReader(const geom::GeometryFactory *gf);
/**
* \brief Inizialize parser with default GeometryFactory.
*
*/
WKTReader();
~WKTReader();
/// Parse a WKT string returning a Geometry
geom::Geometry* read(const std::string &wellKnownText);
// Geometry* read(Reader& reader); //Not implemented yet
protected:
geom::CoordinateSequence* getCoordinates(io::StringTokenizer *tokenizer);
double getNextNumber(io::StringTokenizer *tokenizer);
std::string getNextEmptyOrOpener(io::StringTokenizer *tokenizer);
std::string getNextCloserOrComma(io::StringTokenizer *tokenizer);
std::string getNextCloser(io::StringTokenizer *tokenizer);
std::string getNextWord(io::StringTokenizer *tokenizer);
geom::Geometry* readGeometryTaggedText(io::StringTokenizer *tokenizer);
geom::Point* readPointText(io::StringTokenizer *tokenizer);
geom::LineString* readLineStringText(io::StringTokenizer *tokenizer);
geom::LinearRing* readLinearRingText(io::StringTokenizer *tokenizer);
geom::MultiPoint* readMultiPointText(io::StringTokenizer *tokenizer);
geom::Polygon* readPolygonText(io::StringTokenizer *tokenizer);
geom::MultiLineString* readMultiLineStringText(io::StringTokenizer *tokenizer);
geom::MultiPolygon* readMultiPolygonText(io::StringTokenizer *tokenizer);
geom::GeometryCollection* readGeometryCollectionText(io::StringTokenizer *tokenizer);
private:
const geom::GeometryFactory *geometryFactory;
const geom::PrecisionModel *precisionModel;
void getPreciseCoordinate(io::StringTokenizer *tokenizer, geom::Coordinate&);
bool isNumberNext(io::StringTokenizer *tokenizer);
};
} // namespace io
} // namespace geos
#ifdef GEOS_INLINE
# include <geos/io/WKTReader.inl>
#endif
#endif // #ifndef GEOS_IO_WKTREADER_H
/**********************************************************************
* $Log$
* Revision 1.6 2006/04/10 13:40:14 strk
* Added default ctor for WKTReader (using GeometryFactory's default instance)
*
* Revision 1.5 2006/04/10 12:05:35 strk
* Added inline-replicator implementation files to make sure
* functions in .inl files are still available out-of-line.
* A side effect is this should fix MingW build.
*
* Revision 1.4 2006/03/30 09:26:36 strk
* minor cleanup
*
* Revision 1.3 2006/03/24 09:52:41 strk
* USE_INLINE => GEOS_INLINE
*
* Revision 1.2 2006/03/22 16:58:35 strk
* Removed (almost) all inclusions of geom.h.
* Removed obsoleted .cpp files.
* Fixed a bug in WKTReader not using the provided CoordinateSequence
* implementation, optimized out some memory allocations.
*
* Revision 1.1 2006/03/20 18:18:15 strk
* io.h header split
*
**********************************************************************/
|