@nika-js/onlymap 0.7.6 → 0.8.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +3 -1
  3. package/dist/{LercDecode.es-sRuTJq5Y.js → LercDecode.es--DH6_OFE.js} +1 -1
  4. package/dist/{basemap-BCGMmc2F.js → basemap-2ZZ_9gFn.js} +528 -502
  5. package/dist/basemap.d.ts +15 -0
  6. package/dist/cartograph/api.d.ts +45 -0
  7. package/dist/cartograph/atlas.d.ts +50 -0
  8. package/dist/cartograph/core-loader.d.ts +35 -0
  9. package/dist/cartograph/cvd.d.ts +106 -0
  10. package/dist/cartograph/element-base.d.ts +26 -0
  11. package/dist/cartograph/elements/om-atlas.d.ts +47 -0
  12. package/dist/cartograph/elements/om-cartograph.d.ts +76 -0
  13. package/dist/cartograph/elements/om-frame.d.ts +111 -0
  14. package/dist/cartograph/elements/om-graticule.d.ts +24 -0
  15. package/dist/cartograph/elements/om-image.d.ts +12 -0
  16. package/dist/cartograph/elements/om-legend.d.ts +16 -0
  17. package/dist/cartograph/elements/om-north.d.ts +11 -0
  18. package/dist/cartograph/elements/om-scalebar.d.ts +13 -0
  19. package/dist/cartograph/elements/om-shape.d.ts +16 -0
  20. package/dist/cartograph/elements/om-text.d.ts +9 -0
  21. package/dist/cartograph/georef.d.ts +126 -0
  22. package/dist/cartograph/graticule.d.ts +70 -0
  23. package/dist/cartograph/html-data.d.ts +27 -0
  24. package/dist/cartograph/index.d.ts +1 -0
  25. package/dist/cartograph/layout.d.ts +23 -0
  26. package/dist/cartograph/legend.d.ts +75 -0
  27. package/dist/cartograph/live-frame.d.ts +69 -0
  28. package/dist/cartograph/paint.d.ts +54 -0
  29. package/dist/cartograph/refs.d.ts +33 -0
  30. package/dist/cartograph/render.d.ts +64 -0
  31. package/dist/cartograph/scalebar.d.ts +91 -0
  32. package/dist/cartograph/schema.d.ts +38 -0
  33. package/dist/cartograph/standalone.d.ts +1 -0
  34. package/dist/cartograph/textlayout.d.ts +45 -0
  35. package/dist/cartograph/tokens.d.ts +45 -0
  36. package/dist/cartograph/url-actions.d.ts +26 -0
  37. package/dist/cartograph/validate.d.ts +38 -0
  38. package/dist/cartograph/zip.d.ts +22 -0
  39. package/dist/cartograph.css +1 -0
  40. package/dist/cartograph.js +2768 -0
  41. package/dist/cartograph.standalone.js +7640 -0
  42. package/dist/crs-DsDQ4Q4i.js +71 -0
  43. package/dist/download.d.ts +6 -0
  44. package/dist/feature-access.d.ts +14 -0
  45. package/dist/field-access.d.ts +1 -10
  46. package/dist/{geoparquet-CK9IjEjH.js → geoparquet-DDZzee5Z.js} +1 -1
  47. package/dist/{index-CNRYpb0x.js → index-BGOblzWN.js} +5134 -5070
  48. package/dist/index-CcLC9jE5.js +4798 -0
  49. package/dist/{index-CIEJyv5x.js → index-CeoVzd6t.js} +1 -1
  50. package/dist/{index-CW3bdfHB.js → index-Cz1VsWzO.js} +2 -2
  51. package/dist/{index-CN_tn36D.js → index-DkxFFflv.js} +1 -1
  52. package/dist/{index-C1ZQGJxa.js → index-DphcuoPv.js} +1 -1
  53. package/dist/index.d.ts +1 -1
  54. package/dist/{lerc-Bb2JZ92v.js → lerc-D7TfTy6l.js} +2 -2
  55. package/dist/onlymap.standalone.js +8820 -8730
  56. package/dist/onlymapjs.js +12 -11
  57. package/dist/{raster-DpYssEe7.js → raster-D_3YKFZz.js} +3 -3
  58. package/dist/{raster-pipeline-BVCB-0yq.js → raster-pipeline-D1yeoJo2.js} +1 -1
  59. package/dist/runtime-core.d.ts +30 -0
  60. package/dist/snapshot.d.ts +17 -0
  61. package/dist/units.d.ts +9 -0
  62. package/dist/version.d.ts +1 -1
  63. package/dist/{zarr-DNb4iqbL.js → zarr-DH5Ntt5U.js} +2 -2
  64. package/docs/cartograph.md +396 -0
  65. package/llms.txt +1 -0
  66. package/onlymapjs.html-data.json +974 -0
  67. package/package.json +13 -2
  68. package/skills/onlymapjs/SKILL.md +2 -2
  69. package/skills/onlymapjs/references/syntax.md +26 -2
