3

I used query layer to load my layer from PostGIS and show it in ArcMap 10, I had two cases;

  1. if I defined the OID in the configuration of connection, there was no problem with the attribute table of the layer but my layer disappeared from the map.
  2. if I didn't define the OID, then the layer appeared in the map but when I try to open the attribute table of my layers the following error message occurs:

Error reading OID form table. Reading rows has been stopped. Check that the datasource is valid. OID mapped column has null value

... in the table was empty.

  • 1
    What version of PostgreSQL are you using? What is the definition and content of the "OID" column? Does a spatial index exist on the geometry column? – Vince Jul 5 '14 at 3:50
  • - i use PostgresSQL 9.1. - i have a id in my table and i specify it in configuration connection. - what do you mean by a spatial index (my table in postgis contain a identifical column (id type:serial) and a geometry column (shape type:geometry) ) – Yahia El Haddad Jul 5 '14 at 9:30
2

the problem is solved , i described what I did exactly ,in first i change the type of the id from the serial to integer in the table , i tried to load it with defining the OID in querylayer's advanced option, but without defining the srid or the spatial reference ,the result was: the layer appear in the map & i can open my attribute table wothout any problem,but my new prbleme now is : where i define the srid & the spatial reference of my country ; the layer disappear in the map. , so i can resume :

For case1 : the problem in reality was my new probleme but opaid no attention ; because when I set the OID , i defined also the srid & a spatial reference for that my layer dissapear.

for case2 : the attribute table was not appear because i dont define the unique identfier field .

my new probleme is solved also, i changed the srid in PostgreSQL with UpdateGeometrySRID before importing the table , the old srid was wrong (in the PostgreSQL was 0 and in querylayer option i entered 26191). & this implies a duplication .

1

I recall having this problem before with ArcMap. In my case it was because I didn't go back in to the definition of query layer to refresh the columns. I don't have ArcMap in front of me so forget where that is. Try doing that or creating a completely new query layer if you haven't tried that already.

0

I had this problem and it was caused by a curved polygon from the input table. I used ST_CurveToLine() on the geometry field and it solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.