[postgis-users] Problem with using query layer in ArcGIS

Simon Greener simon at spatialdbadvisor.com
Sun Jul 8 16:22:09 PDT 2012


Muni,

>
> Thank you for helping me on this. I have no issues with accessing the tables from pgadmin III. >Infact I loaded the data using Postgis shapefile loader plugin. I could see, from pgadmin III, >that gid is primary key.  When I queried data from ArcMap, I checked gid column as only unique >identifier field. I did not install ArcSDE on the machine. With regards to configuration. What >configuration files (ArcSDE sever config file) I need to look to make sure no network issues >are there?

I have no specific experience with configuring access from ArcMAP to PostGIS not using an ArcSDE server (whose config settings are fine for most networks).

I can only assume that when you registered the table/column you told it that the GID was the unique identifier and it was "user maintained". Now, you say that the gid is the table's primary key. Did ArcGIS accept this as sufficient for a unique key? (The reason is that ESRI's GeoDatabases, as far as I can remember, are set up so that gid's are unique with an index but not database primary keys.)

>
> Cause the message, I get when I open the table of the queried layer in ArcMap is
>
> "Could not load data from the data source. If you can correct the problem, press the refresh >button to reload data. Possible problems can include bad network connection, invalid field, >etc. The SQL statement was not a select statement. The operation is not supported by this >implementation."

Can you turn on some sort of connection logging to see what sort of SQL is being generated and thus you can see why this is happening?
>
>
> Any suggestions you may have? Thanks in advance.

I, like most on this list, don't  have ArcGIS (too expensive) so it is difficult to replicate and fix. I would suggest  you try appropriate ESRI forum.

regards
Simon
>
> Regards,
>
> Muni
>
>
> Can you interact with the postgresql/Postgis data natively (ie via pgAminIII) without error? >Can't think of any case where this might not be the case. This smells very much like an ArcGIS/>ArcSDE configuration problem. In the old days, when one used the ArcSDE administration command >line tools, one would use sdelayer to create a layer over an existing table. That sdelayer >command included arguments to tell ArcSDE what column contained the unique identifier and >whether it was SDE maintained or user maintained. ArcSDE, back then, didn't require the column >to be a primary key, only unique.
>
>
> sdelayer -o add -l <table,column> -e <entity_mask> [-t <storage_type>] [Spatial_Index][{-R ><SRID> | [Spatial_Ref_Opts]}] [-M <minimum_id>] [{-f <init_features,avg_points> | -k ><config_keyword>}] [-E <{empty | xmin,ymin,xmax,ymax}>] [-L {ON | OFF}] [-C <row_id_column>[,>{SDE|USER}[,<min_ID>]]] [-P {HIGH | BASIC}] [-S <layer_description_str>] [-i {<service> | ><port#> | <direct connection>}] [-s <server_name>] [-D <database_name>] -u <DB_user_name> -p ><DB_user_password> [-q]
>
>
> For -C .....
>
>
> Specifies the name of the row ID column of the layer's business table and the optional minimum >row ID value
>
>
> For the register operation, it also specifies whether the row ID is to be registered as user or >ArcSDE maintained. If ArcSDE maintained, you can specify the starting value (min_ID) for the >row ID. If no minimum ID is specified, it defaults to 1. If you intend to register the feature >class with the geodatabase, you should register the row ID column as ArcSDE maintained.
>
>
> For the feature_info operation, it specifies the name of the row ID column that will be output >to a table in the database.
>
>
> Double check that this is your table/column configuration aligns with what I have said.
>
>
> regards
>
> Simon
>
>



-- 
Holder of "2011 Oracle Spatial Excellence Award for Education and Research."
SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
Email: simon at spatialdbadvisor.com
Voice: +61 362 396397
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)
GeoHash: r22em9r98wg
NAC:W80CK 7SWP3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120709/736ae615/attachment.html>


More information about the postgis-users mailing list