41 try { stream->
getBytes((
U8*)signature, 4); }
catch(...)
43 fprintf(stderr,
"ERROR (LASspatialReadWrite): reading signature\n");
46 if (strncmp(signature,
"LASS", 4) != 0)
48 fprintf(stderr,
"ERROR (LASspatialReadWrite): wrong signature %4s instead of 'LASS'\n", signature);
52 try { stream->
getBytes((
U8*)&type, 4); }
catch(...)
54 fprintf(stderr,
"ERROR (LASspatialReadWrite): reading type\n");
61 if (!spatial->
read(stream))
70 fprintf(stderr,
"ERROR (LASspatialReadWrite): unknown type %u\n", type);
80 fprintf(stderr,
"ERROR (LASspatialReadWrite): writing signature\n");
86 fprintf(stderr,
"ERROR (LASspatialReadWrite): writing type %u\n", type);
89 return spatial->
write(stream);
virtual BOOL putBytes(const U8 *bytes, U32 num_bytes)=0
#define LAS_SPATIAL_QUAD_TREE
BOOL write(const LASspatial *spatial, ByteStreamOut *stream) const
virtual void getBytes(U8 *bytes, const U32 num_bytes)=0
virtual BOOL read(ByteStreamIn *stream)=0
virtual BOOL put32bitsLE(const U8 *bytes)=0
LASspatial * read(ByteStreamIn *stream) const
virtual BOOL write(ByteStreamOut *stream) const =0