![]() I can give you the source if you wish but the meat of the program is this: ![]() I wrote a similar script here that will take a batch of Texas State Plane and convert to Lat/Lon. You just need the correct EPSG codes and a little bit of scripting knowledge. ![]() You want to use Proj4js, this tool can batch several state plane coordinates and convert them to California State Plane. And as you can see in the image here, the points appear about where I would expect to find Sacramento:įor the fact-hunters out there, the source csv I downloaded from the OP's site had 329543 records in it, and ogr2ogr performed the conversion in just a few moments. The next best bet, I thought, was to go for the most appropriate CA State Plane, in this case Zone 2. shp it was obviously in a different source. I used a process of elimination stemming from educated guesses. Ultimately the most difficult part of this exercise was identifying the correct projection of the source data. vrt we create in the first step.įinally, -s_srs means, "the coordinate system of the source data" and the -s_srs means, "the coordinate system for the output data". The -f "ESRI Shapefile" means I'm exporting to a shapefile, and the next value appearing in double-quotes is the shapefile I want to output. Ogr2ogr -f "ESRI Shapefile" "C:/xGIS/Other/dispatch/sac-dispatch-4326.shp" "C:/xGIS/Other/dispatch/dispatch.vrt" -s_srs EPSG:32610 -t_srs EPSG:4326" Next, I used the following ogr2ogr instruction to perform the conversion: I looked in the CSV for the X Coordinate and Y Coordinate field names, specifying those values, as OGR needs to know whichįields represent X and Y to resolve the geometry. Basically I'm just adapting the approach demonstrated in this post.Ĭ:/xGIS/Other/dispatch/93305-sacramento-dispatch-data-from-one-year-ago.csv The following approach using ogr2ogr will perform a CSV to Shapefile conversion, including the coordinate transformation to Lat/Long (i.e. The original source data is California State Plane Zone 2, i.e.
0 Comments
Leave a Reply. |