NAME
addIndexEntry - Adds a tile to the cache and index
SYNOPSIS
#include "topo/index.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int addIndexEntry
(
int x,
int y,
char typ,
char zone,
const char *buf,
int buflen
);
PARAMETERS
-
int x
-
Tile-size easting of location added to index
-
int y
-
Tile-size northing of location added to index
-
char typ
-
Tileset type of this tile
-
char zone
-
UTM zone of location
-
const char *buf
-
buffer containing tile image data
-
int buflen
-
length of buffer 'buf'
DESCRIPTION
Adds tile specified to MapsXX.dat, MapIndex.dat, and the Index.
Index is in memory. Doubles fileIndex if necessary.
Creates new MapsXX.dat if current one is over 625MB.
This and all file cache functions are NOT reentrant, because they access
static structures.
RETURNS
On success, returns value in 'buflen' otherwise -1.
FIXME
This function is liable to leak resources.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Scott Morris
DOCUMENTER
Andrew Predoehl
SEE ALSO
initIndexFile
,
closeIndexFile
,
findTileOnDisk
,
getTileFromDisk
,
invalidateEntry