@@ -0,0 +1,71 @@
1
+ const s = [
2
+ [33, 129.5],
3
+ [33, 131],
4
+ [36, 132.166666666667],
5
+ [33, 133.5],
6
+ [36, 134.333333333333],
7
+ [36, 136],
8
+ [36, 137.166666666667],
9
+ [36, 138.5],
10
+ [36, 139.833333333333],
11
+ [40, 140.833333333333],
12
+ [44, 140.25],
13
+ [44, 142.25],
14
+ [44, 144.25],
15
+ [26, 142],
16
+ [26, 127.5],
17
+ [26, 124],
18
+ [26, 131],
19
+ [20, 136],
20
+ [26, 154]
21
+ ], l = {
22
+ // Netherlands — Amersfoort / RD New (3DBAG).
23
+ 28992: {
24
+ def: "+proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs"
25
+ },
26
+ // Switzerland — CH1903+ / LV95.
27
+ 2056: {
28
+ def: "+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"
29
+ },
30
+ // Germany — ETRS89 / UTM zones 32N and 33N.
31
+ 25832: { def: "+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs" },
32
+ 25833: { def: "+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs" },
33
+ // Plain WGS84 UTM zones 32N/33N (EPSG:326xx) — the generic, non-European-specific
34
+ // code many CityJSON files declare instead of the ETRS89 pair above (e.g.
35
+ // Ingolstadt's own open-data LoD3 export). Numerically near-identical to
36
+ // 25832/25833 at map-rendering precision (WGS84 vs. ETRS89 differ by ~cm in
37
+ // Europe), so no +towgs84 shift is needed — same bare projection string.
38
+ 32632: { def: "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs" },
39
+ 32633: { def: "+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs" },
40
+ // Austria — MGI / Austria GK West/Central/East (the national cadastral
41
+ // system's three meridian-strip zones; Vienna sits in GK East). Same
42
+ // Bessel ellipsoid + towgs84 shift and y_0=-5,000,000 false-northing
43
+ // convention across all three — proj4 strings verified against epsg.io,
44
+ // not hand-derived, and cross-checked by reprojecting a real Vienna
45
+ // open-data file's own extent and confirming it lands in Vienna.
46
+ 31254: { def: "+proj=tmerc +lat_0=0 +lon_0=10.3333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs" },
47
+ 31255: { def: "+proj=tmerc +lat_0=0 +lon_0=13.3333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs" },
48
+ 31256: { def: "+proj=tmerc +lat_0=0 +lon_0=16.3333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs" },
49
+ // Singapore — SVY21 / Singapore TM (the national grid; NUS's own Singapore
50
+ // HDB buildings dataset declares this via metadata.referenceSystem
51
+ // directly, unlike the Austria/3DBAG files, which had none). proj4 string
52
+ // verified against epsg.io, cross-checked by reprojecting a real dataset's
53
+ // own extent and confirming it lands in Singapore (103.68-103.99°E,
54
+ // 1.27-1.46°N — matches).
55
+ 3414: { def: "+proj=tmerc +lat_0=1.36666666666667 +lon_0=103.833333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" },
56
+ // Japan — JGD2011 geographic 2D. EPSG axis order is (lat, lon).
57
+ 6668: { def: "+proj=longlat +ellps=GRS80 +no_defs", geographic: !0, swapXY: !0 },
58
+ // WGS 84. Files in the wild store lon/lat despite EPSG's formal (lat, lon).
59
+ 4326: { def: "+proj=longlat +datum=WGS84 +no_defs", geographic: !0 },
60
+ 3857: { def: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +no_defs" }
61
+ };
62
+ for (let e = 0; e < s.length; e++) {
63
+ const [o, t] = s[e];
64
+ l[6669 + e] = {
65
+ def: `+proj=tmerc +lat_0=${o} +lon_0=${t} +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs`,
66
+ swapXY: !0
67
+ };
68
+ }
69
+ export {
70
+ l as CRS_DEFS
71
+ };
@@ -0,0 +1,6 @@
1
+ /** Shared browser-download primitive. Import-safe outside a browser. */
2
+ export interface DownloadBlobOptions {
3
+ /** Keep the object URL alive briefly for browsers that start downloads asynchronously. */
4
+ revokeAfterMs?: number;
5
+ }
6
+ export declare function downloadBlob(blob: Blob, filename: string, options?: DownloadBlobOptions): void;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Import-free helpers for feature-shaped data.
3
+ *
4
+ * These live below `field-access.ts` so lightweight consumers such as the
5
+ * Cartograph bundle can share GeoJSON field/coordinate semantics without
6
+ * pulling in row materialisation, licensing, or the rest of the map runtime.
7
+ */
8
+ /**
9
+ * Shape-less named-field read: GeoJSON properties win over envelope fields,
10
+ * matching `flattenFeature()` and preserving an explicitly stored undefined.
11
+ */
12
+ export declare function readNamedField(row: unknown, field: string): unknown;
13
+ /** Recursively walk Point/LineString/Polygon/Multi* coordinates. */
14
+ export declare function collectCoordinates(coordinates: unknown, out: [number, number][]): void;
@@ -5,6 +5,7 @@
5
5
  * for ctx.stats/dataInViewport so widget code never has to think about it.
6
6
  */
7
7
  import type { Shape, LayerData } from "./ir";
8
+ export { collectCoordinates, readNamedField } from "./feature-access";
8
9
  export declare function getField(row: unknown, field: string, shape: Shape): unknown;
9
10
  /** Normalizes a picked feature to flat (GeoJSON properties lifted to the top level) — for ctx.selection.object. */
10
11
  export declare function flattenFeature(row: unknown, shape: Shape): unknown;
@@ -22,13 +23,3 @@ export declare function matchesFeatureId(row: unknown, featureId: string, shape:
22
23
  * asRows view — the Tier-2 rule, stated once here instead of at each caller.
23
24
  */
24
25
  export declare function findRowIndexById(data: LayerData, featureId: string, shape: Shape): number;
25
- /**
26
- * Shape-less named-field read: a GeoJSON Feature's field lives under
27
- * `properties`, a flat row carries it directly — probe both, `in`-checked so
28
- * an explicit null/undefined stored under properties still wins. For callers
29
- * that have no `Shape` in hand (the Tracking layer pair); everything with a
30
- * shape should use `getField`.
31
- */
32
- export declare function readNamedField(row: unknown, field: string): unknown;
33
- /** Recursively walks GeoJSON `coordinates` (Point/LineString/Polygon/Multi*) collecting every [lng, lat] vertex. */
34
- export declare function collectCoordinates(coordinates: unknown, out: [number, number][]): void;
@@ -1,4 +1,4 @@
1
- import { r as p, n as d } from "./index-CNRYpb0x.js";
1
+ import { r as p, n as d } from "./index-BGOblzWN.js";
2
2
  function g(t) {
3
3
  if (t == null) return !0;
4
4
  const e = t, n = e.id?.code;