![]() ![]() 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. The new columns in the attribute table give you lat and lon in degrees. Leave edit mode, then the attribute table. After saving (which takes some time), do the same for degy and $y. Create a new field named degx, type real, precision 6, and select $x from geometry. Open the attribute table, and click on the pencil symbol at the bottom to enter the edit mode, and then the field calculator icon bottom right. Saving may take some time.įor the next step, you better zoom in to see just a couple of points. to a new file under a different name, selecting EPSG:4326 as CRS for that, and check to add that layer to the canvas. If you want coordinates in lat/lon degrees, just rightclick on the shapefile layer, and Save as. ![]() For doing that, you have to set the project CRS to EPSG:3857. With the openlayers plugin, you can add a Openstreetmap or Google background layer. In your case, NAD_1983_StatePlane_Louisiana_South_FIPS_1702_Feet with US feet as units. prj file, and the layer CRS will automatically set right by QGIS. The dataset you mention is a shapefile, a format invented by ESRI, but understood by most GIS software, including QGIS.Īfter extracting the zip, you can add it with Add vector layer and point to the. Note that if you have trouble all of these steps are covered at one question or another here, so you should be able to find more info on a particular step/process by searching on terms here. Once that's done, you can export the attribute table back out to a csv and you'll have your coordinate values in both CRSs. Calc each of the two or four fields you need. To get the lat/long coordinates, you'd choose dataframe. If calculating the original TM65 coordinates, you'd choose the data. You'll be able to choose the X or Y coordinate of a point at the top as well as choose either the CRS of the data or the dataframe. With that done, to get the coordinate values, right-click a field heading in the attribute table and choose Calculate Geometry. Note there is some discussion at this question regarding transformations from TM65 that may influence your decision. You'll need to click the that button and select the appropriate transformation to go from TM65 to whichever CRS you chose. When you Ok out or hit apply, you should get a warning that your point layer doesn't match the dataframe with a button called Transformations on it. ![]() Set it to WGS84 (or whatever geographic datum/CRS you want to use to generate your lat/long values). Open the dataframe properties, either by double-clicking or right-clicking it in the ToC and go to the Coordinate System tab. While you're adding fields, add a lat field and a long field using at least float data type. If you move a point via editing, they will not update. Be aware that if they are there or if you calc them, those are now just attributes and have no relation to the point geometry. I think your original XY coordinate columns will be there, but if not you can add two new fields (I'd call them TM65X and TM65Y) to recalculate the values. Be sure to specify the coordinate system as TM65 with either tool to correctly define the coordinate values of the points.ĭepending on how you create them you may need to save the result to a feature class or shapefile for permanence. You can use Add XY Data or as faith_dur suggested in a comment the Make XY Event Layer tool. First add your coordinate data to ArcMap. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |