source: trunk/include/ewdb_ora_api_misc.h @ 5054

Revision 3471, 4.6 KB checked in by paulf, 10 years ago (diff)

oracle surgery additions

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1
2/*
3 *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE
4 *   CHECKED IT OUT USING THE COMMAND CHECKOUT.
5 *
6 *    $Id$
7 *
8 *    Revision history:
9 *     $Log$
10 *     Revision 1.1  2008/12/02 21:37:42  paulf
11 *     oracle surgery additions
12 *
13 *     Revision 1.3  2004/12/01 20:51:33  mark
14 *     Additional polygon functions
15 *
16 *     Revision 1.2  2004/11/23 17:27:24  mark
17 *     Added polygon structs and prototypes
18 *
19 *     Revision 1.1  2003/05/20 20:57:10  lucky
20 *     Initial revision
21 *
22 *
23 *
24 */
25
26
27/*******************************************************
28 *
29 * This include file contains only the structure
30 * definitions and function prototypes for the misc
31 * subschema.   
32 *
33 * This file should never be included in an application
34 * program.  Instead, include the master include file
35 * ewdb_ora_api.h
36 *
37 *    Lucky Vidmar, May 20, 2003
38 *
39 *******************************************************/
40
41#ifndef _EWDB_ORA_API_MISC_H
42#define _EWDB_ORA_API_MISC_H
43
44
45
46/**********************************************************
47 #########################################################
48    Struct Definition Section
49 #########################################################
50**********************************************************/
51
52
53/***************************** NEAREST TOWN SECTION *****************************/
54
55/************************************************
56************ SPECIAL FORMATTED COMMENT **********
57EW5 API FORMATTED COMMENT
58TYPE TYPEDEF
59
60LIBRARY  EWDB_API_LIB
61
62SUB_LIBRARY MISC_API
63
64LANGUAGE C
65
66LOCATION THIS_FILE
67
68TYPEDEF EWDB_PlaceStruct
69TYPE_DEFINITION struct _EWDB_PlaceStruct
70DESCRIPTION Towns and Places structure
71
72MEMBER idPlace
73MEMBER_TYPE EWDBid
74MEMBER_DESCRIPTION Database ID for the place.
75
76MEMBER szState
77MEMBER_TYPE char[3]
78MEMBER_DESCRIPTION two-letter State code
79
80MEMBER szPlaceName
81MEMBER_TYPE char[70]
82MEMBER_DESCRIPTION  Name of the place
83
84MEMBER szPlaceType
85MEMBER_TYPE char[20]
86MEMBER_DESCRIPTION  Type of the place
87
88MEMBER szCountry
89MEMBER_TYPE char[30]
90MEMBER_DESCRIPTION  Country of the place
91
92MEMBER szCounty
93MEMBER_TYPE char[30]
94MEMBER_DESCRIPTION  County of the place
95
96MEMBER dLat
97MEMBER_TYPE double
98MEMBER_DESCRIPTION  Latitude
99
100MEMBER dLon
101MEMBER_TYPE double
102MEMBER_DESCRIPTION  Longitude
103
104MEMBER dElev
105MEMBER_TYPE double
106MEMBER_DESCRIPTION  Elevation
107
108MEMBER iPopulation
109MEMBER_TYPE int
110MEMBER_DESCRIPTION  Population
111
112MEMBER iPlaceMajorType
113MEMBER_TYPE int
114MEMBER_DESCRIPTION  Major Type (City, Dam, etc...)
115
116MEMBER iPlaceMinorType
117MEMBER_TYPE int
118MEMBER_DESCRIPTION  Minor Type (large city, small city...)
119
120*************************************************
121************************************************/
122typedef struct _EWDB_PlaceStruct
123{
124        int    idPlace;
125        char   szState[3];
126        char   szPlaceName[70];
127        char   szPlaceType[20];
128        char   szCounty[30];
129        char   szCountry[30];
130        double dLat;
131        double dLon;
132        double dElev;
133        int    iPopulation;
134        int    iPlaceMajorType;
135        int    iPlaceMinorType;
136
137        /* These are not in the DB, but are filled upon retrieval and
138                comparisson with the origin */
139        double dDist;
140        double dAzm;
141}  EWDB_PlaceStruct;
142
143
144#define EWDB_PLACE_TYPE_GENERIC_CITY    1
145
146#define EWDB_CITY_TYPE_UNKNOWN          0
147#define EWDB_CITY_TYPE_CDP              5
148#define EWDB_CITY_TYPE_CITY             4
149#define EWDB_CITY_TYPE_LARGE_CITY       3
150#define EWDB_CITY_TYPE_METROPOLIS       2
151#define EWDB_CITY_TYPE_MEGALOPOLIS  1
152
153
154/*****************************  POLYGON SECTION *****************************/
155
156
157typedef struct _EWDB_PolygonStruct
158{
159        EWDBid idPolygon;
160        char   szPolygonName[1024];
161} EWDB_PolygonStruct;
162
163
164typedef struct _EWDB_PolygonVertexStruct
165{
166        EWDBid idVertex;
167        EWDBid idPolygon;
168        double dLat;
169        double dLon;
170        int    iOrder;
171} EWDB_PolygonVertexStruct;
172
173
174/**********************************************************
175 #########################################################
176    Function Prototype Section
177 #########################################################
178**********************************************************/
179
180/* TO COMMENT */
181int ewdb_api_CreatePlace (EWDB_PlaceStruct *pPlace);
182int ewdb_api_GetPlaceList (EWDB_PlaceStruct *pBuffer, int BufferLen,
183                EWDB_PlaceStruct *pMinPlace, EWDB_PlaceStruct *pMaxPlace, 
184                int *pNumRet, int *pNumFound);
185
186int ewdb_api_CreatePolygonVert(EWDB_PolygonVertexStruct *pPolygonVert);
187int ewdb_api_CreatePolygon(EWDB_PolygonStruct *pPolygon);
188int ewdb_api_GetPolygonVertices(EWDBid idPolygon, EWDB_PolygonVertexStruct *pBuffer,
189                              int *pNumFound, int *pNumRetrieved, int BufferLen);
190int ewdb_api_GetPolygons(EWDB_PolygonStruct *pBuffer,
191                              int *pNumFound, int *pNumRetrieved, int BufferLen);
192int ewdb_api_DeletePolygon(EWDBid idPolygon);
193
194#endif _EWDB_ORA_API_MISC_H
195
Note: See TracBrowser for help on using the repository browser.