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 a postgres/postgis table with the columns:

  • gid [PK] serial NOT NULL,
  • geom geometry(MultiPolygon,900913),
  • crop text

My layer in Geoserver however only shows me the feature types "geom" and "crop", the "gid" is not listed. Problem is, I need the gid to update data of a particular (the selected) polygon.

Is there a way to get the gid? If not, how do you bypass this problem?

share|improve this question
1  
look on the layer page and check the expose primary key box –  iant Dec 14 '12 at 12:02

1 Answer 1

up vote 4 down vote accepted

You must to check "expose primary key" in your datastore configuration DataStore configuration

share|improve this answer
    
Thank you!!! :) –  Cat Dec 14 '12 at 13:35

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.