138 for (i=0; i < mgeom->
ngeoms; i++)
144 for (k=0; k < np ; k++)
163 if (i < (mgeom->
ngeoms - 1) )
181 for (i=0; i<psur->
ngeoms; i++)
184 for (l=0; l < patch->
nrings; l++)
187 for (k=0; k < np ; k++)
196 if (l < (patch->
nrings - 1) )
209 if (i < (psur->
ngeoms - 1) )
250 for (i=0; i<poly->
nrings; i++)
284 x3dtype =
"PointSet";
285 if ( dimension == 2 ){
286 x3dtype =
"Polypoint2D";
294 x3dtype =
"IndexedLineSet";
300 x3dtype =
"IndexedFaceSet";
316 for (i=0; i<col->
ngeoms; i++)
318 subgeom = col->
geoms[i];
361 for (i=0; i<psur->
ngeoms; i++)
365 for (k=0; k < np ; k++)
373 if (i < (psur->
ngeoms - 1) )
385 for (i=0; i<psur->
ngeoms; i++)
388 if (i < (psur->
ngeoms - 1) )
411 for (i=0; i<tin->
ngeoms; i++)
414 if (i < (tin->
ngeoms - 1) )
424 for (i=0; i<tin->
ngeoms; i++)
428 if (i < (tin->
ngeoms - 1) )
448 #ifdef PGIS_X3D_OUTERMOST_TAGS
452 for (i=0; i<col->
ngeoms; i++)
454 subgeom = col->
geoms[i];
486 lwerror(
"asx3d3_collection_buf: unknown geometry type");
492 #ifdef PGIS_X3D_OUTERMOST_TAGS
514 if ( !is_closed || i < (pa->
npoints - 1) )
538 if ( !is_closed || i < (pa->
npoints - 1) )
LWGEOM * lwgeom_as_multi(const LWGEOM *lwgeom)
Create a new LWGEOM of the appropriate MULTI* type.
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
#define LW_X3D_FLIP_XY
Macros for specifying X3D options.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
int lwgeom_is_collection(const LWGEOM *lwgeom)
Determine whether a LWGEOM can contain sub-geometries or not.
#define POLYHEDRALSURFACETYPE
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
void lwcollection_free(LWCOLLECTION *col)
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
void * lwalloc(size_t size)
#define X3D_USE_GEOCOORDS(x)
int lwline_is_closed(const LWLINE *line)
#define OUT_DOUBLE_BUFFER_SIZE
int lwprint_double(double d, int maxdd, char *buf, size_t bufsize)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static int asx3d3_tin_sb(const LWTIN *tin, __attribute__((__unused__)) char *srs, int precision, int opts, const char *defid, stringbuffer_t *sb)
static int asx3d3_psurface_sb(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *defid, stringbuffer_t *sb)
static int asx3d3_triangle_sb(const LWTRIANGLE *triangle, __attribute__((__unused__)) char *srs, int precision, int opts, __attribute__((__unused__)) const char *defid, stringbuffer_t *sb)
char * lwgeom_to_x3d3(const LWGEOM *geom, char *srs, int precision, int opts, const char *defid)
static int lwgeom_to_x3d3_sb(const LWGEOM *geom, char *srs, int precision, int opts, const char *defid, stringbuffer_t *sb)
static int ptarray_to_x3d3_sb(POINTARRAY *pa, int precision, int opts, int is_closed, stringbuffer_t *sb)
In X3D3, coordinates are separated by a space separator.
static int asx3d3_collection_sb(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid, stringbuffer_t *sb)
static int asx3d3_mpoly_coordindex_sb(const LWMPOLY *psur, stringbuffer_t *sb)
static int asx3d3_line_coords_sb(const LWLINE *line, int precision, int opts, stringbuffer_t *sb)
static int asx3d3_point_sb(const LWPOINT *point, __attribute__((__unused__)) char *srs, int precision, int opts, __attribute__((__unused__)) const char *defid, stringbuffer_t *sb)
static int asx3d3_mline_coordindex_sb(const LWMLINE *mgeom, stringbuffer_t *sb)
static int asx3d3_poly_sb(const LWPOLY *poly, __attribute__((__unused__)) char *srs, int precision, int opts, __attribute__((__unused__)) int is_patch, __attribute__((__unused__)) const char *defid, stringbuffer_t *sb)
Compute the X3D coordinates of the polygon and add to string buffer.
static int asx3d3_multi_sb(const LWCOLLECTION *col, __attribute__((__unused__)) char *srs, int precision, int opts, const char *defid, stringbuffer_t *sb)
static int asx3d3_line_sb(const LWLINE *line, __attribute__((__unused__)) char *srs, int precision, int opts, __attribute__((__unused__)) const char *defid, stringbuffer_t *sb)
Return the linestring as an X3D LineSet.
int stringbuffer_aprintf(stringbuffer_t *s, const char *fmt,...)
Appends a formatted string to the current string buffer, using the format and argument list provided.
stringbuffer_t * stringbuffer_create(void)
Allocate a new stringbuffer_t.
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
void stringbuffer_destroy(stringbuffer_t *s)
Free the stringbuffer_t and all memory managed within it.
char * stringbuffer_getstringcopy(stringbuffer_t *s)
Returns a newly allocated string large enough to contain the current state of the string.