1964         char *hexewkb = NULL;
 
 1965         unsigned char *hexewkb_binary = NULL;
 
 1971         int i, geocolnum = 0;
 
 1989                 if (PQresultStatus(state->
fetchres) != PGRES_TUPLES_OK)
 
 2002                 geocolnum = PQfnumber(state->
fetchres, 
"_geoX");
 
 2059                                         LWDEBUG(4, 
"PostGIS >= 1.0, non-binary cursor");
 
 2063                                         hexewkb_binary = PQunescapeBytea((
unsigned char *)val, &hexewkb_len);
 
 2068                                         LWDEBUG(4, 
"PostGIS < 1.0, non-binary cursor");
 
 2073                                         hexewkb = 
malloc(hexewkb_len + 1);
 
 2074                                         strncpy(hexewkb, val, hexewkb_len + 1);
 
 2079                                 LWDEBUG(4, 
"PostGIS (any version) using binary cursor");
 
 2086                         LWDEBUGF(4, 
"HexEWKB - length: %lu  value: %s", strlen(hexewkb), hexewkb);
 
 2101                         switch (lwgeom->
type)
 
 2156                         if (hexewkb) 
free(hexewkb);
 
 2157                         if (hexewkb_binary) PQfreemem(hexewkb_binary);
 
int SHPAPI_CALL DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField, void *pValue)
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
LWGEOM * lwgeom_from_hexwkb(const char *hexwkb, const char check)
LWMPOINT * lwgeom_as_lwmpoint(const LWGEOM *lwgeom)
void lwgeom_free(LWGEOM *geom)
#define LW_PARSER_CHECK_NONE
LWMPOLY * lwgeom_as_lwmpoly(const LWGEOM *lwgeom)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
LWMLINE * lwgeom_as_lwmline(const LWGEOM *lwgeom)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
LWPOLY * lwgeom_as_lwpoly(const LWGEOM *lwgeom)
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
static SHPObject * create_polygon(SHPDUMPERSTATE *state, LWPOLY *lwpolygon)
static SHPObject * create_multipolygon(SHPDUMPERSTATE *state, LWMPOLY *lwmultipolygon)
char * convert_bytes_to_hex(uint8_t *ewkb, size_t size)
Binary to hexewkb conversion function.
static SHPObject * create_linestring(SHPDUMPERSTATE *state, LWLINE *lwlinestring)
static char * goodDBFValue(char *in, char fieldType)
Make appropriate formatting of a DBF value based on type.
static SHPObject * create_point(SHPDUMPERSTATE *state, LWPOINT *lwpoint)
static SHPObject * create_point_empty(SHPDUMPERSTATE *state, LWPOINT *lwpoint)
static char * nullDBFValue(char fieldType)
static SHPObject * create_multipoint(SHPDUMPERSTATE *state, LWMPOINT *lwmultipoint)
static SHPObject * create_multilinestring(SHPDUMPERSTATE *state, LWMLINE *lwmultilinestring)
void SHPAPI_CALL SHPDestroyObject(SHPObject *psObject)
SHPObject SHPAPI_CALL1 * SHPCreateSimpleObject(int nSHPType, int nVertices, const double *padfX, const double *padfY, const double *padfZ){ return(SHPCreateObject(nSHPType, -1, 0, SHPLIB_NULLPTR, SHPLIB_NULLPTR, nVertices, padfX, padfY, padfZ, SHPLIB_NULLPTR)
int SHPAPI_CALL SHPWriteObject(SHPHandle psSHP, int nShapeId, SHPObject *psObject)
char message[SHPDUMPERMSGLEN]