@memberjunction/core-entities 5.23.0 → 5.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom/MJUserViewEntityExtended.d.ts +4 -314
- package/dist/custom/MJUserViewEntityExtended.d.ts.map +1 -1
- package/dist/custom/MJUserViewEntityExtended.js +5 -5
- package/dist/custom/MJUserViewEntityExtended.js.map +1 -1
- package/dist/engines/FileStorageEngine.d.ts +21 -5
- package/dist/engines/FileStorageEngine.d.ts.map +1 -1
- package/dist/engines/FileStorageEngine.js +24 -4
- package/dist/engines/FileStorageEngine.js.map +1 -1
- package/dist/engines/GeoDataEngine.d.ts +141 -0
- package/dist/engines/GeoDataEngine.d.ts.map +1 -0
- package/dist/engines/GeoDataEngine.js +425 -0
- package/dist/engines/GeoDataEngine.js.map +1 -0
- package/dist/engines/InstanceConfigEngine.d.ts +105 -0
- package/dist/engines/InstanceConfigEngine.d.ts.map +1 -0
- package/dist/engines/InstanceConfigEngine.js +198 -0
- package/dist/engines/InstanceConfigEngine.js.map +1 -0
- package/dist/engines/SearchEngineBase.d.ts +76 -0
- package/dist/engines/SearchEngineBase.d.ts.map +1 -0
- package/dist/engines/SearchEngineBase.js +141 -0
- package/dist/engines/SearchEngineBase.js.map +1 -0
- package/dist/engines/UserInfoEngine.d.ts +15 -1
- package/dist/engines/UserInfoEngine.d.ts.map +1 -1
- package/dist/engines/UserInfoEngine.js +45 -0
- package/dist/engines/UserInfoEngine.js.map +1 -1
- package/dist/engines/artifacts.d.ts +13 -0
- package/dist/engines/artifacts.d.ts.map +1 -1
- package/dist/engines/artifacts.js +25 -0
- package/dist/engines/artifacts.js.map +1 -1
- package/dist/engines/knowledgeHubMetadata.d.ts +1 -6
- package/dist/engines/knowledgeHubMetadata.d.ts.map +1 -1
- package/dist/engines/knowledgeHubMetadata.js +0 -17
- package/dist/engines/knowledgeHubMetadata.js.map +1 -1
- package/dist/generated/entity_subclasses.d.ts +3803 -109
- package/dist/generated/entity_subclasses.d.ts.map +1 -1
- package/dist/generated/entity_subclasses.js +5756 -1038
- package/dist/generated/entity_subclasses.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileStorageEngine.js","sourceRoot":"","sources":["../../src/engines/FileStorageEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyD,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAWpD
|
|
1
|
+
{"version":3,"file":"FileStorageEngine.js","sourceRoot":"","sources":["../../src/engines/FileStorageEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyD,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAWpD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,qBAAsB,SAAQ,UAAiC;IAA5E;;QAUY,cAAS,GAAiC,EAAE,CAAC;QAC7C,eAAU,GAAkC,EAAE,CAAC;IAkH3D,CAAC;IA5HG;;;;OAIG;IACI,MAAM,KAAK,QAAQ;QACtB,OAAO,KAAK,CAAC,WAAW,EAAyB,CAAC;IACtD,CAAC;IAKD;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAAC,YAAsB,EAAE,WAAsB,EAAE,QAA4B;QAC5F,MAAM,OAAO,GAAwC;YACjD;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,2BAA2B;gBACvC,YAAY,EAAE,WAAW;gBACzB,UAAU,EAAE,IAAI;aACnB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,4BAA4B;gBACxC,YAAY,EAAE,YAAY;gBAC1B,UAAU,EAAE,IAAI;aACnB;SACJ,CAAC;QACF,MAAM,IAAI,CAAC,IAA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CAAC,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACI,gBAAgB,CAAC,IAAY;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAAC,UAAkB;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACI,sBAAsB,CAAC,SAAiB;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IACjC,CAAC;CACJ"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { BaseEngine, IMetadataProvider, UserInfo } from "@memberjunction/core";
|
|
2
|
+
import { MJCountryEntity, MJStateProvinceEntity } from "../generated/entity_subclasses.js";
|
|
3
|
+
/**
|
|
4
|
+
* Result of a point-in-polygon resolution.
|
|
5
|
+
*/
|
|
6
|
+
export interface GeoPointResolution {
|
|
7
|
+
/** The matched country, if any */
|
|
8
|
+
Country: MJCountryEntity | undefined;
|
|
9
|
+
/** The matched state/province, if any */
|
|
10
|
+
State: MJStateProvinceEntity | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* GeoDataEngine provides cached, in-memory access to Country and StateProvince
|
|
14
|
+
* reference data. Loaded once at startup via @RegisterForStartup, all lookups
|
|
15
|
+
* are O(1) via pre-built Maps keyed by common lookup patterns.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const engine = GeoDataEngine.Instance;
|
|
20
|
+
* const country = engine.GetCountryByISO2('US');
|
|
21
|
+
* const state = engine.GetStateByCode('US-country-id', 'CO');
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class GeoDataEngine extends BaseEngine<GeoDataEngine> {
|
|
25
|
+
static get Instance(): GeoDataEngine;
|
|
26
|
+
private _countries;
|
|
27
|
+
private _stateProvinces;
|
|
28
|
+
private _countriesByISO2;
|
|
29
|
+
private _countriesByISO3;
|
|
30
|
+
private _countriesByName;
|
|
31
|
+
private _countriesById;
|
|
32
|
+
private _statesByCountryAndCode;
|
|
33
|
+
private _statesByCountryAndName;
|
|
34
|
+
private _statesById;
|
|
35
|
+
private _countryGeometries;
|
|
36
|
+
private _stateGeometries;
|
|
37
|
+
/** Maps countryId → array of state geometries for that country */
|
|
38
|
+
private _stateGeometriesByCountry;
|
|
39
|
+
Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
|
|
40
|
+
protected AdditionalLoading(_contextUser?: UserInfo): Promise<void>;
|
|
41
|
+
get Countries(): MJCountryEntity[];
|
|
42
|
+
get StateProvinces(): MJStateProvinceEntity[];
|
|
43
|
+
GetCountryByISO2(iso2: string): MJCountryEntity | undefined;
|
|
44
|
+
GetCountryByISO3(iso3: string): MJCountryEntity | undefined;
|
|
45
|
+
GetCountryByName(name: string): MJCountryEntity | undefined;
|
|
46
|
+
GetCountryById(id: string): MJCountryEntity | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Resolve a country from a text value that could be a name, ISO2, or ISO3 code.
|
|
49
|
+
* Tries ISO2 first (most common), then ISO3, then name match.
|
|
50
|
+
*/
|
|
51
|
+
ResolveCountry(value: string): MJCountryEntity | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Look up a state/province by its Code within a specific country.
|
|
54
|
+
* @param countryId - The country's UUID
|
|
55
|
+
* @param code - The state/province code (e.g., "CO", "ON", "NSW")
|
|
56
|
+
*/
|
|
57
|
+
GetStateByCode(countryId: string, code: string): MJStateProvinceEntity | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Look up a state/province by its Name within a specific country.
|
|
60
|
+
* @param countryId - The country's UUID
|
|
61
|
+
* @param name - The state/province name (e.g., "Colorado", "Ontario")
|
|
62
|
+
*/
|
|
63
|
+
GetStateByName(countryId: string, name: string): MJStateProvinceEntity | undefined;
|
|
64
|
+
GetStateById(id: string): MJStateProvinceEntity | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Resolve a state/province from a text value within a country.
|
|
67
|
+
* Tries code first, then name match.
|
|
68
|
+
*/
|
|
69
|
+
ResolveState(countryId: string, value: string): MJStateProvinceEntity | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Resolve a lat/lng coordinate to its containing country and state/province
|
|
72
|
+
* using point-in-polygon testing against cached BoundaryGeoJSON data.
|
|
73
|
+
* No text matching — purely geometric.
|
|
74
|
+
*
|
|
75
|
+
* @param lat - Latitude (-90 to 90)
|
|
76
|
+
* @param lng - Longitude (-180 to 180)
|
|
77
|
+
* @returns The matched country and state/province, or undefined for each if no match
|
|
78
|
+
*/
|
|
79
|
+
ResolvePointToLocation(lat: number, lng: number): GeoPointResolution;
|
|
80
|
+
/**
|
|
81
|
+
* Resolve a lat/lng coordinate to its containing country.
|
|
82
|
+
* Uses bounding-box pre-filtering then ray-casting point-in-polygon.
|
|
83
|
+
*/
|
|
84
|
+
ResolvePointToCountry(lat: number, lng: number): MJCountryEntity | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Resolve a lat/lng coordinate to its containing state/province within a known country.
|
|
87
|
+
* If countryId is not provided, resolves the country first.
|
|
88
|
+
*/
|
|
89
|
+
ResolvePointToState(lat: number, lng: number, countryId?: string): MJStateProvinceEntity | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Batch-resolve multiple lat/lng points in parallel.
|
|
92
|
+
* Each point is resolved independently — ideal for choropleth grouping.
|
|
93
|
+
*
|
|
94
|
+
* @param points - Array of {lat, lng} coordinates
|
|
95
|
+
* @returns Array of GeoPointResolution in the same order as input
|
|
96
|
+
*/
|
|
97
|
+
ResolvePoints(points: {
|
|
98
|
+
lat: number;
|
|
99
|
+
lng: number;
|
|
100
|
+
}[]): GeoPointResolution[];
|
|
101
|
+
/**
|
|
102
|
+
* Test if a point falls inside a CachedGeometry (bbox pre-filter + ray-casting).
|
|
103
|
+
*/
|
|
104
|
+
private pointInCachedGeometry;
|
|
105
|
+
/**
|
|
106
|
+
* Check if a point is inside a bounding box.
|
|
107
|
+
* BBox format: [minLng, minLat, maxLng, maxLat]
|
|
108
|
+
*/
|
|
109
|
+
private pointInBBox;
|
|
110
|
+
/**
|
|
111
|
+
* Ray-casting point-in-polygon for a polygon with rings.
|
|
112
|
+
* First ring is the outer boundary (must be inside).
|
|
113
|
+
* Subsequent rings are holes (must NOT be inside).
|
|
114
|
+
*/
|
|
115
|
+
private pointInPolygonRings;
|
|
116
|
+
/**
|
|
117
|
+
* Ray-casting algorithm: cast a horizontal ray from the point eastward,
|
|
118
|
+
* count how many polygon edges it crosses. Odd = inside.
|
|
119
|
+
* Coordinates are [lng, lat] pairs (GeoJSON convention).
|
|
120
|
+
*/
|
|
121
|
+
private rayCast;
|
|
122
|
+
/**
|
|
123
|
+
* Parse all BoundaryGeoJSON data and build indexed geometry caches.
|
|
124
|
+
* Called once during AdditionalLoading after entities are loaded.
|
|
125
|
+
*/
|
|
126
|
+
private buildGeometryCaches;
|
|
127
|
+
/**
|
|
128
|
+
* Parse a BoundaryGeoJSON value into a CachedGeometry.
|
|
129
|
+
* Supports GeoJSON Feature, Polygon, and MultiPolygon types.
|
|
130
|
+
* Returns null if the boundary is missing or unparseable.
|
|
131
|
+
*/
|
|
132
|
+
private parseEntityBoundary;
|
|
133
|
+
/**
|
|
134
|
+
* Parse a single Polygon's coordinate rings and compute its bounding box.
|
|
135
|
+
* GeoJSON Polygon coordinates: [ outerRing, ...holeRings ]
|
|
136
|
+
* Each ring is an array of [lng, lat] pairs.
|
|
137
|
+
*/
|
|
138
|
+
private parsePolygonCoordinates;
|
|
139
|
+
private buildLookupMaps;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=GeoDataEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoDataEngine.d.ts","sourceRoot":"","sources":["../../src/engines/GeoDataEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,iBAAiB,EAAE,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AAEpH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AA0BxF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,kCAAkC;IAClC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAC;IACrC,yCAAyC;IACzC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC5C;AAED;;;;;;;;;;;GAWG;AACH,qBACa,aAAc,SAAQ,UAAU,CAAC,aAAa,CAAC;IACxD,WAAkB,QAAQ,IAAI,aAAa,CAE1C;IAED,OAAO,CAAC,UAAU,CAAyB;IAC3C,OAAO,CAAC,eAAe,CAA+B;IAGtD,OAAO,CAAC,gBAAgB,CAAsC;IAC9D,OAAO,CAAC,gBAAgB,CAAsC;IAC9D,OAAO,CAAC,gBAAgB,CAAsC;IAC9D,OAAO,CAAC,cAAc,CAAsC;IAC5D,OAAO,CAAC,uBAAuB,CAA4C;IAC3E,OAAO,CAAC,uBAAuB,CAA4C;IAC3E,OAAO,CAAC,WAAW,CAA4C;IAG/D,OAAO,CAAC,kBAAkB,CAAwB;IAClD,OAAO,CAA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E,MAAM,GAAG,eAAe,GAAG,SAAS;IASnF;;;OAGG;IACI,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAmB3G;;;;;;OAMG;IACI,aAAa,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,kBAAkB,EAAE;IAQlF;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAY7B;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;;;OAIG;IACH,OAAO,CAAC,OAAO;IAqBf;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAqC3B;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAqC3B;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAuB/B,OAAO,CAAC,eAAe;CA2B1B"}
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BaseEngine, LogStatus } from "@memberjunction/core";
|
|
8
|
+
import { RegisterForStartup } from "@memberjunction/core";
|
|
9
|
+
/**
|
|
10
|
+
* GeoDataEngine provides cached, in-memory access to Country and StateProvince
|
|
11
|
+
* reference data. Loaded once at startup via @RegisterForStartup, all lookups
|
|
12
|
+
* are O(1) via pre-built Maps keyed by common lookup patterns.
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const engine = GeoDataEngine.Instance;
|
|
17
|
+
* const country = engine.GetCountryByISO2('US');
|
|
18
|
+
* const state = engine.GetStateByCode('US-country-id', 'CO');
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
let GeoDataEngine = class GeoDataEngine extends BaseEngine {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this._countries = [];
|
|
25
|
+
this._stateProvinces = [];
|
|
26
|
+
// Pre-built lookup Maps for O(1) access
|
|
27
|
+
this._countriesByISO2 = new Map();
|
|
28
|
+
this._countriesByISO3 = new Map();
|
|
29
|
+
this._countriesByName = new Map();
|
|
30
|
+
this._countriesById = new Map();
|
|
31
|
+
this._statesByCountryAndCode = new Map();
|
|
32
|
+
this._statesByCountryAndName = new Map();
|
|
33
|
+
this._statesById = new Map();
|
|
34
|
+
// Pre-parsed geometry caches for point-in-polygon testing
|
|
35
|
+
this._countryGeometries = [];
|
|
36
|
+
this._stateGeometries = [];
|
|
37
|
+
/** Maps countryId → array of state geometries for that country */
|
|
38
|
+
this._stateGeometriesByCountry = new Map();
|
|
39
|
+
}
|
|
40
|
+
static get Instance() {
|
|
41
|
+
return super.getInstance();
|
|
42
|
+
}
|
|
43
|
+
async Config(forceRefresh, contextUser, provider) {
|
|
44
|
+
const configs = [
|
|
45
|
+
{
|
|
46
|
+
Type: 'entity',
|
|
47
|
+
EntityName: 'MJ: Countries',
|
|
48
|
+
PropertyName: '_countries',
|
|
49
|
+
CacheLocal: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
Type: 'entity',
|
|
53
|
+
EntityName: 'MJ: State Provinces',
|
|
54
|
+
PropertyName: '_stateProvinces',
|
|
55
|
+
CacheLocal: true,
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
await this.Load(configs, provider, forceRefresh, contextUser);
|
|
59
|
+
}
|
|
60
|
+
async AdditionalLoading(_contextUser) {
|
|
61
|
+
this.buildLookupMaps();
|
|
62
|
+
this.buildGeometryCaches();
|
|
63
|
+
}
|
|
64
|
+
// ================================================================
|
|
65
|
+
// Cached data getters
|
|
66
|
+
// ================================================================
|
|
67
|
+
get Countries() {
|
|
68
|
+
return this._countries || [];
|
|
69
|
+
}
|
|
70
|
+
get StateProvinces() {
|
|
71
|
+
return this._stateProvinces || [];
|
|
72
|
+
}
|
|
73
|
+
// ================================================================
|
|
74
|
+
// Country lookups — all O(1)
|
|
75
|
+
// ================================================================
|
|
76
|
+
GetCountryByISO2(iso2) {
|
|
77
|
+
if (!iso2)
|
|
78
|
+
return undefined;
|
|
79
|
+
return this._countriesByISO2.get(iso2.trim().toUpperCase());
|
|
80
|
+
}
|
|
81
|
+
GetCountryByISO3(iso3) {
|
|
82
|
+
if (!iso3)
|
|
83
|
+
return undefined;
|
|
84
|
+
return this._countriesByISO3.get(iso3.trim().toUpperCase());
|
|
85
|
+
}
|
|
86
|
+
GetCountryByName(name) {
|
|
87
|
+
if (!name)
|
|
88
|
+
return undefined;
|
|
89
|
+
return this._countriesByName.get(name.trim().toLowerCase());
|
|
90
|
+
}
|
|
91
|
+
GetCountryById(id) {
|
|
92
|
+
if (!id)
|
|
93
|
+
return undefined;
|
|
94
|
+
return this._countriesById.get(id.toLowerCase());
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Resolve a country from a text value that could be a name, ISO2, or ISO3 code.
|
|
98
|
+
* Tries ISO2 first (most common), then ISO3, then name match.
|
|
99
|
+
*/
|
|
100
|
+
ResolveCountry(value) {
|
|
101
|
+
if (!value)
|
|
102
|
+
return undefined;
|
|
103
|
+
const trimmed = value.trim();
|
|
104
|
+
// Try ISO2 (2-char codes like "US", "GB")
|
|
105
|
+
if (trimmed.length === 2) {
|
|
106
|
+
const byISO2 = this.GetCountryByISO2(trimmed);
|
|
107
|
+
if (byISO2)
|
|
108
|
+
return byISO2;
|
|
109
|
+
}
|
|
110
|
+
// Try ISO3 (3-char codes like "USA", "GBR")
|
|
111
|
+
if (trimmed.length === 3) {
|
|
112
|
+
const byISO3 = this.GetCountryByISO3(trimmed);
|
|
113
|
+
if (byISO3)
|
|
114
|
+
return byISO3;
|
|
115
|
+
}
|
|
116
|
+
// Try name match
|
|
117
|
+
return this.GetCountryByName(trimmed);
|
|
118
|
+
}
|
|
119
|
+
// ================================================================
|
|
120
|
+
// State/Province lookups — all O(1)
|
|
121
|
+
// ================================================================
|
|
122
|
+
/**
|
|
123
|
+
* Look up a state/province by its Code within a specific country.
|
|
124
|
+
* @param countryId - The country's UUID
|
|
125
|
+
* @param code - The state/province code (e.g., "CO", "ON", "NSW")
|
|
126
|
+
*/
|
|
127
|
+
GetStateByCode(countryId, code) {
|
|
128
|
+
if (!countryId || !code)
|
|
129
|
+
return undefined;
|
|
130
|
+
const key = `${countryId.toLowerCase()}|${code.trim().toUpperCase()}`;
|
|
131
|
+
return this._statesByCountryAndCode.get(key);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Look up a state/province by its Name within a specific country.
|
|
135
|
+
* @param countryId - The country's UUID
|
|
136
|
+
* @param name - The state/province name (e.g., "Colorado", "Ontario")
|
|
137
|
+
*/
|
|
138
|
+
GetStateByName(countryId, name) {
|
|
139
|
+
if (!countryId || !name)
|
|
140
|
+
return undefined;
|
|
141
|
+
const key = `${countryId.toLowerCase()}|${name.trim().toLowerCase()}`;
|
|
142
|
+
return this._statesByCountryAndName.get(key);
|
|
143
|
+
}
|
|
144
|
+
GetStateById(id) {
|
|
145
|
+
if (!id)
|
|
146
|
+
return undefined;
|
|
147
|
+
return this._statesById.get(id.toLowerCase());
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Resolve a state/province from a text value within a country.
|
|
151
|
+
* Tries code first, then name match.
|
|
152
|
+
*/
|
|
153
|
+
ResolveState(countryId, value) {
|
|
154
|
+
if (!countryId || !value)
|
|
155
|
+
return undefined;
|
|
156
|
+
const byCode = this.GetStateByCode(countryId, value);
|
|
157
|
+
if (byCode)
|
|
158
|
+
return byCode;
|
|
159
|
+
return this.GetStateByName(countryId, value);
|
|
160
|
+
}
|
|
161
|
+
// ================================================================
|
|
162
|
+
// Point-in-polygon resolution — coordinate-based lookups
|
|
163
|
+
// ================================================================
|
|
164
|
+
/**
|
|
165
|
+
* Resolve a lat/lng coordinate to its containing country and state/province
|
|
166
|
+
* using point-in-polygon testing against cached BoundaryGeoJSON data.
|
|
167
|
+
* No text matching — purely geometric.
|
|
168
|
+
*
|
|
169
|
+
* @param lat - Latitude (-90 to 90)
|
|
170
|
+
* @param lng - Longitude (-180 to 180)
|
|
171
|
+
* @returns The matched country and state/province, or undefined for each if no match
|
|
172
|
+
*/
|
|
173
|
+
ResolvePointToLocation(lat, lng) {
|
|
174
|
+
const country = this.ResolvePointToCountry(lat, lng);
|
|
175
|
+
const state = country ? this.ResolvePointToState(lat, lng, country.ID) : undefined;
|
|
176
|
+
return { Country: country, State: state };
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Resolve a lat/lng coordinate to its containing country.
|
|
180
|
+
* Uses bounding-box pre-filtering then ray-casting point-in-polygon.
|
|
181
|
+
*/
|
|
182
|
+
ResolvePointToCountry(lat, lng) {
|
|
183
|
+
for (const geom of this._countryGeometries) {
|
|
184
|
+
if (this.pointInCachedGeometry(lat, lng, geom)) {
|
|
185
|
+
return this._countriesById.get(geom.entityId);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Resolve a lat/lng coordinate to its containing state/province within a known country.
|
|
192
|
+
* If countryId is not provided, resolves the country first.
|
|
193
|
+
*/
|
|
194
|
+
ResolvePointToState(lat, lng, countryId) {
|
|
195
|
+
let resolvedCountryId = countryId?.toLowerCase();
|
|
196
|
+
if (!resolvedCountryId) {
|
|
197
|
+
const country = this.ResolvePointToCountry(lat, lng);
|
|
198
|
+
if (!country)
|
|
199
|
+
return undefined;
|
|
200
|
+
resolvedCountryId = country.ID.toLowerCase();
|
|
201
|
+
}
|
|
202
|
+
const stateGeoms = this._stateGeometriesByCountry.get(resolvedCountryId);
|
|
203
|
+
if (!stateGeoms)
|
|
204
|
+
return undefined;
|
|
205
|
+
for (const geom of stateGeoms) {
|
|
206
|
+
if (this.pointInCachedGeometry(lat, lng, geom)) {
|
|
207
|
+
return this._statesById.get(geom.entityId);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return undefined;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Batch-resolve multiple lat/lng points in parallel.
|
|
214
|
+
* Each point is resolved independently — ideal for choropleth grouping.
|
|
215
|
+
*
|
|
216
|
+
* @param points - Array of {lat, lng} coordinates
|
|
217
|
+
* @returns Array of GeoPointResolution in the same order as input
|
|
218
|
+
*/
|
|
219
|
+
ResolvePoints(points) {
|
|
220
|
+
return points.map(p => this.ResolvePointToLocation(p.lat, p.lng));
|
|
221
|
+
}
|
|
222
|
+
// ================================================================
|
|
223
|
+
// Private — point-in-polygon geometry
|
|
224
|
+
// ================================================================
|
|
225
|
+
/**
|
|
226
|
+
* Test if a point falls inside a CachedGeometry (bbox pre-filter + ray-casting).
|
|
227
|
+
*/
|
|
228
|
+
pointInCachedGeometry(lat, lng, geom) {
|
|
229
|
+
// Fast rejection via overall bounding box
|
|
230
|
+
if (!this.pointInBBox(lat, lng, geom.bbox))
|
|
231
|
+
return false;
|
|
232
|
+
// Test each polygon (MultiPolygon support)
|
|
233
|
+
for (const poly of geom.polygons) {
|
|
234
|
+
if (!this.pointInBBox(lat, lng, poly.bbox))
|
|
235
|
+
continue;
|
|
236
|
+
if (this.pointInPolygonRings(lat, lng, poly.rings))
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Check if a point is inside a bounding box.
|
|
243
|
+
* BBox format: [minLng, minLat, maxLng, maxLat]
|
|
244
|
+
*/
|
|
245
|
+
pointInBBox(lat, lng, bbox) {
|
|
246
|
+
return lng >= bbox[0] && lat >= bbox[1] && lng <= bbox[2] && lat <= bbox[3];
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Ray-casting point-in-polygon for a polygon with rings.
|
|
250
|
+
* First ring is the outer boundary (must be inside).
|
|
251
|
+
* Subsequent rings are holes (must NOT be inside).
|
|
252
|
+
*/
|
|
253
|
+
pointInPolygonRings(lat, lng, rings) {
|
|
254
|
+
if (rings.length === 0)
|
|
255
|
+
return false;
|
|
256
|
+
// Must be inside the outer ring
|
|
257
|
+
if (!this.rayCast(lat, lng, rings[0]))
|
|
258
|
+
return false;
|
|
259
|
+
// Must NOT be inside any hole
|
|
260
|
+
for (let i = 1; i < rings.length; i++) {
|
|
261
|
+
if (this.rayCast(lat, lng, rings[i]))
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
return true;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Ray-casting algorithm: cast a horizontal ray from the point eastward,
|
|
268
|
+
* count how many polygon edges it crosses. Odd = inside.
|
|
269
|
+
* Coordinates are [lng, lat] pairs (GeoJSON convention).
|
|
270
|
+
*/
|
|
271
|
+
rayCast(lat, lng, ring) {
|
|
272
|
+
let inside = false;
|
|
273
|
+
const n = ring.length;
|
|
274
|
+
for (let i = 0, j = n - 1; i < n; j = i++) {
|
|
275
|
+
const xi = ring[i][0], yi = ring[i][1]; // lng, lat of vertex i
|
|
276
|
+
const xj = ring[j][0], yj = ring[j][1]; // lng, lat of vertex j
|
|
277
|
+
// Check if the ray crosses this edge
|
|
278
|
+
if ((yi > lat) !== (yj > lat) &&
|
|
279
|
+
lng < (xj - xi) * (lat - yi) / (yj - yi) + xi) {
|
|
280
|
+
inside = !inside;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return inside;
|
|
284
|
+
}
|
|
285
|
+
// ================================================================
|
|
286
|
+
// Private — geometry cache building
|
|
287
|
+
// ================================================================
|
|
288
|
+
/**
|
|
289
|
+
* Parse all BoundaryGeoJSON data and build indexed geometry caches.
|
|
290
|
+
* Called once during AdditionalLoading after entities are loaded.
|
|
291
|
+
*/
|
|
292
|
+
buildGeometryCaches() {
|
|
293
|
+
this._countryGeometries = [];
|
|
294
|
+
this._stateGeometries = [];
|
|
295
|
+
this._stateGeometriesByCountry.clear();
|
|
296
|
+
let countryParsed = 0;
|
|
297
|
+
let stateParsed = 0;
|
|
298
|
+
// Parse country boundaries
|
|
299
|
+
for (const country of this._countries) {
|
|
300
|
+
const geom = this.parseEntityBoundary(country.ID, country.BoundaryGeoJSON);
|
|
301
|
+
if (geom) {
|
|
302
|
+
this._countryGeometries.push(geom);
|
|
303
|
+
countryParsed++;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// Parse state/province boundaries, indexed by country
|
|
307
|
+
for (const state of this._stateProvinces) {
|
|
308
|
+
const geom = this.parseEntityBoundary(state.ID, state.BoundaryGeoJSON);
|
|
309
|
+
if (geom) {
|
|
310
|
+
this._stateGeometries.push(geom);
|
|
311
|
+
stateParsed++;
|
|
312
|
+
const countryKey = state.CountryID.toLowerCase();
|
|
313
|
+
let arr = this._stateGeometriesByCountry.get(countryKey);
|
|
314
|
+
if (!arr) {
|
|
315
|
+
arr = [];
|
|
316
|
+
this._stateGeometriesByCountry.set(countryKey, arr);
|
|
317
|
+
}
|
|
318
|
+
arr.push(geom);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
LogStatus(`GeoDataEngine: parsed ${countryParsed} country and ${stateParsed} state/province boundaries for point-in-polygon`);
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Parse a BoundaryGeoJSON value into a CachedGeometry.
|
|
325
|
+
* Supports GeoJSON Feature, Polygon, and MultiPolygon types.
|
|
326
|
+
* Returns null if the boundary is missing or unparseable.
|
|
327
|
+
*/
|
|
328
|
+
parseEntityBoundary(entityId, boundaryGeoJSON) {
|
|
329
|
+
if (!boundaryGeoJSON)
|
|
330
|
+
return null;
|
|
331
|
+
try {
|
|
332
|
+
const raw = typeof boundaryGeoJSON === 'string' ? JSON.parse(boundaryGeoJSON) : boundaryGeoJSON;
|
|
333
|
+
const geometry = raw.type === 'Feature' ? raw.geometry : raw;
|
|
334
|
+
if (!geometry || !geometry.coordinates)
|
|
335
|
+
return null;
|
|
336
|
+
const polygons = [];
|
|
337
|
+
if (geometry.type === 'Polygon') {
|
|
338
|
+
const parsed = this.parsePolygonCoordinates(geometry.coordinates);
|
|
339
|
+
if (parsed)
|
|
340
|
+
polygons.push(parsed);
|
|
341
|
+
}
|
|
342
|
+
else if (geometry.type === 'MultiPolygon') {
|
|
343
|
+
for (const polyCoords of geometry.coordinates) {
|
|
344
|
+
const parsed = this.parsePolygonCoordinates(polyCoords);
|
|
345
|
+
if (parsed)
|
|
346
|
+
polygons.push(parsed);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
if (polygons.length === 0)
|
|
350
|
+
return null;
|
|
351
|
+
// Compute overall bounding box across all polygons
|
|
352
|
+
const overallBbox = [
|
|
353
|
+
Math.min(...polygons.map(p => p.bbox[0])),
|
|
354
|
+
Math.min(...polygons.map(p => p.bbox[1])),
|
|
355
|
+
Math.max(...polygons.map(p => p.bbox[2])),
|
|
356
|
+
Math.max(...polygons.map(p => p.bbox[3]))
|
|
357
|
+
];
|
|
358
|
+
return { entityId: entityId.toLowerCase(), polygons, bbox: overallBbox };
|
|
359
|
+
}
|
|
360
|
+
catch {
|
|
361
|
+
return null;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Parse a single Polygon's coordinate rings and compute its bounding box.
|
|
366
|
+
* GeoJSON Polygon coordinates: [ outerRing, ...holeRings ]
|
|
367
|
+
* Each ring is an array of [lng, lat] pairs.
|
|
368
|
+
*/
|
|
369
|
+
parsePolygonCoordinates(coordinates) {
|
|
370
|
+
if (!coordinates || coordinates.length === 0)
|
|
371
|
+
return null;
|
|
372
|
+
let minLng = Infinity, minLat = Infinity, maxLng = -Infinity, maxLat = -Infinity;
|
|
373
|
+
// Compute bbox from the outer ring (first ring)
|
|
374
|
+
for (const point of coordinates[0]) {
|
|
375
|
+
if (point[0] < minLng)
|
|
376
|
+
minLng = point[0];
|
|
377
|
+
if (point[1] < minLat)
|
|
378
|
+
minLat = point[1];
|
|
379
|
+
if (point[0] > maxLng)
|
|
380
|
+
maxLng = point[0];
|
|
381
|
+
if (point[1] > maxLat)
|
|
382
|
+
maxLat = point[1];
|
|
383
|
+
}
|
|
384
|
+
return {
|
|
385
|
+
rings: coordinates,
|
|
386
|
+
bbox: [minLng, minLat, maxLng, maxLat]
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
// ================================================================
|
|
390
|
+
// Private — build O(1) lookup maps
|
|
391
|
+
// ================================================================
|
|
392
|
+
buildLookupMaps() {
|
|
393
|
+
this._countriesByISO2.clear();
|
|
394
|
+
this._countriesByISO3.clear();
|
|
395
|
+
this._countriesByName.clear();
|
|
396
|
+
this._countriesById.clear();
|
|
397
|
+
this._statesByCountryAndCode.clear();
|
|
398
|
+
this._statesByCountryAndName.clear();
|
|
399
|
+
this._statesById.clear();
|
|
400
|
+
for (const c of this._countries) {
|
|
401
|
+
if (c.ISO2)
|
|
402
|
+
this._countriesByISO2.set(c.ISO2.trim().toUpperCase(), c);
|
|
403
|
+
if (c.ISO3)
|
|
404
|
+
this._countriesByISO3.set(c.ISO3.trim().toUpperCase(), c);
|
|
405
|
+
if (c.Name)
|
|
406
|
+
this._countriesByName.set(c.Name.trim().toLowerCase(), c);
|
|
407
|
+
this._countriesById.set(c.ID.toLowerCase(), c);
|
|
408
|
+
}
|
|
409
|
+
for (const s of this._stateProvinces) {
|
|
410
|
+
const countryKey = s.CountryID.toLowerCase();
|
|
411
|
+
if (s.Code) {
|
|
412
|
+
this._statesByCountryAndCode.set(`${countryKey}|${s.Code.trim().toUpperCase()}`, s);
|
|
413
|
+
}
|
|
414
|
+
if (s.Name) {
|
|
415
|
+
this._statesByCountryAndName.set(`${countryKey}|${s.Name.trim().toLowerCase()}`, s);
|
|
416
|
+
}
|
|
417
|
+
this._statesById.set(s.ID.toLowerCase(), s);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
GeoDataEngine = __decorate([
|
|
422
|
+
RegisterForStartup()
|
|
423
|
+
], GeoDataEngine);
|
|
424
|
+
export { GeoDataEngine };
|
|
425
|
+
//# sourceMappingURL=GeoDataEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoDataEngine.js","sourceRoot":"","sources":["../../src/engines/GeoDataEngine.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAyD,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAqC1D;;;;;;;;;;;GAWG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAyB;IAArD;;QAKK,eAAU,GAAsB,EAAE,CAAC;QACnC,oBAAe,GAA4B,EAAE,CAAC;QAEtD,wCAAwC;QAChC,qBAAgB,GAAG,IAAI,GAAG,EAA2B,CAAC;QACtD,qBAAgB,GAAG,IAAI,GAAG,EAA2B,CAAC;QACtD,qBAAgB,GAAG,IAAI,GAAG,EAA2B,CAAC;QACtD,mBAAc,GAAG,IAAI,GAAG,EAA2B,CAAC;QACpD,4BAAuB,GAAG,IAAI,GAAG,EAAiC,CAAC;QACnE,4BAAuB,GAAG,IAAI,GAAG,EAAiC,CAAC;QACnE,gBAAW,GAAG,IAAI,GAAG,EAAiC,CAAC;QAE/D,0DAA0D;QAClD,uBAAkB,GAAqB,EAAE,CAAC;QAC1C,qBAAgB,GAAqB,EAAE,CAAC;QAChD,kEAAkE;QAC1D,8BAAyB,GAAG,IAAI,GAAG,EAA4B,CA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