Generate an allocated geometry string for shapefile object obj using the state parameters.
Definition at line 318 of file shp2pgsql-core.c.
References _, shp_loader_state::config, FLAGS_SET_M, FLAGS_SET_Z, shp_loader_state::from_srid, shp_loader_state::has_m, shp_loader_state::has_z, LW_FALSE, lwcollection_as_lwgeom(), lwcollection_construct(), lwfree(), lwgeom_free(), lwgeom_to_hexwkb(), lwgeom_to_wkt(), lwline_as_lwgeom(), lwline_construct(), POINT4D::m, malloc(), shp_loader_state::message, MULTILINETYPE, SHPObject::nParts, SHPObject::nVertices, SHPObject::padfM, SHPObject::padfX, SHPObject::padfY, SHPObject::padfZ, SHPObject::panPartStart, ptarray_append_point(), ptarray_construct_empty(), SHPLOADERERR, SHPLOADERMSGLEN, SHPLOADEROK, shp_loader_config::simple_geometries, shp_loader_config::use_wkt, WKB_EXTENDED, WKT_EXTENDED, WKT_PRECISION, POINT4D::x, POINT4D::y, and POINT4D::z.
Referenced by ShpLoaderGenerateSQLRowStatement().
321 LWGEOM **lwmultilinestrings;
325 int u, v, start_vertex, end_vertex;
344 for (u = 0; u < obj->
nParts; u++)
358 for (v = start_vertex; v < end_vertex; v++)
361 point4d.
x = obj->
padfX[v];
362 point4d.
y = obj->
padfY[v];
365 point4d.
z = obj->
padfZ[v];
367 point4d.
m = obj->
padfM[v];
383 lwgeom = lwmultilinestrings[0];
384 lwfree(lwmultilinestrings);
char * lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out)
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
void lwgeom_free(LWGEOM *geom)
#define FLAGS_SET_Z(flags, value)
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE, then a duplicate point will not be added.
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
char message[SHPLOADERMSGLEN]
#define FLAGS_SET_M(flags, value)
LWGEOM * lwcollection_as_lwgeom(const LWCOLLECTION *obj)