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 need to save my vectors layer back to postgis, which if i read correctly i can do using geoserver however im confused. All the examples ask you to import a shapefile. I dont have a shapefile. This will be a empty vector layer ontop of a couple of base layers which the user will add polys, points etc etc. How do i create the tables to hold the vector data. Also how do i know the structure of the tables. e.g columns, column names, primary / foreign key, relationships etc etc

Thanks in advance

share|improve this question
add comment

1 Answer 1

You can add empty tables to PostGIS in Geoserver:

Before this view can be served by GeoServer, the following step is necessary to manually create the geometry_columns entry:

INSERT INTO geometry_columns VALUES ('','public','my_view','my_geom', 2, 4326, 'POINT' );

http://docs.geoserver.org/latest/en/user/data/postgis.html

share|improve this answer
    
Hi @Mapperz. I added the values above into the relevant geometry_columns table but when i go to add a new layer from my data store the entry is not available. any ideas –  Richard Banks Apr 26 '11 at 14:54
    
did you CREATE TABLE them, too? The example above implies my_view has a point geometry field called my_geom –  Ragi Yaser Burhum Apr 26 '11 at 17:06
add comment

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.