@tmlmobilidade/go-types-locations 20260828.1636.54

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/base.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This type represents the base location type,
3
+ * both for the geojson feature and the flattened codebase type.
4
+ */
5
+ export interface BaseLocation<T> {
6
+ _id: string;
7
+ geometry: GeoJSON.Feature<GeoJSON.Polygon>;
8
+ properties: T;
9
+ }
package/dist/base.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/census.js ADDED
@@ -0,0 +1,212 @@
1
+ // /**
2
+ // * This type represents the properties of a Census,
3
+ // * both for the geojson feature and the flattened codebase type.
4
+ // */
5
+ // export interface CensusProperties {
6
+ // DT21: string
7
+ // DTMN21: string
8
+ // DTMNFR21: string
9
+ // DTMNFRSEC21: string
10
+ // fid: number
11
+ // N_ADP_1OU2_PESSOAS: number
12
+ // N_ADP_3OU4_PESSOAS: number
13
+ // N_ADP_5EMAIS_PESSOAS: number
14
+ // N_AGREGADOS_DOMESTICOS_PRIVADOS: number
15
+ // N_AGREGADOS_INSTITUCIONAIS: number
16
+ // N_ALOJAMENTOS_COLECTIVOS: number
17
+ // N_ALOJAMENTOS_FAM_CLASS_RES_SECUNDARIA: number
18
+ // N_ALOJAMENTOS_FAM_CLASS_VAGOS_OUTR_MOTIVOS: number
19
+ // N_ALOJAMENTOS_FAM_CLASS_VAGOS_VEND_ARRE: number
20
+ // N_ALOJAMENTOS_FAM_CLASSICOS: number
21
+ // N_ALOJAMENTOS_FAM_N_CLASSICOS: number
22
+ // N_ALOJAMENTOS_FAMILIARES: number
23
+ // N_ALOJAMENTOS_TOTAL: number
24
+ // N_ALOJAMENTOS_VAGOS_TOTAL: number
25
+ // N_CLASSICOS_RES_HABITUAL: number
26
+ // N_EDIFICIOS_1OU2_PISOS: number
27
+ // N_EDIFICIOS_3OU4_PISOS: number
28
+ // N_EDIFICIOS_5OU_MAIS_PISOS: number
29
+ // N_EDIFICIOS_CLASSICOS: number
30
+ // N_EDIFICIOS_CLASSICOS_1OU2_ALOJ: number
31
+ // N_EDIFICIOS_CLASSICOS_3OUMAIS_ALOJ: 0
32
+ // N_EDIFICIOS_CLASSICOS_OUTRO: number
33
+ // N_EDIFICIOS_COM_ELEVADOR: number
34
+ // N_EDIFICIOS_COM_NEC_REPARACAO: number
35
+ // N_EDIFICIOS_COM_NEC_REPARACAO_LIGEIRAS: number
36
+ // N_EDIFICIOS_COM_NEC_REPARACAO_MEDIAS: number
37
+ // N_EDIFICIOS_COM_NEC_REPARACAO_PROFUNDAS: number
38
+ // N_EDIFICIOS_CONSTR_1919A1945: number
39
+ // N_EDIFICIOS_CONSTR_1946A1960: number
40
+ // N_EDIFICIOS_CONSTR_1961A1980: number
41
+ // N_EDIFICIOS_CONSTR_1981A1990: number
42
+ // N_EDIFICIOS_CONSTR_1991A2000: number
43
+ // N_EDIFICIOS_CONSTR_2001A2005: number
44
+ // N_EDIFICIOS_CONSTR_2006A2010: number
45
+ // N_EDIFICIOS_CONSTR_2011A2015: number
46
+ // N_EDIFICIOS_CONSTR_2016A2021: number
47
+ // N_EDIFICIOS_CONSTR_ANTES_1919: number
48
+ // N_EDIFICIOS_EXCLUS_RESIDENCIAL: number
49
+ // N_EDIFICIOS_PINCIPAL_NAO_RESIDENCIAL: number
50
+ // N_EDIFICIOS_PINCIPAL_RESIDENCIAL: number
51
+ // N_EDIFICIOS_SEM_ELEVADOR: number
52
+ // N_EDIFICIOS_SEM_NEC_REPARACAO: number
53
+ // N_INDIVIDUO_ENSINCOMP_1BAS: number
54
+ // N_INDIVIDUO_ENSINCOMP_1BAS_H: number
55
+ // N_INDIVIDUO_ENSINCOMP_1BAS_M: number
56
+ // N_INDIVIDUO_ENSINCOMP_2BAS: number
57
+ // N_INDIVIDUO_ENSINCOMP_2BAS_H: number
58
+ // N_INDIVIDUO_ENSINCOMP_2BAS_M: number
59
+ // N_INDIVIDUO_ENSINCOMP_3BAS: number
60
+ // N_INDIVIDUO_ENSINCOMP_3BAS_H: number
61
+ // N_INDIVIDUO_ENSINCOMP_3BAS_M: number
62
+ // N_INDIVIDUO_ENSINCOMP_NENHUM: number
63
+ // N_INDIVIDUO_ENSINCOMP_NENHUM_H: number
64
+ // N_INDIVIDUO_ENSINCOMP_NENHUM_M: number
65
+ // N_INDIVIDUO_ENSINCOMP_SEC_E_POSSEC: number
66
+ // N_INDIVIDUO_ENSINCOMP_SEC_E_POSSEC_H: number
67
+ // N_INDIVIDUO_ENSINCOMP_SEC_E_POSSEC_M: number
68
+ // N_INDIVIDUO_ENSINCOMP_SUP: number
69
+ // N_INDIVIDUO_ENSINCOMP_SUP_H: number
70
+ // N_INDIVIDUO_ENSINCOMP_SUP_M: number
71
+ // N_INDIVIDUOS: number
72
+ // N_INDIVIDUOS_0A4: number
73
+ // N_INDIVIDUOS_0A4_H: number
74
+ // N_INDIVIDUOS_0A4_M: number
75
+ // N_INDIVIDUOS_0A14: number
76
+ // N_INDIVIDUOS_0A14_H: number
77
+ // N_INDIVIDUOS_0A14_M: number
78
+ // N_INDIVIDUOS_5A9: number
79
+ // N_INDIVIDUOS_5A9_H: number
80
+ // N_INDIVIDUOS_5A9_M: number
81
+ // N_INDIVIDUOS_10A14: number
82
+ // N_INDIVIDUOS_10A14_H: number
83
+ // N_INDIVIDUOS_10A14_M: number
84
+ // N_INDIVIDUOS_15A19: number
85
+ // N_INDIVIDUOS_15A19_H: number
86
+ // N_INDIVIDUOS_15A19_M: number
87
+ // N_INDIVIDUOS_15A24: number
88
+ // N_INDIVIDUOS_15A24_H: number
89
+ // N_INDIVIDUOS_15A24_M: number
90
+ // N_INDIVIDUOS_20A24: number
91
+ // N_INDIVIDUOS_20A24_H: number
92
+ // N_INDIVIDUOS_20A24_M: number
93
+ // N_INDIVIDUOS_25A29: number
94
+ // N_INDIVIDUOS_25A29_H: number
95
+ // N_INDIVIDUOS_25A29_M: number
96
+ // N_INDIVIDUOS_25A64: number
97
+ // N_INDIVIDUOS_25A64_H: number
98
+ // N_INDIVIDUOS_25A64_M: number
99
+ // N_INDIVIDUOS_30A34: number
100
+ // N_INDIVIDUOS_30A34_H: number
101
+ // N_INDIVIDUOS_30A34_M: number
102
+ // N_INDIVIDUOS_35A39: number
103
+ // N_INDIVIDUOS_35A39_H: number
104
+ // N_INDIVIDUOS_35A39_M: number
105
+ // N_INDIVIDUOS_40A44: number
106
+ // N_INDIVIDUOS_40A44_H: number
107
+ // N_INDIVIDUOS_40A44_M: number
108
+ // N_INDIVIDUOS_45A49: number
109
+ // N_INDIVIDUOS_45A49_H: number
110
+ // N_INDIVIDUOS_45A49_M: number
111
+ // N_INDIVIDUOS_50A54: number
112
+ // N_INDIVIDUOS_50A54_H: number
113
+ // N_INDIVIDUOS_50A54_M: number
114
+ // N_INDIVIDUOS_55A59: number
115
+ // N_INDIVIDUOS_55A59_H: number
116
+ // N_INDIVIDUOS_55A59_M: number
117
+ // N_INDIVIDUOS_60A64: number
118
+ // N_INDIVIDUOS_60A64_H: number
119
+ // N_INDIVIDUOS_60A64_M: number
120
+ // N_INDIVIDUOS_65_OU_MAIS: number
121
+ // N_INDIVIDUOS_65_OU_MAIS_H: number
122
+ // N_INDIVIDUOS_65_OU_MAIS_M: number
123
+ // N_INDIVIDUOS_65A69: number
124
+ // N_INDIVIDUOS_65A69_H: number
125
+ // N_INDIVIDUOS_65A69_M: number
126
+ // N_INDIVIDUOS_70A74: number
127
+ // N_INDIVIDUOS_70A74_H: number
128
+ // N_INDIVIDUOS_70A74_M: number
129
+ // N_INDIVIDUOS_75_OU_MAIS: number
130
+ // N_INDIVIDUOS_75_OU_MAIS_H: number
131
+ // N_INDIVIDUOS_75_OU_MAIS_M: number
132
+ // N_INDIVIDUOS_COM_ATIVIDADE_ECONOMICA: number
133
+ // N_INDIVIDUOS_COM_ATIVIDADE_ECONOMICA_H: number
134
+ // N_INDIVIDUOS_COM_ATIVIDADE_ECONOMICA_M: number
135
+ // N_INDIVIDUOS_DESEMPREGADOS_1EMP: number
136
+ // N_INDIVIDUOS_DESEMPREGADOS_1EMP_H: number
137
+ // N_INDIVIDUOS_DESEMPREGADOS_1EMP_M: number
138
+ // N_INDIVIDUOS_DESEMPREGADOS_NOVOEMP: number
139
+ // N_INDIVIDUOS_DESEMPREGADOS_NOVOEMP_H: number
140
+ // N_INDIVIDUOS_DESEMPREGADOS_NOVOEMP_M: number
141
+ // N_INDIVIDUOS_DOMESTICOS: number
142
+ // N_INDIVIDUOS_DOMESTICOS_H: number
143
+ // N_INDIVIDUOS_DOMESTICOS_M: number
144
+ // N_INDIVIDUOS_EMPREG_SECT_PRIM: number
145
+ // N_INDIVIDUOS_EMPREG_SECT_PRIM_H: number
146
+ // N_INDIVIDUOS_EMPREG_SECT_PRIM_M: number
147
+ // N_INDIVIDUOS_EMPREG_SECT_SEC: number
148
+ // N_INDIVIDUOS_EMPREG_SECT_SEC_H: number
149
+ // N_INDIVIDUOS_EMPREG_SECT_SEC_M: number
150
+ // N_INDIVIDUOS_EMPREG_SECT_TERC: number
151
+ // N_INDIVIDUOS_EMPREG_SECT_TERC_H: number
152
+ // N_INDIVIDUOS_EMPREG_SECT_TERC_M: number
153
+ // N_INDIVIDUOS_EMPREGADOS: number
154
+ // N_INDIVIDUOS_EMPREGADOS_H: number
155
+ // N_INDIVIDUOS_EMPREGADOS_M: number
156
+ // N_INDIVIDUOS_ESTUDANTES: number
157
+ // N_INDIVIDUOS_ESTUDANTES_H: number
158
+ // N_INDIVIDUOS_ESTUDANTES_M: number
159
+ // N_INDIVIDUOS_H: number
160
+ // N_INDIVIDUOS_M: number
161
+ // N_INDIVIDUOS_NAC_ESTRANGEIRA: number
162
+ // N_INDIVIDUOS_NAC_ESTRANGEIRA_H: number
163
+ // N_INDIVIDUOS_NAC_ESTRANGEIRA_M: number
164
+ // N_INDIVIDUOS_REFORMADOS: number
165
+ // N_INDIVIDUOS_REFORMADOS_H: number
166
+ // N_INDIVIDUOS_REFORMADOS_M: number
167
+ // N_INDIVIDUOS_RESID_FORA_PAIS: number
168
+ // N_INDIVIDUOS_RESID_FORA_PAIS_H: number
169
+ // N_INDIVIDUOS_RESID_FORA_PAIS_M: number
170
+ // N_INDIVIDUOS_SEM_ATIVIDADE_ECONOMICA: number
171
+ // N_INDIVIDUOS_SEM_ATIVIDADE_ECONOMICA_H: number
172
+ // N_INDIVIDUOS_SEM_ATIVIDADE_ECONOMICA_M: number
173
+ // N_RHABITUAL_1_2_DIV: number
174
+ // N_RHABITUAL_3_4_DIV: number
175
+ // N_RHABITUAL_5_MAIS_DIV: number
176
+ // N_RHABITUAL_ACESSIVEL_CADEIRAS_RODAS: number
177
+ // N_RHABITUAL_AREA_49: number
178
+ // N_RHABITUAL_AREA_50_99: number
179
+ // N_RHABITUAL_AREA_100_149: number
180
+ // N_RHABITUAL_AREA_150_199: number
181
+ // N_RHABITUAL_AREA_200MAIS: number
182
+ // N_RHABITUAL_ARRENDADOS: number
183
+ // N_RHABITUAL_COM_ESTACIONAMENTO: number
184
+ // N_RHABITUAL_NAO_ACESSIVEL_CADEIRAS_RODAS: number
185
+ // N_RHABITUAL_OCUPADOS_OUTR_SITUACAO: number
186
+ // N_RHABITUAL_PROP_OCUP: number
187
+ // N_RHABITUAL_SEM_ESTACIONAMENTO: number
188
+ // N_SS: number
189
+ // NUTS1_15: string
190
+ // NUTS2_15: string
191
+ // NUTS3_15: string
192
+ // SECNUM21: string
193
+ // Shape_Area: number
194
+ // Shape_Length: number
195
+ // }
196
+ export {};
197
+ // /**
198
+ // * This type represents the MongoDB document structure for a Census,
199
+ // * including the full GeoJSON Feature with geometry and properties.
200
+ // */
201
+ // export interface CensusFeature extends GeoJSON.Feature<GeoJSON.MultiPolygon> {
202
+ // _id: string
203
+ // properties: CensusProperties
204
+ // }
205
+ // /**
206
+ // * This type represents the flattened codebase structure for a Census,
207
+ // * with properties at the top level and the full GeoJSON Feature in a separate field.
208
+ // * This type should be used throughout the application code.
209
+ // */
210
+ // export interface Census extends CensusProperties {
211
+ // _id: string
212
+ // };
@@ -0,0 +1,16 @@
1
+ import type { BaseLocation } from './base.js';
2
+ /**
3
+ * This type represents the properties of a District,
4
+ * both for the geojson feature and the flattened codebase type.
5
+ */
6
+ export interface DistrictProperties {
7
+ area_ha: number;
8
+ name: string;
9
+ }
10
+ export type DistrictFeature = BaseLocation<DistrictProperties>;
11
+ /**
12
+ * Represents a District with its ID and flattened properties.
13
+ */
14
+ export interface District extends DistrictProperties {
15
+ _id: string;
16
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './district.js';
2
+ export * from './locality.js';
3
+ export * from './location.js';
4
+ export * from './municipality.js';
5
+ export * from './parish.js';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './district.js';
2
+ export * from './locality.js';
3
+ export * from './location.js';
4
+ export * from './municipality.js';
5
+ export * from './parish.js';
@@ -0,0 +1,19 @@
1
+ import type { BaseLocation } from './base.js';
2
+ /**
3
+ * This type represents the properties of a Locality,
4
+ * both for the geojson feature and the flattened codebase type.
5
+ */
6
+ export interface LocalityProperties {
7
+ area_ha: number;
8
+ district_id: string;
9
+ municipality_id: string;
10
+ name: string;
11
+ parish_id?: string;
12
+ }
13
+ export type LocalityFeature = BaseLocation<LocalityProperties>;
14
+ /**
15
+ * Represents a Locality with its ID and flattened properties.
16
+ */
17
+ export interface Locality extends LocalityProperties {
18
+ _id: string;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { District } from './district.js';
2
+ import { Locality } from './locality.js';
3
+ import { Municipality } from './municipality.js';
4
+ import { Parish } from './parish.js';
5
+ /**
6
+ * This type represents the aggregated location information,
7
+ * combining various geographic entities into a single structure.
8
+ */
9
+ export interface Location {
10
+ district: District | null;
11
+ latitude: number;
12
+ locality: Locality | null;
13
+ longitude: number;
14
+ municipality: Municipality | null;
15
+ parish: null | Parish;
16
+ }
@@ -0,0 +1,2 @@
1
+ /* * */
2
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { BaseLocation } from './base.js';
2
+ /**
3
+ * This type represents the properties of a Municipality,
4
+ * both for the geojson feature and the flattened codebase type.
5
+ */
6
+ export interface MunicipalityProperties {
7
+ area_ha: number;
8
+ district_id: string;
9
+ name: string;
10
+ }
11
+ export type MunicipalityFeature = BaseLocation<MunicipalityProperties>;
12
+ /**
13
+ * Represents a Municipality with its ID and flattened properties.
14
+ */
15
+ export interface Municipality extends MunicipalityProperties {
16
+ _id: string;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { BaseLocation } from './base.js';
2
+ /**
3
+ * This type represents the properties of a Parish,
4
+ * both for the geojson feature and the flattened codebase type.
5
+ */
6
+ export interface ParishProperties {
7
+ area_ha: number;
8
+ district_id: string;
9
+ municipality_id: string;
10
+ name: string;
11
+ }
12
+ export type ParishFeature = BaseLocation<ParishProperties>;
13
+ /**
14
+ * Represents a Parish with its ID and flattened properties.
15
+ */
16
+ export interface Parish extends ParishProperties {
17
+ _id: string;
18
+ }
package/dist/parish.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@tmlmobilidade/go-types-locations",
3
+ "version": "20260828.1636.54",
4
+ "author": {
5
+ "email": "iso@tmlmobilidade.pt",
6
+ "name": "TML-ISO"
7
+ },
8
+ "license": "AGPL-3.0-or-later",
9
+ "homepage": "https://go.tmlmobilidade.pt",
10
+ "bugs": {
11
+ "url": "https://github.com/tmlmobilidade/go/issues"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/tmlmobilidade/go.git"
16
+ },
17
+ "keywords": [
18
+ "public transit",
19
+ "tml",
20
+ "transportes metropolitanos de lisboa",
21
+ "go"
22
+ ],
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "type": "module",
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "main": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "scripts": {
33
+ "build": "tsc && resolve-tspaths",
34
+ "lint": "eslint ./src/ && tsc --noEmit",
35
+ "lint:fix": "eslint ./src/ --fix",
36
+ "watch": "tsc-watch --onSuccess 'resolve-tspaths'"
37
+ },
38
+ "dependencies": {
39
+ "@tmlmobilidade/go-types-gtfs": "*",
40
+ "@tmlmobilidade/go-types-operation": "*",
41
+ "@tmlmobilidade/go-types-shared": "*",
42
+ "@types/geojson": "7946.0.16",
43
+ "gtfs-types": "5.1.0",
44
+ "zod": "3.25.76"
45
+ },
46
+ "devDependencies": {
47
+ "@tmlmobilidade/go-utils-tsconfig": "*",
48
+ "@types/node": "26.1.2",
49
+ "resolve-tspaths": "0.8.23",
50
+ "tsc-watch": "7.2.1",
51
+ "typescript": "6.0.3"
52
+ }
53
+ }