1986 char *hexewkb = NULL;
1987 unsigned char *hexewkb_binary = NULL;
1993 int i, geocolnum = 0;
2011 if (PQresultStatus(state->
fetchres) != PGRES_TUPLES_OK)
2024 geocolnum = PQfnumber(state->
fetchres,
"_geoX");
2081 LWDEBUG(4,
"PostGIS >= 1.0, non-binary cursor");
2085 hexewkb_binary = PQunescapeBytea((
unsigned char *)val, &hexewkb_len);
2090 LWDEBUG(4,
"PostGIS < 1.0, non-binary cursor");
2095 hexewkb =
malloc(hexewkb_len + 1);
2096 strncpy(hexewkb, val, hexewkb_len + 1);
2101 LWDEBUG(4,
"PostGIS (any version) using binary cursor");
2108 LWDEBUGF(4,
"HexEWKB - length: %d value: %s", strlen(hexewkb), hexewkb);
2123 switch (lwgeom->
type)
2178 if (hexewkb)
free(hexewkb);
2179 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.
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
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.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
LWPOLY * lwgeom_as_lwpoly(const LWGEOM *lwgeom)
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
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, NULL, NULL, nVertices, padfX, padfY, padfZ, NULL)
int SHPAPI_CALL SHPWriteObject(SHPHandle psSHP, int nShapeId, SHPObject *psObject)
char message[SHPDUMPERMSGLEN]