if ( buf_size == 0 )
{
- LWDEBUG(4,"Error calculating output WKB buffer size.");
- lwerror("Error calculating output WKB buffer size.");
+ LWDEBUG(4,"Error calculating output TWKB buffer size.");
+ lwerror("Error calculating output TWKB buffer size.");
return NULL;
}
buf = lwalloc(buf_size);
if ( buf == NULL )
{
- LWDEBUGF(4,"Unable to allocate %d bytes for WKB output buffer.", buf_size);
- lwerror("Unable to allocate %d bytes for WKB output buffer.", buf_size);
+ LWDEBUGF(4,"Unable to allocate %d bytes for TWKB output buffer.", buf_size);
+ lwerror("Unable to allocate %d bytes for TWKB output buffer.", buf_size);
return NULL;
}
/* The buffer pointer should now land at the end of the allocated buffer space. Let's check. */
if ( buf_size != (buf - wkb_out) )
{
- LWDEBUG(4,"Output WKB is not the same size as the allocated buffer.");
- lwerror("Output WKB is not the same size as the allocated buffer.");
+ LWDEBUG(4,"Output TWKB is not the same size as the allocated buffer.");
+ lwerror("Output TWKB is not the same size as the allocated buffer (precalculated size:%d, allocated size:%d)", buf_size, (buf - wkb_out));
lwfree(wkb_out);
return NULL;
}
if ( buf_size == 0 )
{
- LWDEBUG(4,"Error calculating output WKB buffer size.");
- lwerror("Error calculating output WKB buffer size.");
+ LWDEBUG(4,"Error calculating output TWKB buffer size.");
+ lwerror("Error calculating output TWKB buffer size.");
return NULL;
}
/* The buffer pointer should now land at the end of the allocated buffer space. Let's check. */
if ( buf_size != (buf - wkb_out) )
{
- LWDEBUG(4,"Output WKB is not the same size as the allocated buffer.");
- lwerror("Output WKB is not the same size as the allocated buffer.");
+ LWDEBUG(4,"Output TWKB is not the same size as the allocated buffer.");
+ lwerror("Output TWKB is not the same size as the allocated buffer (precalculated size:%d, allocated size:%d)", buf_size, (buf - wkb_out));
lwfree(wkb_out);
return NULL;
}