@mailwoman/spatial 5.9.0 → 5.10.1

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.
Files changed (48) hide show
  1. package/bbox.ts +3 -3
  2. package/coordinate-formats.test.ts +1 -1
  3. package/countries/codes.ts +255 -252
  4. package/countries/index.ts +2 -2
  5. package/feature.ts +1 -1
  6. package/geometries/collection.ts +4 -4
  7. package/geometries/index.ts +4 -4
  8. package/geometries/line-string.ts +2 -2
  9. package/geometries/point.ts +4 -4
  10. package/geometries/polygon.test.ts +1 -1
  11. package/geometries/polygon.ts +21 -19
  12. package/google/index.ts +1 -1
  13. package/h3/index.ts +1 -1
  14. package/index.ts +11 -11
  15. package/objects.ts +1 -1
  16. package/out/bbox.d.ts +2 -2
  17. package/out/countries/codes.d.ts +252 -251
  18. package/out/countries/codes.d.ts.map +1 -1
  19. package/out/countries/codes.js +251 -252
  20. package/out/countries/codes.js.map +1 -1
  21. package/out/countries/index.d.ts +2 -2
  22. package/out/feature.d.ts +1 -1
  23. package/out/geometries/collection.d.ts +4 -4
  24. package/out/geometries/index.d.ts +4 -4
  25. package/out/geometries/line-string.d.ts +2 -2
  26. package/out/geometries/point.d.ts +5 -5
  27. package/out/geometries/polygon.d.ts +20 -19
  28. package/out/geometries/polygon.d.ts.map +1 -1
  29. package/out/geometries/polygon.js +17 -18
  30. package/out/geometries/polygon.js.map +1 -1
  31. package/out/google/index.d.ts +1 -1
  32. package/out/h3/index.d.ts +1 -1
  33. package/out/index.d.ts +11 -11
  34. package/out/objects.d.ts +1 -1
  35. package/out/projection.d.ts +5 -4
  36. package/out/projection.d.ts.map +1 -1
  37. package/out/projection.js +4 -5
  38. package/out/projection.js.map +1 -1
  39. package/out/regions/index.d.ts +2 -2
  40. package/out/sdk/index.d.ts +1 -1
  41. package/out/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +23 -5
  43. package/projection.ts +6 -4
  44. package/regions/codes.ts +1 -1
  45. package/regions/index.ts +2 -2
  46. package/sdk/index.ts +1 -1
  47. package/sdk/well-known-text.test.ts +1 -1
  48. package/tsconfig.json +2 -1
@@ -6,8 +6,8 @@
6
6
 
7
7
  import { ResourceError } from "@mailwoman/core/errors"
8
8
 
9
- import type { GeoObjectLiteral } from "../objects.js"
10
- import type { LineStringPath } from "./line-string.js"
9
+ import type { GeoObjectLiteral } from "../objects.ts"
10
+ import type { LineStringPath } from "./line-string.ts"
11
11
 
12
12
  /**
13
13
  * An array of positions forming a closed shape, such as a country or a lake.
@@ -156,23 +156,25 @@ export function polygonToOSMFilter(input: PolygonLiteral): string {
156
156
  *
157
157
  * @category OSM
158
158
  */
159
- export enum OSMNodeTag {
160
- HouseNumber = "addr:housenumber",
161
- PostCode = "addr:postcode",
162
- Street = "addr:street",
163
- State = "addr:state",
164
- City = "addr:city",
165
- Website = "website",
166
- Email = "email",
167
- Phone = "phone",
168
- Shop = "shop",
169
- Brand = "brand",
170
- Cuisine = "cuisine",
171
- Name = "name",
172
- Healthcare = "healthcare",
173
- Office = "office",
174
- Amenity = "amenity",
175
- }
159
+ export const OSMNodeTag = {
160
+ HouseNumber: "addr:housenumber",
161
+ PostCode: "addr:postcode",
162
+ Street: "addr:street",
163
+ State: "addr:state",
164
+ City: "addr:city",
165
+ Website: "website",
166
+ Email: "email",
167
+ Phone: "phone",
168
+ Shop: "shop",
169
+ Brand: "brand",
170
+ Cuisine: "cuisine",
171
+ Name: "name",
172
+ Healthcare: "healthcare",
173
+ Office: "office",
174
+ Amenity: "amenity",
175
+ } as const
176
+
177
+ export type OSMNodeTag = (typeof OSMNodeTag)[keyof typeof OSMNodeTag]
176
178
 
177
179
  export const ForbiddenResidentialOSMNodeTags: ReadonlySet<OSMNodeTag> = new Set<OSMNodeTag>([
178
180
  OSMNodeTag.Shop,
package/google/index.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
6
 
7
- export * from "./place-id.js"
7
+ export * from "./place-id.ts"
package/h3/index.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  import { cellToLatLng } from "h3-js"
8
8
  import type { Tagged } from "type-fest"
9
9
 
10
- import { GeoPoint, type PointLiteral } from "../geometries/point.js"
10
+ import { GeoPoint, type PointLiteral } from "../geometries/point.ts"
11
11
 
12
12
  /**
13
13
  * A H3 cell index, full 64 bits.
package/index.ts CHANGED
@@ -4,14 +4,14 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
6
 
7
- export * from "./bbox.js"
8
- export * from "./coordinate-formats.js"
9
- export * from "./countries/index.js"
10
- export * from "./feature.js"
11
- export * from "./geometries/index.js"
12
- export * from "./google/index.js"
13
- export * from "./h3/index.js"
14
- export * from "./objects.js"
15
- export * from "./position.js"
16
- export * from "./projection.js"
17
- export * from "./regions/index.js"
7
+ export * from "./bbox.ts"
8
+ export * from "./coordinate-formats.ts"
9
+ export * from "./countries/index.ts"
10
+ export * from "./feature.ts"
11
+ export * from "./geometries/index.ts"
12
+ export * from "./google/index.ts"
13
+ export * from "./h3/index.ts"
14
+ export * from "./objects.ts"
15
+ export * from "./position.ts"
16
+ export * from "./projection.ts"
17
+ export * from "./regions/index.ts"
package/objects.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
6
 
7
- import { type BBox2DLiteral, type BBox3DLiteral, is2DBBox } from "./bbox.js"
7
+ import { type BBox2DLiteral, type BBox3DLiteral, is2DBBox } from "./bbox.ts"
8
8
 
9
9
  /**
10
10
  * GeoJSON object types.
package/out/bbox.d.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * GeoJSON Bounding Boxes
7
7
  */
8
- import type { PolygonLiteral } from "./geometries/polygon.js";
9
- import { CoordinateProjection } from "./projection.js";
8
+ import type { PolygonLiteral } from "./geometries/polygon.ts";
9
+ import { CoordinateProjection } from "./projection.ts";
10
10
  /**
11
11
  * A 2-dimensional rectangular area that can be determined by two longitudes and two latitudes.
12
12
  *