【问题标题】:Geometry Trasformation in Spatialite 4.1.1Spatialite 4.1.1 中的几何变换
【发布时间】:2014-01-31 06:33:01
【问题描述】:

我正在尝试从以下 grometry 转换(参考澳大利亚的地理)

多边形((-33.917172 151.110971,-33.916443 151.112495,-33.917637 151.113276,-33.917783 151.111512,-33.917253 151.111577,-33.917172 151.110971))

使用以下查询从 SRID 4326 到 3112

SELECT AsText(Transform(PolygonFromText('POLYGON((-33.917172 151.110971,-33.916443 151.112495,-33.917637 151.113276,-33.917783 151.111512,-33.917253 151.111577,-33.917172 151.110971))',4326),3112)) as result

在带有所有 GEOS、PROJ 扩展的 spatialite GUI 1.7.1 和 spatialite 4.1.1 中,但生成的几何图形是

多边形((Inf Inf,Inf Inf,Inf Inf,Inf Inf,Inf Inf,Inf Inf))

为什么会这样?

【问题讨论】:

    标签: spatialite


    【解决方案1】:

    非常简单,您只需反转 LON/LAT 值:

    SELECT AsText(Transform(PolygonFromText('POLYGON((151.110971 -33.917172, 151.112495 -33.916443, 151.113276 -33.917637, 151.111512 -33.917783, 151.111577 -33.917253, 151.110971 -33.917172))',4326),3112)) as result
    

    结果:

    POLYGON((1569305.481332 -3926985.759663, 1569455.307825 -3926925.091727, 1569508.606645 -3927065.382207, 1569345.639225 -3927059.314561, 1569359.502478 -3927002.182676, 1569305.481332 -3926985.759663))
    

    http://en.wikipedia.org/wiki/Well-known_text

    POLYGON(x y) = POLYGON(lon lat)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-16
      相关资源
      最近更新 更多