Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have been given some shapefiles WITHOUT a projection. So I need to add the projection in order to display it on google map. I found the projection information I need at http://spatialreference.org/ref/epsg/2066.

Question:
How can I add the projection using an open source method (don't have access to ESRI's software)?

Thanks
Chris

share|improve this question

5 Answers 5

Use ogr2ogr from GDAL:

ogr2ogr -a_srs EPSG:2066 output.shp input.shp

What's neat about ogr is that it can use an existing PRJ file as input as well:

ogr2ogr -a_srs input.prj output.shp input.shp

share|improve this answer
1  
I'm getting the following error when I try the utility above: "Can't transform coordinates, source layer has no coordinate system. Use -s_srs to set one." –  ChrisJ Feb 3 '12 at 20:53
    
@chris I wrote the wrong usage, so try a_srs to "assign" an output projection –  SaultDon Feb 3 '12 at 21:44

Projection in .shp file is in shapefilename.prj. It is basically text file, with info you found. Have a look at some of your shape files and figure out how information is written. Or less complited, if you have other .shp file in the same projection, just copy it and change the name accordinagly.

share|improve this answer
    
I did manually create a file with the information I found online. But it still isn't being displayed correctly. Is there a utility I can use to create the projection file with this data?? –  ChrisJ Feb 3 '12 at 20:26
3  
You can also use spatialreference.org where you can find and download a .PRJ file, then rename it to the same prefix as the .SHP file –  Mike T Feb 4 '12 at 0:25

Create a .prj file with the same basename as your shapefile (i.e. foo.prj), open the file in a text editor and add the contents of, in this case, http://spatialreference.org/ref/epsg/2066/prj/

share|improve this answer

Download the .prj file at the link you posted and then rename it to match your shape file.

share|improve this answer

Try using Geokettle http://www.spatialytics.org/ it reads shapefiles and has an option to add an SRS in its transformations. Otherwise use ogr2ogr gui (windows only) to see the srid

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.