**SRL** Directly works on the serialized geometries,
uses internal strategies to construct output.
- *EXP* Uses deprecated LWEXPLODED, and LWEXPLODED_serialize()
+ *EXP* Uses LWGEOM_EXPLODED, and lwexploded_serialize()
*LWG* Uses LWGEOM, pglwgeom_serialize()
AUTOCACHE_BBOX is currently used by all functions using *LWG*
-(pglwgeom_serialize entry point). Other functions explicitly
-listed in the AUTOCACHE_BBOX section also use it.
+(pglwgeom_serialize entry point) and *SRL* (PG_LWGEOM_construct
+entry point). Other functions explicitly listed in the AUTOCACHE_BBOX
+section also use it.
[ explicit control ]
BOX2DFLOAT4 box;
PG_LWGEOM *result;
+ /* COMPUTE_BBOX FOR_COMPLEX_GEOMS */
+ if ( is_worth_caching_pglwgeom_bbox(ser) )
+ {
+ // if ( ! wantbbox ) elog(NOTICE, "PG_LWGEOM_construct forced wantbbox=1 due to rule FOR_COMPLEX_GEOMS");
+ wantbbox=1;
+ }
+
size = lwgeom_size(ser);
eptr = ser+size; // end of subgeom
lwexploded_serialize(LWGEOM_EXPLODED *exploded, int wantbbox)
{
int sizecom = 0;
- int size = lwexploded_findlength(exploded, wantbbox);
- char *result = lwalloc(size);
+ int size;
+ char *result;
+
+ size = lwexploded_findlength(exploded, wantbbox);
+ result = lwalloc(size);
lwexploded_serialize_buf(exploded, wantbbox, result, &sizecom);
#ifdef DEBUG
lwnotice("lwexploded_serialize: findlength:%d, serialize_buf:%d", size, sizecom);