PostGIS  2.5.7dev-r@@SVN_REVISION@@
pgsql2shp-core.c File Reference
#include "../postgis_config.h"
#include "pgsql2shp-core.h"
#include <inttypes.h>
#include <unistd.h>
#include "../liblwgeom/liblwgeom.h"
#include "../liblwgeom/lwgeom_log.h"
Include dependency graph for pgsql2shp-core.c:

Go to the source code of this file.

Macros

#define MAX_DBF_FIELD_SIZE   254
 

Functions

static int reverse_points (int num_points, double *x, double *y, double *z, double *m)
 
static int is_clockwise (int num_points, double *x, double *y, double *z)
 
static int is_bigendian (void)
 
static SHPObjectcreate_point (SHPDUMPERSTATE *state, LWPOINT *lwpoint)
 
static SHPObjectcreate_multipoint (SHPDUMPERSTATE *state, LWMPOINT *lwmultipoint)
 
static SHPObjectcreate_polygon (SHPDUMPERSTATE *state, LWPOLY *lwpolygon)
 
static SHPObjectcreate_multipolygon (SHPDUMPERSTATE *state, LWMPOLY *lwmultipolygon)
 
static SHPObjectcreate_linestring (SHPDUMPERSTATE *state, LWLINE *lwlinestring)
 
static SHPObjectcreate_multilinestring (SHPDUMPERSTATE *state, LWMLINE *lwmultilinestring)
 
static char * nullDBFValue (char fieldType)
 
static int getMaxFieldSize (PGconn *conn, char *schema, char *table, char *fname)
 
static int getTableInfo (SHPDUMPERSTATE *state)
 
static int projFileCreate (SHPDUMPERSTATE *state)
 Creates ESRI .prj file for this shp output It looks in the spatial_ref_sys table and outputs the srtext field for this data If data is a table will use geometry_columns, if a query or view will read SRID from query output. More...
 
static char * goodDBFValue (char *in, char fieldType)
 Make appropriate formatting of a DBF value based on type. More...
 
char * convert_bytes_to_hex (uint8_t *ewkb, size_t size)
 Binary to hexewkb conversion function. More...
 
static SHPObjectcreate_point_empty (SHPDUMPERSTATE *state, LWPOINT *lwpoint)
 
char * shapetypename (int num)
 
void set_dumper_config_defaults (SHPDUMPERCONFIG *config)
 
SHPDUMPERSTATEShpDumperCreate (SHPDUMPERCONFIG *config)
 
char * ShpDumperGetConnectionStringFromConn (SHPCONNECTIONCONFIG *conn)
 
int ShpDumperConnectDatabase (SHPDUMPERSTATE *state)
 
int ShpDumperOpenTable (SHPDUMPERSTATE *state)
 
int ShpLoaderGenerateShapeRow (SHPDUMPERSTATE *state)
 
int ShpDumperGetRecordCount (SHPDUMPERSTATE *state)
 
int ShpDumperCloseTable (SHPDUMPERSTATE *state)
 
void ShpDumperDestroy (SHPDUMPERSTATE *state)
 
char * quote_identifier (const char *s)