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 developed a web application where i am using GeoServer and OpenLayers. I have displayed some Layers over Google map in a ASP.Net Web Page. I want to know is there any Method or Script available in OpenLayers for downloading and saving shapefile (the shapefile which is displayed over Google map in Web page) from web interface.

Actually the user wants to download the shapefile from Web interface and open it in his Dektop GIS (ArcView) system.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Use WFS with output format set to shape.

share|improve this answer

Append &outputformat=SHAPE-ZIP to the request, as in this example (replace the ws_world:world_cities with ur workspace and layer)

http://hostname.com/geoserver/ws_world/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ws_world:world_cities&maxfeatures=50&outputformat=SHAPE-ZIP

share|improve this answer
    
This works really well to get the files. One thing to note, this does not get the original files. I believe it gets the projected files. So if the original files had a different SRS than the decalred SRS. It will use the declared SRS (if forced). –  Kalel Wade May 26 at 19:33

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.