Sunday 25 November 2018

openlayers 2 - Why does Geoserver not serve my primary key/ id?


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?



Answer



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


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...