1 /**********************************************************************/
2 /* Common include file for epp and dgt file access */
3 /**********************************************************************/
7 /* attempt to make epp.c portable to machines with non-intel CPU */
9 /* if defined, get_row and put_row thinks, that least significant byte
10 is first in int variable */
12 /* Area unit definition */
13 # define AREA_NO_UNIT 0
14 # define AREA_SQ_FOOT 1
15 # define AREA_SQ_METER 2
17 # define AREA_SQ_MILE 4
18 # define AREA_HECTARE 5
21 /* Coordinate system definition */
24 # define COORD_STPLANE 2
27 /* values for mode field of EPP */
32 # define MAP_MODIFIED 128
33 /* this structure defines 128-byte header of EPP file.
34 it assumes that all numeric types are in Intel format
35 short - 16-bit, lsb first,
36 long 32-bit, lsb first
37 double - 64-bit IEEE conforming */
38 typedef struct EPPHEADER { short int fr,lr,fc,lc;/* last and first row/column */
39 double fry,lry,fcx,lcx;/*corresponding alternative
41 short int kind;/* 8 or 16 bit file */
43 unsigned short int offsite; /* blank class */
44 double sfact; /* cell area */
45 long access_ptr; /* file offset of width table */
46 unsigned short minclass, maxclass; /* class limits. unused in
51 char date[16], time[8];/* ASCII date and time */
52 char comment[32]; } EPPHEADER;
53 typedef struct DGTHEADER {double xleft,ybottom,xright,ytop;
62 short swapshort(short x);
63 long swaplong(long x);
64 double swapdouble(double x);
66 # define swapshort(x) (x)
67 # define swaplong(x) (x)
68 # define swapdouble(x) (x)
73 /* Here is the end of this file */