2

I have a number of shapefiles that lack the .prj file. I'm able to upload them to GeoServer using the REST API. However, I'm unable to serve them after upload. Which brings me to the question as to whether I need to reproject before uploading to GeoServer. If I need to reproject, then which options are available?

I'm using GeoServer 2.1.3.

UPDATE: Layers created from the shapefile lack projection information. When I update the Declared SRS field, the layers are served without issues.

2

If you know the projection of the shapefiles then you can just create (or download from http://spatialreference.org) the necessary projection string and save it as a .prj file before you upload. See http://spatialreference.org/ref/epsg/4326/prj/ for example.

If you don't know the projection of the files then you aren't going to manage to display them properly anyway :-).

  • Thanks loads. What if the shapefile has no projection at all? (I'm assuming its possible to have a shapefile without projection.) – okello Jun 20 '12 at 9:10
  • If you wan to display the data on a map you must have a projection of some sort, otherwise it's just numbers on a graph – Ian Turton Jun 20 '12 at 9:23
  • Thanks Iant. It seems my shapefiles are using the 4326 projection. Incorporating that projection info works perfectly. – okello Jun 20 '12 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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