rm -f output.csv
ogr2ogr -f CSV -t_srs EPSG:4326 -lco GEOMETRY=AS_XY -nln output output.csv input.vrt
Last active
September 30, 2016 16:15
-
-
Save mbostock/35c319a7e790cc2cf987 to your computer and use it in GitHub Desktop.
Reprojecting CSV with 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
license: gpl-3.0 |
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
X | Y | |
---|---|---|
995504 | 189189 | |
998641 | 236979 | |
1009146 | 209683 | |
997374 | 234664 | |
999539 | 239499 | |
1007700 | 180317 | |
1035328 | 160816 | |
1047047 | 207400 |
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 relativeToVRT="1">input.csv</SrcDataSource> | |
<GeometryType>wkbPoint</GeometryType> | |
<LayerSRS>EPSG:2263</LayerSRS> | |
<GeometryField encoding="PointFromColumns" x="X" y="Y" reportSrcColumn="FALSE"/> | |
</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
X | Y | |
---|---|---|
-73.959421539551499 | 40.68594967800022 | |
-73.948008210235358 | 40.817116544476939 | |
-73.910156921484216 | 40.742172925537574 | |
-73.952590152183006 | 40.81076448996351 | |
-73.944758176154096 | 40.82403172341445 | |
-73.915477404082822 | 40.661574133668388 | |
-73.816043551126768 | 40.607931877025436 | |
-73.773403975999372 | 40.735718766524542 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment