[postgis-users] PostGIS supported by which ArcGIS
adrian.term at gmail.com
Fri Jan 30 08:13:58 PST 2015
I finally managed what I wanted, and that is to be able to edit geometries
stored in PostgreSQL/PostGIS (non versioned) with both ArcMap and QGIS
following this steps :
- With pgAdmin create a new database using "template_postgis_20" (let's
name it database)
- From ArcCatalog - System Toolboxes - Data Management Tools - Geodatabase
Administration - Create Enterprise Geodatabase "esrifi" your previously
created database (In the Database field write the name of the database
previously created with pgAdmin)
-From ArcCatalog - Add Database Connection - connect to your "esrified"
geodatabase using sde superuser credentials (previously created). A new
connection will be created.
-Right click on the newly created connection - Administration - Add user
-Disconnect as sde and connect back to the database with the new user's
credentials. Here is a trick. ArcMap have a latency in disconnecting the
previous connection. So, delete the previous sde connection and restart
ArcMap or do whatever you now to be sure that you are connecting as the
newly created user.
-Connected as newly created user - Right click on connection - Import -
Feature classes and don't forget here at the bottom of the dialogue box
"Geodatabase Settings (optional)" to choose PG_GEOMETRY
-Go back in pgAdmin and in the user's schema (not SDE schema) :
1. Define a primary key on objectid column :
ALTER TABLE adrian.database
ADD CONSTRAINT objectid_pkey PRIMARY KEY(objectid);
2.Create a sequence :
CREATE SEQUENCE adrian.databse_objectid_sequence
ALTER TABLE adrian.database_objectid_sequence
OWNER TO adrian;
3.Autoincrement objectid column values according to the corresponding
ALTER TABLE adrian.database ALTER COLUMN objectid SET DEFAULT
That will be all.
On Fri, Jan 16, 2015 at 10:01 AM, Paolo Importuni <imppao at gmail.com> wrote:
> Hi Adrian,
> as far as I can remember there are two parameters in the table sde
> 'db_tune' that must be set to the PG_GEOMETRY type. I remember having the
> same problem some times ago, due to the fact that I had set only one
> parameter to the right type.
> Then, of course, you will have to delete your geometry type and re-import
> Let us know if you sort it out.
> 2015-01-15 21:23 GMT+01:00 Adrian Term <adrian.term at gmail.com>:
>> I have the following setup :
>> ArcGIS 10.2.2 for Desktop Advanced
>> ArcGIS 10.2.2 for Server
>> QGIS 2.6.1 Brighton
>> PostgreSQL 9.2.9-3
>> PostGIS 2.1
>> I managed to make them all hear each other following this instructions :
>> Data is loaded from ArcGIS with the "Import feature class (single)"
>> with the "PG_Geometry" configuration keyword in Geodatabase Settings.
>> With ArcGIS I can connect, view, edit and save the data stored in the
>> "esrified" PostgreSQL/PostGIS database tables.
>> Unfortunately, when I try to do the same thing in QGIS i get an error
>> message :
>> "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"
>> On the other hand, I tried to do the same thing with UDIG and everything
>> works perfect.
>> I assume that the issue in QGIS is something about what Birgit mentioned :
>> "If ArcGIS writes geometries into the PostgreSQL database it names the
>> geometry column as "shape" with the datatype "geometry"
>> Any ideas ?
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
> postgis-users mailing list
> postgis-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users