Last active
December 24, 2015 09:51
-
-
Save snodnipper/5e25b821ca06a13981b0 to your computer and use it in GitHub Desktop.
Using stock tools, I couldn't see an easy way to transform multiple columns simultaneously. Still, one could write out three separate files. See: https://github.com/snodnipper/bng-transformations/tree/master/examples/ogr2ogr
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
<OGRVRTDataSource> | |
<OGRVRTLayer name="process"> | |
<SrcDataSource>process.csv</SrcDataSource> | |
<GeometryType>wkbPoint</GeometryType> | |
<LayerSRS>+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs +nadgrids=/Users/osnowden/code/bng-transformations/OSTN02_NTv2.gsb</LayerSRS> | |
<GeometryField encoding="PointFromColumns" x="MBR_XMIN" y="MBR_YMIN"/> | |
</OGRVRTLayer> | |
</OGRVRTDataSource> |
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
<OGRVRTDataSource> | |
<OGRVRTLayer name="input"> | |
<SrcDataSource>input.csv</SrcDataSource> | |
<GeometryType>wkbPoint</GeometryType> | |
<LayerSRS>+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs +nadgrids=/Users/osnowden/code/bng-transformations/OSTN02_NTv2.gsb</LayerSRS> | |
<GeometryField encoding="PointFromColumns" x="MBR_XMAX" y="MBR_YMAX"/> | |
</OGRVRTLayer> | |
</OGRVRTDataSource> |
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
<OGRVRTDataSource> | |
<OGRVRTLayer name="process2"> | |
<SrcDataSource>process2.csv</SrcDataSource> | |
<GeometryType>wkbPoint</GeometryType> | |
<LayerSRS>+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs +nadgrids=/Users/osnowden/code/bng-transformations/OSTN02_NTv2.gsb</LayerSRS> | |
<GeometryField encoding="PointFromColumns" x="GEOMETRY_X" y="GEOMETRY_Y"/> | |
</OGRVRTLayer> | |
</OGRVRTDataSource> |
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 'CSV' -lco GEOMETRY=AS_XY -t_srs EPSG:4326 -nln output process.csv 3.vrt | |
ogr2ogr -f 'CSV' -lco GEOMETRY=AS_XY -t_srs EPSG:4326 -nln process process2.csv 2.vrt | |
ogr2ogr -f 'CSV' -lco GEOMETRY=AS_XY -t_srs EPSG:4326 -nln output output.csv input.vrt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment