1

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

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

使用以下查询从 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

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

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

为什么会这样?

4

1 回答 1

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)
于 2014-03-26T13:59:39.537 回答