Uffe Kousgaard wrote:
> This is a question about the object defintion blocks in the MAP file (block
> 2). Where can I find the size of each Object Definition data in the source
> code?
>
> In this document (http://www.routeware.dk/notes.html#bl2) it is described
> for the most common objects such as a shortpoint (type 1) which has length
> &H0A = 10 bytes. But more object types has been added after the document was
> written, such as collections and polygons / polylines with many sections or
> nodes.
>
The .MAP header block starts with an array of sizes for each object type.
mitab_mapheaderblock.cpp contains a copy of that array which is used to
create new files:
/*---------------------------------------------------------------------
* The header block starts with an array of map object lenght constants.
*--------------------------------------------------------------------*/
#define HDR_OBJ_LEN_ARRAY_SIZE 58
static GByte gabyObjLenArray[ HDR_OBJ_LEN_ARRAY_SIZE ] = {
0x00,0x0a,0x0e,0x15,0x0e,0x16,0x1b,0xa2,
0xa6,0xab,0x1a,0x2a,0x2f,0xa5,0xa9,0xb5,
0xa7,0xb5,0xd9,0x0f,0x17,0x23,0x13,0x1f,
0x2b,0x0f,0x17,0x23,0x4f,0x57,0x63,0x9c,
0xa4,0xa9,0xa0,0xa8,0xad,0xa4,0xa8,0xad,
0x16,0x1a,0x39,0x0d,0x11,0x37,0xa5,0xa9,
0xb5,0xa4,0xa8,0xad,0xb2,0xb6,0xdc,0xbd,
0xbd,0xf4 };
To get the size of more recent objects, you could dump the binary
contents of a recent .MAP file, that array starts at the beginning of
the file.
Daniel
--
Daniel Morissette
http://www.mapgears.com/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/mitab/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/mitab/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/