[postgis-users] ArcGIS Data Interoperability Extension
Guy Carpenter
guyc at atgis.com.au
Thu Oct 28 17:00:46 PDT 2004
I took a look at the PgArc module
with ArcGIS 9.0 yesterday.
I grabbed a snapshot from CVS, and also downloaded the installer.
Here's what I learned:
A) INSTALLER:
The installer ran fine. I had to (gasp) read the
documentation to figure out what to do next, namely
turn on the extension in Tools->Extensions,
then add the PgArc toolbar by right-clicking on the
toolbar area and selecting the PgArc toolbar. Looks
good so far.
When I selected the PgArc Load button on the
toolbar I get a dialog message which says:
An error has occurred in the application.
Record the call stack sequence and the description of the error.
Error Call Stack Sequence
ICommand_OnClock
c:\data\pgarc_dev22jul03\pgarc_dev\extension\clsAddPgLayer.cls
Error Number
406
Description
Non-modal forms cannot be displayed in this host application from
an ActiveX DLL, ActiveX Control or Property Page
A little Googling led me to an explanation of the error here:
http://support.microsoft.com/kb/q171978/
Modeless forms displayed by in-process components cannot
function correctly unless they can communicate with the
client's message loop. Therefore, in- process components
created with Visual Basic can display modeless forms only
in client processes that support such communication.
At that point I turned off the extension and
switched to the source from the CVS module pgarc_dev instead.
B) CVS
I browsed into the pgarc_dev module and loaded pgarc.mxd.
The tool bar loaded and this time I was able to open the PgArc
dialog, which prompts for a DSN.
At this point I decided I needed the Postgres ODBC
driver, and downloaded and installed that, and created a System
DSN pointing to my PostGIS server.
Back to PgArc, I selected the DSN and was able to see my tables. Yay!
Selecting a table and clicking the "Add Layer" button
resulted in a VB compilation error complaining about
unknown types.
It appears that ESRI have refactored their libraries in V9.0,
and I found it necessary to change all references to
esriCore.Fields to esriGeoDatabase.Fields
and several geometry types need to be changed from esriCore to esriGeometry,
like this one:
esriCore.POINT to esriGeometry.POINT
I made half a dozen changes like that to get a clean compile.
Next I encountered a run-time error:
CScotTools:CreatePolygon
Error number: -2147219879
Description: The field is not nullable. [feat_name]
I've isolated the problem to the assignment below marked "HERE".
'Create a new feature in the target layer
If pPolygon.GeometryCount > 0 Then
Set pFeature.Shape = pPolygon
For t = 3 To pFeature.Fields.FieldCount
If Not pFeature.Fields.Field(t - 1).Type = esriFieldTypeGeometry
And _
pFeature.Fields.Field(t - 1).Editable Then
pFeature.Value(t - 1) = FieldValue(t - 3) <-------
HERE
End If
Next
Set createPolygon = pFeature
Else
Set createPolygon = Nothing
End If
That's as far as I've gotten so far - I'm still get enough
context to figure out what's going on here.
A previous post indicated that PgArc *did* work with
ArcGIS 9.0. I wonder how?
Cheers,
Guy.
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
RIBOT, Nicolas
Sent: Thursday, 28 October 2004 8:07 PM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] ArcGIS Data Interoperability Extension
Hi Guy,
Thanx for this review.
I discovered the same as you did concerning the OleDB Postgis Connection:
able to connect, but no access to the postgis tables or views.
What you say makes me think that some improvements to the PgArc module could
still be interesting for postgis users. (partial data download, WKB
reading/writing to speed up object retrieval, possibilty to download data
from a SQL query, improved postgis writing by tracking data that have
changed, etc.)
I will try to see how these developments could be done in an acceptable
schedule.
Regards
Nicolas Ribot
More information about the postgis-users
mailing list