/usr/include/geos/io/WKBReader.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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | /**********************************************************************
* $Id: WKBReader.h 2775 2009-12-03 19:38:12Z mloskot $
*
* 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/WKBReader.java rev. 1.1 (JTS-1.7)
*
**********************************************************************/
#ifndef GEOS_IO_WKBREADER_H
#define GEOS_IO_WKBREADER_H
#include <geos/export.h>
#include <geos/geom/GeometryFactory.h>
#include <geos/io/ByteOrderDataInStream.h> // for composition
#include <iosfwd> // ostream, istream
#include <vector>
#include <string>
#define BAD_GEOM_TYPE_MSG "Bad geometry type encountered in"
// Forward declarations
namespace geos {
namespace geom {
//class GeometryFactory;
class Coordinate;
class Geometry;
class GeometryCollection;
class Point;
class LineString;
class LinearRing;
class Polygon;
class MultiPoint;
class MultiLineString;
class MultiPolygon;
class PrecisionModel;
} // namespace geom
} // namespace geos
namespace geos {
namespace io {
/**
* \class WKBReader io.h geos.h
*
* \brief Reads a Geometry from Well-Known Binary format.
*
* This class is designed to support reuse of a single instance to read
* multiple geometries. This class is not thread-safe; each thread should
* create its own instance.
*
* The Well-known Binary format is defined in the <A
* HREF="http://www.opengis.org/techno/specs.htm">OpenGIS Simple Features
* Specification for SQL</A>.
* This implementation supports the extended WKB standard which allows
* representing 3-dimensional coordinates.
*
*/
class GEOS_DLL WKBReader {
public:
WKBReader(geom::GeometryFactory const& f): factory(f) {};
/// Inizialize parser with default GeometryFactory.
WKBReader();
/**
* \brief Reads a Geometry from an istream.
*
* @param is the stream to read from
* @return the Geometry read
* @throws IOException
* @throws ParseException
*/
geom::Geometry* read(std::istream &is);
// throws IOException, ParseException
/**
* \brief Reads a Geometry from an istream in hex format.
*
* @param is the stream to read from
* @return the Geometry read
* @throws IOException
* @throws ParseException
*/
geom::Geometry *readHEX(std::istream &is);
// throws IOException, ParseException
/**
* \brief Print WKB in HEX form to out stream
*
* @param is is the stream to read from
* @param os is the stream to write to
*/
static std::ostream &printHEX(std::istream &is, std::ostream &os);
private:
const geom::GeometryFactory &factory;
// for now support the WKB standard only - may be generalized later
unsigned int inputDimension;
ByteOrderDataInStream dis;
std::vector<double> ordValues;
geom::Geometry *readGeometry();
// throws IOException, ParseException
geom::Point *readPoint();
// throws IOException
geom::LineString *readLineString();
// throws IOException
geom::LinearRing *readLinearRing();
// throws IOException
geom::Polygon *readPolygon();
// throws IOException
geom::MultiPoint *readMultiPoint();
// throws IOException, ParseException
geom::MultiLineString *readMultiLineString();
// throws IOException, ParseException
geom::MultiPolygon *readMultiPolygon();
// throws IOException, ParseException
geom::GeometryCollection *readGeometryCollection();
// throws IOException, ParseException
geom::CoordinateSequence *readCoordinateSequence(int); // throws IOException
void readCoordinate(); // throws IOException
// Declare type as noncopyable
WKBReader(const WKBReader& other);
WKBReader& operator=(const WKBReader& rhs);
};
} // namespace io
} // namespace geos
#endif // #ifndef GEOS_IO_WKBREADER_H
/**********************************************************************
* $Log$
* Revision 1.3 2006/06/01 11:49:36 strk
* Reduced installed headers form geomgraph namespace
*
* Revision 1.2 2006/04/12 10:57:19 strk
* Added WKBReader default ctor using default GeometryFactory instance
*
* Revision 1.1 2006/03/20 18:18:14 strk
* io.h header split
*
**********************************************************************/
|