diff --git a/README.ja.md b/README.ja.md index 3325945..f9c5fdb 100644 --- a/README.ja.md +++ b/README.ja.md @@ -111,7 +111,9 @@ lon/lat から始まり、PROJ には別の天体への変換が無く、同梱 - 外した行は `onExcluded` に理由 `Not on the Earth (celestial body: <名前>)` で渡します (京都の範囲・`area` なしでは 2,046 行。結果は 2,213 行から 167 行になります)。 - 残したいとき(一覧を見るときなど)は `includeOtherCelestialBodies: true` を渡します。 - そうして得た行を `transformLonLatArrayToProjected` にまとめて渡さないでください。 + そうして得た行を、`transformLonLatArrayToProjected` にも、`createCandidateTransformer` を通して + Teiresias の `estimateCrs` にも、まとめて渡さないでください。`estimateCrs` は渡された候補を全部変換 + するので、実行時が応答しなくなることがあり、変換に失敗した候補があれば推定全体が失敗になります。 ### 同梱の proj-wasm で書き出せない行 diff --git a/README.md b/README.md index 43e39f3..faa47a2 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,9 @@ No PROJ object is created for the rows left out. `Not on the Earth (celestial body: )` (for a Kyoto extent without `area`: 2,046 rows, and the result goes from 2,213 to 167 rows). - Pass `includeOtherCelestialBodies: true` to keep them (for example to list them). Do not pass such - rows to `transformLonLatArrayToProjected` in bulk. + rows in bulk to `transformLonLatArrayToProjected`, nor through `createCandidateTransformer` to the + `estimateCrs` of Teiresias: `estimateCrs` transforms every candidate it is given, so the runtime can + stop answering, and a candidate whose transformation fails makes the whole estimate fail. ### Rows the bundled proj-wasm cannot export diff --git a/dist/proj-wasm-crs.d.ts b/dist/proj-wasm-crs.d.ts index a8024ee..83119a6 100644 --- a/dist/proj-wasm-crs.d.ts +++ b/dist/proj-wasm-crs.d.ts @@ -33,6 +33,10 @@ export interface ListProjectedCrsFromProjWasmOptions { * exceptions this raises pile up until the runtime stops answering. The test uses the celestial * body proj.db gives for the CRS (`ellipsoid.celestial_body_auth_name/code` -> `celestial_body.name`, * reported as `celestialBodyName`), so no PROJ object is created for the rows left out. + * + * When you keep them, do not pass such rows in bulk to `transformLonLatArrayToProjected`, nor + * through `createCandidateTransformer` to the `estimateCrs` of Teiresias (`estimateCrs` transforms + * every candidate it is given). */ includeOtherCelestialBodies?: boolean; onshoreOnly?: boolean; diff --git a/src/proj-wasm-crs.ts b/src/proj-wasm-crs.ts index e0aa80d..313fa57 100644 --- a/src/proj-wasm-crs.ts +++ b/src/proj-wasm-crs.ts @@ -38,6 +38,10 @@ export interface ListProjectedCrsFromProjWasmOptions { * exceptions this raises pile up until the runtime stops answering. The test uses the celestial * body proj.db gives for the CRS (`ellipsoid.celestial_body_auth_name/code` -> `celestial_body.name`, * reported as `celestialBodyName`), so no PROJ object is created for the rows left out. + * + * When you keep them, do not pass such rows in bulk to `transformLonLatArrayToProjected`, nor + * through `createCandidateTransformer` to the `estimateCrs` of Teiresias (`estimateCrs` transforms + * every candidate it is given). */ includeOtherCelestialBodies?: boolean; onshoreOnly?: boolean;