Created
December 23, 2014 17:21
-
-
Save jsoma/83d8e94fb0ddef7b8f3e to your computer and use it in GitHub Desktop.
Converts stop-and-frisk data from New York State Plane to lat/lng. Make a vrt for every csv and run `ogr2ogr` on them - be sure to make backups, it deletes the original csv for god knows what reason.
This file contains 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="2012"> | |
<SrcDataSource>2012.csv</SrcDataSource> | |
<GeometryType>wkbPoint</GeometryType> | |
<LayerSRS>+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs</LayerSRS> | |
<GeometryField encoding="PointFromColumns" x="xcoord" y="ycoord"/> | |
</OGRVRTLayer> | |
</OGRVRTDataSource> |
This file contains 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 -t_srs EPSG:4326 -lco GEOMETRY=AS_YX -overwrite output-2013-1.csv 2012.vrt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment