00001 /****************************************************************************** 00002 * $Id: ogrpgeogeometry.h 22525 2011-06-11 02:18:49Z rburhum $ 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 * 00011 * Permission is hereby granted, free of charge, to any person obtaining a 00012 * copy of this software and associated documentation files (the "Software"), 00013 * to deal in the Software without restriction, including without limitation 00014 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00015 * and/or sell copies of the Software, and to permit persons to whom the 00016 * Software is furnished to do so, subject to the following conditions: 00017 * 00018 * The above copyright notice and this permission notice shall be included 00019 * in all copies or substantial portions of the Software. 00020 * 00021 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00022 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00023 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00024 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00025 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00026 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00027 * DEALINGS IN THE SOFTWARE. 00028 ****************************************************************************/ 00029 00030 #ifndef _OGR_PGEOGEOMETRY_H_INCLUDED 00031 #define _OGR_PGEOGEOMETRY_H_INCLUDED 00032 00033 #include "ogr_geometry.h" 00034 00035 #define SHPT_NULL 0 00036 00037 #define SHPT_POINT 1 00038 #define SHPT_POINTM 21 00039 #define SHPT_POINTZM 11 00040 #define SHPT_POINTZ 9 00041 00042 #define SHPT_MULTIPOINT 8 00043 #define SHPT_MULTIPOINTM 28 00044 #define SHPT_MULTIPOINTZM 18 00045 #define SHPT_MULTIPOINTZ 20 00046 00047 #define SHPT_ARC 3 00048 #define SHPT_ARCM 23 00049 #define SHPT_ARCZM 13 00050 #define SHPT_ARCZ 10 00051 00052 #define SHPT_POLYGON 5 00053 #define SHPT_POLYGONM 25 00054 #define SHPT_POLYGONZM 15 00055 #define SHPT_POLYGONZ 19 00056 00057 #define SHPT_MULTIPATCHM 31 00058 #define SHPT_MULTIPATCH 32 00059 00060 #define SHPT_GENERALPOLYLINE 50 00061 #define SHPT_GENERALPOLYGON 51 00062 #define SHPT_GENERALPOINT 52 00063 #define SHPT_GENERALMULTIPOINT 53 00064 #define SHPT_GENERALMULTIPATCH 54 00065 00066 /* The following are layers geometry type */ 00067 /* They are different from the above shape types */ 00068 #define ESRI_LAYERGEOMTYPE_NULL 0 00069 #define ESRI_LAYERGEOMTYPE_POINT 1 00070 #define ESRI_LAYERGEOMTYPE_MULTIPOINT 2 00071 #define ESRI_LAYERGEOMTYPE_POLYLINE 3 00072 #define ESRI_LAYERGEOMTYPE_POLYGON 4 00073 #define ESRI_LAYERGEOMTYPE_MULTIPATCH 9 00074 00075 00076 OGRErr CPL_DLL OGRCreateFromShapeBin( GByte *pabyShape, 00077 OGRGeometry **ppoGeom, 00078 int nBytes ); 00079 00080 OGRErr CPL_DLL OGRWriteToShapeBin( OGRGeometry *poGeom, 00081 GByte **ppabyShape, 00082 int *pnBytes ); 00083 00084 00085 #endif