GDAL
|
00001 /****************************************************************************** 00002 * $Id: ogrpgeogeometry.h 27044 2014-03-16 23:41:27Z rouault $ 00003 * 00004 * Project: OpenGIS Simple Features Reference Implementation 00005 * Purpose: Implements decoder of shapebin geometry for PGeo 00006 * Author: Frank Warmerdam, warmerdam@pobox.com 00007 * 00008 ****************************************************************************** 00009 * Copyright (c) 2005, Frank Warmerdam <warmerdam@pobox.com> 00010 * Copyright (c) 2011-2014, Even Rouault <even dot rouault at mines-paris dot org> 00011 * 00012 * Permission is hereby granted, free of charge, to any person obtaining a 00013 * copy of this software and associated documentation files (the "Software"), 00014 * to deal in the Software without restriction, including without limitation 00015 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00016 * and/or sell copies of the Software, and to permit persons to whom the 00017 * Software is furnished to do so, subject to the following conditions: 00018 * 00019 * The above copyright notice and this permission notice shall be included 00020 * in all copies or substantial portions of the Software. 00021 * 00022 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00023 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00024 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00025 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00026 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00027 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00028 * DEALINGS IN THE SOFTWARE. 00029 ****************************************************************************/ 00030 00031 #ifndef _OGR_PGEOGEOMETRY_H_INCLUDED 00032 #define _OGR_PGEOGEOMETRY_H_INCLUDED 00033 00034 #include "ogr_geometry.h" 00035 00036 #define SHPT_NULL 0 00037 00038 #define SHPT_POINT 1 00039 #define SHPT_POINTM 21 00040 #define SHPT_POINTZM 11 00041 #define SHPT_POINTZ 9 00042 00043 #define SHPT_MULTIPOINT 8 00044 #define SHPT_MULTIPOINTM 28 00045 #define SHPT_MULTIPOINTZM 18 00046 #define SHPT_MULTIPOINTZ 20 00047 00048 #define SHPT_ARC 3 00049 #define SHPT_ARCM 23 00050 #define SHPT_ARCZM 13 00051 #define SHPT_ARCZ 10 00052 00053 #define SHPT_POLYGON 5 00054 #define SHPT_POLYGONM 25 00055 #define SHPT_POLYGONZM 15 00056 #define SHPT_POLYGONZ 19 00057 00058 #define SHPT_MULTIPATCHM 31 00059 #define SHPT_MULTIPATCH 32 00060 00061 #define SHPT_GENERALPOLYLINE 50 00062 #define SHPT_GENERALPOLYGON 51 00063 #define SHPT_GENERALPOINT 52 00064 #define SHPT_GENERALMULTIPOINT 53 00065 #define SHPT_GENERALMULTIPATCH 54 00066 00067 /* The following are layers geometry type */ 00068 /* They are different from the above shape types */ 00069 #define ESRI_LAYERGEOMTYPE_NULL 0 00070 #define ESRI_LAYERGEOMTYPE_POINT 1 00071 #define ESRI_LAYERGEOMTYPE_MULTIPOINT 2 00072 #define ESRI_LAYERGEOMTYPE_POLYLINE 3 00073 #define ESRI_LAYERGEOMTYPE_POLYGON 4 00074 #define ESRI_LAYERGEOMTYPE_MULTIPATCH 9 00075 00076 void OGRCreateFromMultiPatchPart(OGRMultiPolygon *poMP, 00077 OGRPolygon*& poLastPoly, 00078 int nPartType, 00079 int nPartPoints, 00080 double* padfX, 00081 double* padfY, 00082 double* padfZ); 00083 00084 OGRErr CPL_DLL OGRCreateFromShapeBin( GByte *pabyShape, 00085 OGRGeometry **ppoGeom, 00086 int nBytes ); 00087 00088 OGRErr CPL_DLL OGRWriteToShapeBin( OGRGeometry *poGeom, 00089 GByte **ppabyShape, 00090 int *pnBytes ); 00091 00092 OGRErr CPL_DLL OGRWriteMultiPatchToShapeBin( OGRGeometry *poGeom, 00093 GByte **ppabyShape, 00094 int *pnBytes ); 00095 00096 #endif