Pergunta

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.

Foi útil?

Solução 2

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

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top