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'm rendering a shapefile using GeoServer and using OpenLayers library to render it in the web browser.

Now I have created the option of editing the attribute data in web browser. I want the edited data to get reflected back in the original shapefile.

What is the best method to edit shapefile programatically using Python. I'm quite new to GIS concepts. Or do i need to convert it to PostGIS format in-order to edit the attribute data using Python?

What are the best practices and way to go?

Thanks in advance.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

first of all check out GeoServer Python scripting extension, here. it can give you some little tips and viewpoint.

if you want to modify your layer, try extension example that i have given.

from geoserver import Catalog
cat = Catalog('topp')
l = cat['states_shapefile']['states']
l.title = 'foo'
append(l.keywords, 'bar')
l.save()

beside this pyshp is great for editing shapefiles with python, you can add this module to your code too.

and this can help you too.

  1. shp2geoserver.py

  2. shapefilebatch-cleaned.py

    i hope it helps you...

share|improve this answer
    
Thanks, I will try the Python scripting extension :-) –  Sibi Oct 23 '12 at 6:34

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.