問題タブ [proj4js]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
233 参照

data-conversion - proj4js のメソッド transform() を使用すると正しい値を取得できない理由 (wgs84 -> utm-k)

proj4js で正しい値の変換を取得したい。
座標変換値 wgs84 (EPSG:4326) → utm-k (EPSG:5179)

座標変換値を取得しようとしましたが、正しい値を取得できませんでした。

しかし、他の変換値は正しかった。

コーディネートは韓国の제주도청です。

正しい値:

不適切な値:

proj4js を使用して wgs84 -> utm-k に変換すると、正しい値を取得できないのはなぜですか。

私の情報源:

また

しかし、utm-k -> wgs84 に変換すると正しい値を取得できます

とにかく、結果:

不正な値の画像

0 投票する
1 に答える
2683 参照

javascript - Proj4JS - 変換 2.3.3 と 2.4.3

Proj4JS で、同じコードを使用した 2.4.3 が座標を完全に異なるものに変換するのはなぜですか? このフィドルを参照してください。

左側の proj4js リソースの順序を入れ替えた場合。2.3.3 は正確に変換され、2.4.3 は完全に間違って変換されることがわかります。

この質問ですぐに使用できる2つの例も含めました。

http://jsfiddle.net/8ztfhes0/17/

編集 - もう少し調査を行います。この問題は実際にはバージョン 2.3.16 で発生することがわかりました。2.3.15までは問題ありません。

コミット コメント = 2.3.16 の「より良い tmerc プロジェクションを追加」

2.4.3 サンプル

2.3.3 例

0 投票する
2 に答える
1761 参照

angular - angular & migration openlayers to ol & proj4js

Tried to migrate an angular-based project using openlayers away from deprecated openlayers-npm-package to recommended ol-npm-package. By debugging i realized that i had a problem with the previously still working integration of proj4.

After two days of following different approaches, trying this and that, realizing that in that special combination of libraries the problem seems to result from a lack of typings for the new ol-package.

What i now can confirm - and hope it helps others (i can't comment to SO-Answer yet) - is, that the support for proj4 is not yet existing in @types/ol:'4.6.2', but in @types/openlayers:'^4.6.12'.

So utilizing proj4 to provide different projections to openlayers using dependencies

will work for the following code-snippet, but ol combined with @types/ol won't:

imports

constructor