0

I have a PostGIS database that uses the PG_Geometry stored in a shape field. This same database is a registered ArcGIS geodatabase. I am able to edit and create features in ArcGIS. I can connect, view and edit attribute data in QGIS, but when I try to create new features I get the error shown below. Ironically it seems that QGIS attempts to use ST_Geometry when writing the data even though the data are stored as PG_Geometry. I am looking for the setting in QGIS that will allow me to write the geometry data using PG_Geometry. Any help is much appreciated.

Could not commit changes to layer drp_occurrence

Errors: ERROR: 1 feature(s) not added.

Provider errors: PostGIS error while adding features: ERROR: column "shape" is of type geometry but expression is of type st_geometry LINE 1: ...atex","dgupdatey","catalognumbernumeric") VALUES (st_geomfro... ^ HINT: You will need to rewrite or cast the expression.

1

QGIS cannot use esri's geometry format so the error you are seeing if caused by something else.

When you create a feature class in arcgis and specify that you want to use the PG_GEOMETRY option, arcgis registers the table as having a generic geometry type column. You can see this in the public.geometry_columns table postgis uses as a central registry of spatial tables.

You should change this to a specific geometry type, like POINT, LINESTRING, POLYGON, MULTILINESTRING or MULTIPOLYGON.

The naming of spatial types and functions are many times equal between postgis and esri. The big difference is that esri stuff in stored in the sde schema. Postgis keeps these things in the public schema.

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.