====== Attributes map file ====== The L3DT //attributes map file// (AMF) stores the land type of each pixel in the height map. The 'amf.gz' extension indicates the AMF file has been compressed using the gzip algorithm. The data is preceded by a 10-byte header containing the following information: ^ Field name ^ Contents ^ Length^ Offset ^ Purpose ^ | ASCII marker | "L3DT" | 4 | 0 | Tells L3DT and humans that this is an L3DT file. Note string is not null terminated. | | Binary marker | USHORT | 2 | 4 | Tells L3DT what type of map file this is. Must be 520 for AMF. | | Map width | USHORT | 2 | 6 | East-west extent of the map (number of pixels). | | Map height | USHORT | 2 | 8 | North-south extent of the map (number of pixels). | The map data itself has two bytes per pixel, the first being 'land type ID' and the second being 'climate ID'. The pixels are ordered in rows going west-to-east, with south-to-north row-order. The climate ID value indicates the ID number of the relevant climate within the group climate list (which you can find in the //Climates// section of the [[l3dt:formats:specs:proj|project file]]). The land type ID indicates the ID number of the land type in that climate (see //LandTypeList// section of the [[l3dt:formats:specs:cli.xml|climate file]]). You also can get the combined 2-byte values using the [[l3dt:userguide:ops:am#exporting_the_type_list|export type list]] option. ===== Addenda for L3DT v2.8 and later ===== In L3DT v2.8 and later versions, the AMF file contains an additional list of climate names after the map data. This extra data consist of: * A 32-bit integer for the number of climates. * Then, for each climate: * A 32-bit integer for the climate name length. * The climate name, the length of which is given by the preceding integer. The string is not null-terminated. This additional data is optional, and can be safely omitted or ignored.