OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
include
ossim
vpfutil
vpfview.h
Go to the documentation of this file.
1
/* VPFVIEW.H */
2
3
#ifndef __VPFVIEW_H__
4
#define __VPFVIEW_H__
5
6
#include <stdlib.h>
/* to pick up min/max... */
7
8
#ifdef __cplusplus
9
extern
"C"
{
10
#endif
11
12
#include <
ossim/vpfutil/set.h
>
13
#ifdef __MSDOS__
14
# include "gui.h"
15
#endif
16
#include <
ossim/vpfutil/vpftable.h
>
17
#include <
ossim/vpfutil/linklist.h
>
18
19
#ifdef __MSDOS__
20
typedef
unsigned
char
VPF_BOOLEAN
;
21
#else
22
typedef
unsigned
VPF_BOOLEAN
;
23
#if (!defined(_MSC_VER))
24
# ifndef stricmp
25
# define stricmp(a,b) ossim_strcasecmp(a,b)
26
# endif
27
# ifndef strcmpi
28
# define strcmpi(a,b) ossim_strcasecmp(a, b)
29
# endif
30
# ifndef strncmpi
31
# define strncmpi(a,b,c) ossim_strncasecmp(a,b,c)
32
# endif
33
# ifndef ltoa
34
# define ltoa(l,s,len) sprintf(s,"%d",l)
35
# endif
36
# ifndef itoa
37
# define itoa(i,s,len) sprintf(s,"%d",i)
38
# endif
39
#endif
40
41
#endif
42
43
typedef
char
color_type
;
44
45
46
/* Degree-minutes-seconds type */
47
typedef
struct
{
48
int
degrees
;
49
int
minutes
;
50
float
seconds
;
51
}
dms_type
;
52
53
54
/* Geographic extent */
55
typedef
struct
{
56
float
x1, y1, x2,
y2
;
57
}
extent_type
;
58
59
/* Currently supported VPF versions */
60
typedef
enum
{
VPF_0_7
,
VPF_0_8
}
vpf_version_type
;
61
62
63
/* VPF database internal structure */
64
typedef
struct
{
65
char
name[9];
/* Name of the VPF database */
66
char
*
path
;
/* DOS path name to the database */
67
char
**
library
;
/* Array of library names within the database */
68
int
nlibraries
;
/* Number of libraries in the database */
69
char
*
producer
;
/* Producer of the database - from header table */
70
vpf_version_type
version
;
/* VPF Version of the database */
71
int
byte_order
;
/* Byte order of the database */
72
}
database_type
;
73
74
75
/* VPF coverage internal structure */
76
typedef
struct
{
77
char
name[9];
/* Name of the coverage */
78
char
*
description
;
/* Description of the coverage */
79
char
*
path
;
/* DOS path name to the coverage */
80
int
topolevel
;
/* Topology level of the coverage */
81
}
coverage_type
;
82
83
84
/* VPF feature types */
85
typedef
enum
{
VPF_LINE
=1,
VPF_AREA
,
VPF_ANNO
,
VPF_POINT
,
VPF_COMPLEX_FEATURE
=6 }
vpf_feature_type
;
86
87
/* VPF primitive types */
88
typedef
enum
{
VPF_EDGE
=1,
VPF_FACE
,
VPF_TEXT
,
VPF_ENTITY_NODE
,
VPF_CONNECTED_NODE
}
89
vpf_primitive_type
;
90
91
92
/* Units of measure */
93
typedef
enum
{
VPF_UNKNOWN_UNITS
,
VPF_METERS
,
VPF_SECONDS
,
VPF_FEET
,
VPF_INCHES
,
94
VPF_KILOMETERS
,
VPF_OTHER_UNITS
,
VPF_DEC_DEGREES
}
units_type
;
95
96
97
/* VPF feature class internal structure */
98
typedef
struct
{
99
char
name[40];
/* Name of the feature class */
100
char
*
description
;
/* Description of the feature class */
101
int
coverage
;
/* Containing coverage number */
102
char
*
table
;
/* Feature table name */
103
vpf_primitive_type
primclass
;
/* Primitive class */
104
char
cprim[6];
/* Array of primclasses if primclass=COMPLEX */
105
set_type
view_set
;
/* Themes of the view in this feature class */
106
}
feature_class_type
;
107
108
109
/* VPF library internal structure */
110
typedef
struct
{
111
char
name[9];
/* Name of the library */
112
char
database[9];
/* Name of the containing database */
113
char
*
path
;
/* DOS path name to the library */
114
char
*
description
;
/* Library description */
115
extent_type
extent
;
/* Map extent of the library */
116
char
security[15];
/* Security classification of the library */
117
coverage_type
*
cover
;
/* Coverages within the library */
118
int
ncover
;
/* Number of coverages in the library */
119
feature_class_type
*
fc
;
/* Feature classes within the library */
120
int
nfc
;
/* Number of feature classes in the library */
121
long
int
ntiles
;
/* Number of tiles in the library */
122
set_type
tile_set
;
/* Set of 'active' tiles in the library */
123
double
tileheight
;
/* 'Height' of tile 1 in the library */
124
VPF_BOOLEAN
dec_degrees
;
/* Coordinates in decimal degrees? */
125
char
*
prjname
;
/* Projection name (if not dec_degrees) */
126
units_type
units
;
/* Units of measure (if not dec_degrees) */
127
vpf_version_type
version
;
/* VPF Version of the database */
128
}
library_type
;
129
130
131
/* A theme is a single entry for a view of the database. It can be */
132
/* thought of as a stored query with a description and symbology. */
133
/* Each theme is associated with a feature class. */
134
typedef
struct
{
135
char
*
description
;
/* Description of the theme */
136
char
*
fc
;
/* Feature class name for the theme */
137
int
fcnum
;
/* Theme's feature class number */
138
int
primclass
;
/* Primitive class of the theme */
139
char
*
text_col
;
/* Column to be displayed as text */
140
char
*
expression
;
/* Query expression */
141
int
point_color,
point_symbol
;
/* Point color and symbol */
142
int
line_color,
line_symbol
;
/* Line color and symbol */
143
int
area_color,
area_symbol
;
/* Area color and symbol */
144
int
text_color,
text_symbol
;
/* Text color and symbol */
145
}
theme_type
;
146
147
148
/* View structure. Each view is associated with a particular database */
149
/* and a particular library within that datbase. */
150
typedef
struct
{
151
char
database[9];
/* Database name */
152
char
library[9];
/* Library name */
153
char
name[9];
/* View name */
154
int
nthemes
;
/* Number of themes in the view */
155
theme_type
*
theme
;
/* Array of themes */
156
set_type
selected
;
/* Set of themes selected for display */
157
set_type
displayed
;
/* Set of displayed themes */
158
linked_list_type
sellist
;
/* List of selected themes (ordered) */
159
}
view_type
;
160
161
162
/* Map environment information */
163
typedef
struct
{
164
extent_type
mapextent
;
/* Current map extent */
165
VPF_BOOLEAN
mapchanged
;
/* Flag - has anything changed? */
166
VPF_BOOLEAN
mapdisplayed
;
/* Flag - has the map been displayed? */
167
VPF_BOOLEAN
user_escape
;
/* Flag - has the user hit escape? */
168
VPF_BOOLEAN
study_area_selected
;
/* Flag - study area selected? */
169
VPF_BOOLEAN
latlongrid
;
/* Flag - lat-lon grid to be displayed?*/
170
VPF_BOOLEAN
scale_bar
;
/* Flag - scale bar to be displayed? */
171
#ifdef __MSDOS__
172
window_type scale_bar_window;
/* Window containing the scale bar */
173
#endif
174
int
maptop
;
/* Top y location of the map */
175
int
mapbottom
;
/* Bottom y location of the map */
176
int
projection
;
/* Current projection number */
177
#ifdef __MSDOS__
178
void
far
(*forward_proj)();
/* Forward projection function pointer*/
179
void
far
(*inverse_proj)();
/* Inverse projection function pointer*/
180
#endif
181
}
map_environment_type
;
182
183
184
/* Output devices */
185
#define SCREEN 1
186
#define POSTSCRIPT 2
/* Black and white */
187
#define COLORPS 3
188
#define PRINTER 4
189
190
191
/* Functions: */
192
193
#include <
ossim/vpfutil/vpfmisc.h
>
194
195
set_type
query_table
(
char
*query,
vpf_table_type
table );
196
#ifdef __cplusplus
197
}
198
#endif
199
200
#endif
library_type::prjname
char * prjname
Definition:
vpfview.h:125
theme_type::description
char * description
Definition:
vpfview.h:135
VPF_INCHES
Definition:
vpfview.h:93
database_type::path
char * path
Definition:
vpfview.h:66
library_type::units
units_type units
Definition:
vpfview.h:126
dms_type::seconds
float seconds
Definition:
vpfview.h:50
units_type
units_type
Definition:
vpfview.h:93
library_type::path
char * path
Definition:
vpfview.h:113
dms_type
Definition:
vpfview.h:47
library_type::tileheight
double tileheight
Definition:
vpfview.h:123
map_environment_type::latlongrid
VPF_BOOLEAN latlongrid
Definition:
vpfview.h:169
VPF_BOOLEAN
unsigned VPF_BOOLEAN
Definition:
vpfview.h:22
VPF_POINT
Definition:
vpfview.h:85
view_type::sellist
linked_list_type sellist
Definition:
vpfview.h:158
set.h
coverage_type
Definition:
vpfview.h:76
VPF_CONNECTED_NODE
Definition:
vpfview.h:88
extent_type
Definition:
vpfview.h:55
theme_type::fcnum
int fcnum
Definition:
vpfview.h:137
theme_type::point_symbol
int point_symbol
Definition:
vpfview.h:141
database_type
Definition:
vpfview.h:64
library_type::ncover
int ncover
Definition:
vpfview.h:118
VPF_KILOMETERS
Definition:
vpfview.h:94
library_type::ntiles
long int ntiles
Definition:
vpfview.h:121
database_type::byte_order
int byte_order
Definition:
vpfview.h:71
feature_class_type::primclass
vpf_primitive_type primclass
Definition:
vpfview.h:103
library_type::extent
extent_type extent
Definition:
vpfview.h:115
map_environment_type::projection
int projection
Definition:
vpfview.h:176
VPF_0_7
Definition:
vpfview.h:60
VPF_DEC_DEGREES
Definition:
vpfview.h:94
library_type::cover
coverage_type * cover
Definition:
vpfview.h:117
VPF_0_8
Definition:
vpfview.h:60
view_type::nthemes
int nthemes
Definition:
vpfview.h:154
map_environment_type::mapextent
extent_type mapextent
Definition:
vpfview.h:164
coverage_type::path
char * path
Definition:
vpfview.h:79
map_environment_type
Definition:
vpfview.h:163
theme_type::line_symbol
int line_symbol
Definition:
vpfview.h:142
map_environment_type::mapchanged
VPF_BOOLEAN mapchanged
Definition:
vpfview.h:165
VPF_ANNO
Definition:
vpfview.h:85
VPF_SECONDS
Definition:
vpfview.h:93
map_environment_type::maptop
int maptop
Definition:
vpfview.h:174
library_type::dec_degrees
VPF_BOOLEAN dec_degrees
Definition:
vpfview.h:124
theme_type::expression
char * expression
Definition:
vpfview.h:140
VPF_UNKNOWN_UNITS
Definition:
vpfview.h:93
view_type::selected
set_type selected
Definition:
vpfview.h:156
vpf_primitive_type
vpf_primitive_type
Definition:
vpfview.h:88
vpf_table_type
Definition:
vpftable.h:103
library_type::description
char * description
Definition:
vpfview.h:114
theme_type
Definition:
vpfview.h:134
library_type
Definition:
vpfview.h:110
library_type::tile_set
set_type tile_set
Definition:
vpfview.h:122
feature_class_type::table
char * table
Definition:
vpfview.h:102
far
#define far
Definition:
mapgraph.h:24
database_type::library
char ** library
Definition:
vpfview.h:67
VPF_METERS
Definition:
vpfview.h:93
VPF_EDGE
Definition:
vpfview.h:88
feature_class_type::view_set
set_type view_set
Definition:
vpfview.h:105
library_type::nfc
int nfc
Definition:
vpfview.h:120
view_type::theme
theme_type * theme
Definition:
vpfview.h:155
VPF_AREA
Definition:
vpfview.h:85
VPF_ENTITY_NODE
Definition:
vpfview.h:88
library_type::fc
feature_class_type * fc
Definition:
vpfview.h:119
extent_type::y2
float y2
Definition:
vpfview.h:56
view_type::displayed
set_type displayed
Definition:
vpfview.h:157
vpf_version_type
vpf_version_type
Definition:
vpfview.h:60
VPF_FEET
Definition:
vpfview.h:93
theme_type::primclass
int primclass
Definition:
vpfview.h:138
set_type
Definition:
set.h:14
library_type::version
vpf_version_type version
Definition:
vpfview.h:127
feature_class_type::description
char * description
Definition:
vpfview.h:100
view_type
Definition:
vpfview.h:150
theme_type::fc
char * fc
Definition:
vpfview.h:136
VPF_COMPLEX_FEATURE
Definition:
vpfview.h:85
database_type::nlibraries
int nlibraries
Definition:
vpfview.h:68
database_type::version
vpf_version_type version
Definition:
vpfview.h:70
theme_type::text_symbol
int text_symbol
Definition:
vpfview.h:144
dms_type::minutes
int minutes
Definition:
vpfview.h:49
coverage_type::topolevel
int topolevel
Definition:
vpfview.h:80
theme_type::area_symbol
int area_symbol
Definition:
vpfview.h:143
VPF_FACE
Definition:
vpfview.h:88
linked_list_cell
Definition:
linklist.h:12
feature_class_type::coverage
int coverage
Definition:
vpfview.h:101
feature_class_type
Definition:
vpfview.h:98
database_type::producer
char * producer
Definition:
vpfview.h:69
VPF_LINE
Definition:
vpfview.h:85
map_environment_type::mapdisplayed
VPF_BOOLEAN mapdisplayed
Definition:
vpfview.h:166
dms_type::degrees
int degrees
Definition:
vpfview.h:48
query_table
set_type query_table(char *query, vpf_table_type table)
map_environment_type::mapbottom
int mapbottom
Definition:
vpfview.h:175
VPF_TEXT
Definition:
vpfview.h:88
vpftable.h
map_environment_type::user_escape
VPF_BOOLEAN user_escape
Definition:
vpfview.h:167
vpf_feature_type
vpf_feature_type
Definition:
vpfview.h:85
coverage_type::description
char * description
Definition:
vpfview.h:78
VPF_OTHER_UNITS
Definition:
vpfview.h:94
linklist.h
color_type
char color_type
Definition:
vpfview.h:43
theme_type::text_col
char * text_col
Definition:
vpfview.h:139
map_environment_type::scale_bar
VPF_BOOLEAN scale_bar
Definition:
vpfview.h:170
vpfmisc.h
map_environment_type::study_area_selected
VPF_BOOLEAN study_area_selected
Definition:
vpfview.h:168
Generated on Fri Aug 3 2018 08:46:55 for OSSIM - Open Source Software Image Map by
1.8.14