GDAL
ogrpgeogeometry.h
1/******************************************************************************
2 * $Id$
3 *
4 * Project: OpenGIS Simple Features Reference Implementation
5 * Purpose: Implements decoder of shapebin geometry for PGeo
6 * Author: Frank Warmerdam, warmerdam@pobox.com
7 *
8 ******************************************************************************
9 * Copyright (c) 2005, Frank Warmerdam <warmerdam@pobox.com>
10 * Copyright (c) 2011-2014, Even Rouault <even dot rouault at spatialys.com>
11 *
12 * SPDX-License-Identifier: MIT
13 ****************************************************************************/
14
15#ifndef OGR_PGEOGEOMETRY_H_INCLUDED
16#define OGR_PGEOGEOMETRY_H_INCLUDED
17
18#include "ogr_geometry.h"
19
20#include <vector>
21
22#define SHPT_NULL 0
23
24#ifndef SHPT_POINT
25#define SHPT_POINT 1
26#define SHPT_POINTM 21
27#define SHPT_POINTZM 11
28#define SHPT_POINTZ 9
29
30#define SHPT_MULTIPOINT 8
31#define SHPT_MULTIPOINTM 28
32#define SHPT_MULTIPOINTZM 18
33#define SHPT_MULTIPOINTZ 20
34
35#define SHPT_ARC 3
36#define SHPT_ARCM 23
37#define SHPT_ARCZM 13
38#define SHPT_ARCZ 10
39
40#define SHPT_POLYGON 5
41#define SHPT_POLYGONM 25
42#define SHPT_POLYGONZM 15
43#define SHPT_POLYGONZ 19
44
45#define SHPT_MULTIPATCHM 31
46#define SHPT_MULTIPATCH 32
47#endif // SHPT_POINT
48
49#define SHPT_GENERALPOLYLINE 50
50#define SHPT_GENERALPOLYGON 51
51#define SHPT_GENERALPOINT 52
52#define SHPT_GENERALMULTIPOINT 53
53#define SHPT_GENERALMULTIPATCH 54
54
55/* The following are layers geometry type */
56/* They are different from the above shape types */
57#define ESRI_LAYERGEOMTYPE_NULL 0
58#define ESRI_LAYERGEOMTYPE_POINT 1
59#define ESRI_LAYERGEOMTYPE_MULTIPOINT 2
60#define ESRI_LAYERGEOMTYPE_POLYLINE 3
61#define ESRI_LAYERGEOMTYPE_POLYGON 4
62#define ESRI_LAYERGEOMTYPE_MULTIPATCH 9
63
64OGRGeometry CPL_DLL *OGRCreateFromMultiPatch(
65 int nParts, const GInt32 *panPartStart, const GInt32 *panPartType,
66 int nPoints, const double *padfX, const double *padfY, const double *padfZ);
67
68OGRErr CPL_DLL OGRCreateFromShapeBin(GByte *pabyShape, OGRGeometry **ppoGeom,
69 int nBytes);
70
71OGRErr CPL_DLL OGRWriteToShapeBin(const OGRGeometry *poGeom, GByte **ppabyShape,
72 int *pnBytes);
73
74OGRErr CPL_DLL OGRCreateMultiPatch(const OGRGeometry *poGeom,
75 int bAllowSHPTTriangle, int &nParts,
76 std::vector<int> &anPartStart,
77 std::vector<int> &anPartType, int &nPoints,
78 std::vector<OGRRawPoint> &aoPoints,
79 std::vector<double> &adfZ);
80
81OGRErr CPL_DLL OGRWriteMultiPatchToShapeBin(const OGRGeometry *poGeom,
82 GByte **ppabyShape, int *pnBytes);
83
84#endif
Abstract base class for all geometry classes.
Definition ogr_geometry.h:361
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:169
int GInt32
Int32 type.
Definition cpl_port.h:159
int OGRErr
Type for a OGR error.
Definition ogr_core.h:371
Simple feature geometry classes.