WKT AXIS ORDER


WKT空間参照の順列定義は本来この順列に従う必要があるらしいとか。。。
ISO19162 の7.5
When is present in the WKT string the descriptions shall be ordered according to the axis order sequence.
このあたりかな??

GEODCRS["JGD2000",
  DATUM["Japanese Geodetic Datum 2000",
    ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1.0]]],
  CS[ellipsoidal,2],
    AXIS["latitude",north,ORDER[1]],
    AXIS["longitude",east,ORDER[2]],
    ANGLEUNIT["degree",0.01745329252],
  ID["EPSG",4612]]
PROJCRS["JGD2000 / Japan Plane Rectangular CS I",
  BASEGEODCRS["JGD2000",
    DATUM["Japanese Geodetic Datum 2000",
      ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1.0]]]],
  CONVERSION["Japan Plane Rectangular CS zone I",
    METHOD["Transverse Mercator",ID["EPSG",9807]],
    PARAMETER["Latitude of natural origin",33,ANGLEUNIT["degree",0.01745329252]],
    PARAMETER["Longitude of natural origin",129.5,ANGLEUNIT["degree",0.01745329252]],
    PARAMETER["Scale factor at natural origin",0.9999,SCALEUNIT["unity",1.0]],
    PARAMETER["False easting",0,LENGTHUNIT["metre",1.0]],
    PARAMETER["False northing",0,LENGTHUNIT["metre",1.0]]],
  CS[cartesian,2],
    AXIS["northing (X)",north,ORDER[1]],
    AXIS["easting (Y)",east,ORDER[2]],
    LENGTHUNIT["metre",1.0],
  ID["EPSG",2443]]

平面直角座標系 1 系
X座標 1m
Y座標 2m

緯度 33°00′00.03246″
経度 129°30′00.07705″

33.000009016666666666666666666667
129.50002140277777777777777777778

SELECT
 ST_AsText(
  ST_Transform
    (ST_GeomFromText('POINT(129.5000214027777777777777777777 33.00000901666666666666666666666)', 4612),
    2443)
)
;

‘POINT(1.99995816522274 0.999888726019038)’

‘2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1’

SELECT
  ST_AsText(
   ST_GeographyFromText('SRID=4612;POINT(130 30)')
  );

‘POINT(30 50)’

現状は、こうだがそのうちXY逆転が必要なのかもな。。。めんど。
まあ空間参照テーブルのWKT定義側のORDER指定で望む側に直せば済む気がするがそういう問題でもないのか?。

カテゴリー: 設計, 動向 タグ: パーマリンク