如何使用开源库从脚本将 shapefile 从 AGD66 转换为 GDA94

发布于 2024-09-04 17:53:30 字数 189 浏览 14 评论 0原文

如何使用开源库以编程方式将 shapefile 从 AGD66 转换为 GDA94?我不想使用 arcgisscripting 因为我没有许可证。

这需要是自动化的。 bash 或 python 脚本是可以接受的。

这比普通重投影稍微复杂一些,因为这些坐标参考系之间使用不同的椭球体,因此需要使用畸变网格。

How can I convert a shapefile from AGD66 to GDA94 programmatically, using open source libraries? I don't want to use arcgisscripting because I don't have a licence.

This needs to be automatable. A bash or python script would be acceptable.

This is a little more complicated than a normal reprojection, because a different ellipsoid is used between these coordinate reference systems, and thus a distortion grid needs to be used.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

秉烛思 2024-09-11 17:53:30

使用开源 GDAL 库。

要自行转换坐标,请使用 GGAL 转换实用程序:
http://www.gdal.org/gdaltransform.html

要转换整个 shapefile,请使用:
http://www.gdal.org/ogr2ogr.html

有一个命令行示例页面底部的 shapefile。

Use the OpenSource GDAL libraries.

To convert coordinates on their own us the GGAL transform utility:
http://www.gdal.org/gdaltransform.html

To convert a whole shapefile use:
http://www.gdal.org/ogr2ogr.html

There is a command line example for a shapefile at the bottom of the page.

失眠症患者 2024-09-11 17:53:30

很抱歉回答自己的问题,但这适用于后代。使用此处的说明,首先下载扭曲网格:

wget http://www.icsm.gov.au/icsm/gda/gdatm/national66.zip
unzip national66.zip
mkdir -p ~/bin
mv "A66 National (13.09.01).gsb" ~/bin/a66_national.gsb
rm national66.zip

然后使用ogr2​​ogr重新投影:

ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=longlat +ellps=aust_SA +nadgrids=~/bin/a66_national.gsb +wktext" -t_srs EPSG:4283 outputgda94.shp inputagd66.shp

Sorry to answer own question, but here goes for posterity. Using the instructions here, first download the distortion grid:

wget http://www.icsm.gov.au/icsm/gda/gdatm/national66.zip
unzip national66.zip
mkdir -p ~/bin
mv "A66 National (13.09.01).gsb" ~/bin/a66_national.gsb
rm national66.zip

Then use ogr2ogr to reproject:

ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=longlat +ellps=aust_SA +nadgrids=~/bin/a66_national.gsb +wktext" -t_srs EPSG:4283 outputgda94.shp inputagd66.shp
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文