forked from MelissaData/GeoObject-Python3-Wrappers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmdGeo_pythoncode.pyi
203 lines (172 loc) · 6.84 KB
/
mdGeo_pythoncode.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
import enum
from typing import TypeAlias, Literal
import deprecated
InputParameterKey: TypeAlias = Literal[
'MAK',
'AddressKey',
'Zip',
'Plus4',
'Latitude',
'Longitude',
]
# noinspection SpellCheckingInspection
OutputParameterKey: TypeAlias = Literal[
'BlockSuffix',
'CBSAcode',
'CBSATitle',
'CBSALevel',
'CBSADivisionCode',
'CBSADivisionTitle',
'CBSADivisionLevel',
'CensusBlock',
'CensusKey',
'CensusKeyDecennial',
'CensusTract',
'CountyFips',
'CountyName',
'CountySubdivisionCode',
'CountySubdivisionName',
'ElementarySchoolDistrictCode',
'ElementarySchoolDistrictName',
'Latitude',
'Longitude',
'LSAD',
'PlaceCode',
'PlaceName',
'Results',
'SecondarySchoolDistrictCode',
'SecondarySchoolDistrictName',
'StateDistrictLower',
'StateDistrictUpper',
'TimeZone',
'TimeZoneCode',
'UnifiedSchoolDistrictCode',
'UnifiedSchoolDistrictName',
]
# mdGeo IntEnumerations
class ProgramStatus(enum.IntEnum):
ErrorNone = 0
ErrorOther = 1
ErrorOutOfMemory = 2
ErrorRequiredFileNotFound = 3
ErrorFoundOldFile = 4
ErrorDatabaseExpired = 5
ErrorLicenseExpired = 6
class AccessType(enum.IntEnum):
Local = 0
Remote = 1
class DiacriticsMode(enum.IntEnum):
Auto = 0
On = 1
Off = 2
class StandardizeMode(enum.IntEnum):
ShortFormat = 0
LongFormat = 1
AutoFormat = 2
class SuiteParseMode(enum.IntEnum):
ParseSuite = 0
CombineSuite = 1
class AliasPreserveMode(enum.IntEnum):
ConvertAlias = 0
PreserveAlias = 1
class AutoCompletionMode(enum.IntEnum):
AutoCompleteSingleSuite = 0
AutoCompleteRangedSuite = 1
AutoCompletePlaceHolderSuite = 2
AutoCompleteNoSuite = 3
class ResultCdDescOpt(enum.IntEnum):
ResultCodeDescriptionLong = 0
ResultCodeDescriptionShort = 1
class MailboxLookupMode(enum.IntEnum):
MailboxNone = 0
MailboxExpress = 1
MailboxPremium = 2
# noinspection PyPep8Naming
class mdGeo:
"""
Melissa has documentation spread uniquely across multiple subdomains:
* https://docs.melissa.com/on-premise-api/geocoder-object/geocoder-object-reference-guide.html
* https://wiki.melissadata.com/index.php?title=GeoCoder_Object
* https://www.melissa.com/reference-guides/geocoder-object
"""
def SetPathToGeoCodeDataFiles(self, p1: str) -> None: ...
def SetPathToGeoPointDataFiles(self, p1: str) -> None: ...
def SetPathToGeoCanadaDataFiles(self, p1: str) -> None: ...
def SetLicenseString(self, License: str) -> None: ...
def InitializeDataFiles(self) -> ProgramStatus: ...
def GetInitializeErrorString(self) -> str: ...
def GetBuildNumber(self) -> str: ...
def GetDatabaseDate(self) -> str: ...
def GetExpirationDate(self) -> str: ...
def GetLicenseExpirationDate(self) -> str: ...
def GetLastUsageLogMessage(self) -> str: ...
def WriteToLogFile(self, logFile: str) -> bool: ...
# These functions have bugs in Melissa's implementation.
def ComputeDistance(self, Latitude1: str, Longitude1: str, Latitude2: str, Longitude2: str) -> str: ...
def ComputeBearing(self, Latitude1: str, Longitude1: str, Latitude2: str, Longitude2: str) -> str: ...
def SetInputParameter(self, key: InputParameterKey, val: str) -> str: ...
def FindGeo(self) -> None: ...
def GetOutputParameter(self, key: OutputParameterKey) -> str: ...
def GetResults(self) -> str: ...
def GetResultCodeDescription(
self, resultCode: str, opt: ResultCdDescOpt = ResultCdDescOpt.ResultCodeDescriptionLong
) -> str: ...
# These methods aren't deprecated in the documentation, but they should be.
def GetCensusKey(self) -> str: ...
def GetCountySubdivisionCode(self) -> str: ...
def GetCountySubdivisionName(self) -> str: ...
def GetElementarySchoolDistrictCode(self) -> str: ...
def GetElementarySchoolDistrictName(self) -> str: ...
def GetSecondarySchoolDistrictCode(self) -> str: ...
def GetSecondarySchoolDistrictName(self) -> str: ...
def GetStateDistrictLower(self) -> str: ...
def GetStateDistrictUpper(self) -> str: ...
def GetUnifiedSchoolDistrictCode(self) -> str: ...
def GetUnifiedSchoolDistrictName(self) -> str: ...
def GetBlockSuffix(self) -> str: ...
@deprecated.deprecated(reason='Use FindGeo instead.')
def GeoCode(self, Zip: str, Plus4: str) -> ProgramStatus: ...
@deprecated.deprecated(reason='Use FindGeo instead.')
def GeoPoint(self, Zip: str, Plus4: str, DeliveryPointCode: str) -> ProgramStatus: ... # deprecated
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCBSACode(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCBSADivisionCode(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCBSADivisionLevel(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCBSADivisionTitle(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCBSALevel(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCBSATitle(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCensusBlock(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCensusTract(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCountyFips(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetCountyName(self) -> str: ...
@deprecated.deprecated(reason='Use GetResults instead.')
def GetErrorCode(self) -> str: ... # deprecated
@deprecated.deprecated(reason='Use GetResults instead.')
def GetLatitude(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetLongitude(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetPlaceCode(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetPlaceName(self) -> str: ...
@deprecated.deprecated(reason='Use GetResults instead.')
def GetStatusCode(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetTimeZone(self) -> str: ...
@deprecated.deprecated(reason='Use GetOutputParameter instead.')
def GetTimeZoneCode(self) -> str: ...
@deprecated.deprecated(reason='Use InitializeDataFiles instead.')
def Initialize(self, DataPath: str, IndexPath: str) -> ProgramStatus: ...
@deprecated.deprecated(reason='Use SetInputParameter instead.')
def SetLatitude(self, latitude: str) -> None: ...
@deprecated.deprecated(reason='Use SetInputParameter instead.')
def SetLongitude(self, longitude: str) -> None: ...