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