Last active
July 26, 2018 06:00
-
-
Save bradbrowne/51b1a9e182da361c66748e3ba51749f7 to your computer and use it in GitHub Desktop.
flux-convert-mga-zone-55-to-wgs-84.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ogr2ogr -f "MSSQL" -overwrite "MSSQL:server=.;database=Flux;trusted_connection=yes;" "MSSQL:server=.;database=Flux;trusted_connection=yes;tables=vmadmin.parish_polygon" -s_srs EPSG:28355 -t_srs EPSG:4326 -nlt POLYGON -nln mapdojo.parish_polygon -lco "FID=pfi" -sql "SELECT [ogr_geometry],CAST([pfi] AS INTEGER) AS pfi,[parishc],[parish],[pfi_cr],[ufi],[ufi_cr],[ufi_old] FROM [vmadmin].[parish_polygon]" |
-lco "FID=pfi"
to make the PFI column the unique identifier -- keep in mind that will also mean that you need to CAST(PFI AS INT) otherwise you will get weird OGR errors.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-nlt POLYGON
to make the destination geometry a POLYGON type.