[gdal-dev] FGDB Opening Sample File

Ragi Burhum ragi at burhum.com
Fri Apr 29 03:27:20 EDT 2011


There seems to be some misunderstandings about Relationship Classes,
so I may as well explain.

Relationship Classes come in two types

1.- Simple Relationship Classes
2.- Attributed Relationship Classes

Conceptually, they just relate one (or more) column(s) in one field to
another column(s) in another table. Besides also including cardinality
information, and enforcing referential integrity (when the underlying
db doesn't support it), they are used inside ArcGIS for display and
editing purposes. The fact that the may or may not have domains
associated with them is orthogonal to this discussion.

For the first kind (simple), they only exist in metadata tables - they
don't map to any physical tables on the db and thus should not be
mapped to anything inside OGR.

For the second kind (attributed), they do refer to actual non-spatial
tables on the db - we could map those to a non-spatial OGR table.

So bug #1 is skip simple relationship classes and enhancement #2 is
map attributed relationship classes to OGR non-spatial tables.

As far as TestData.gdb, none of the ESRI samples use it and just
calling open through the FileGDB API on it, fails, so it is corrupted
or a bug in the FileGDB beta 3 API - nothing that we can do about
that. The error returned, -2147467259 is E_FAIL (like you diagnosed
earlier Paul), and it is the most generic kind of COM Error... most of
the ESRI code relies on custom COM errors, but every once in awhile,
those errors are not propagated down the stack and the fall back when
no custom error is detected is E_FAIL. So basically, it just means
"error - that is all I can tell you sorry".

- Ragi


> Date: Thu, 28 Apr 2011 18:21:50 -0500
> From: Marius Jigmond <mariusjigmond at hotmail.com>
> Subject: Re: [gdal-dev] FGDB Opening Sample File
> To: Paul Ramsey <pramsey at opengeo.org>
> Cc: gdal-dev at lists.osgeo.org
> Message-ID: <BLU0-SMTP1528E899A080AF411751872B29B0 at phx.gbl>
> Content-Type: text/plain; charset="UTF-8"
>
> They are links between tables. Usually, between the attribute table of a
> feature class and a simple (non-spatial, as Mike said) table. But you
> can relate any kind of attribute tables.
>
> -marius
>
> On Thu, 2011-04-28 at 14:30 -0700, Paul Ramsey wrote:
>> Are they tables or links between tables?  I can see this is going to
>> be a hard project to do without ArcGIS handy :)
>>
>> P.
>>
>> On Thu, Apr 28, 2011 at 10:26 AM, Smith, Michael ERDC-CRREL-NH
>> <michael.smith at usace.army.mil> wrote:
>> > Relations are joins to non-spatial tables containing domain values etc. They
>> > are relational tables.
>> >
>> > Mike
>> >
>> >
>> > --
>> > Michael Smith
>> > Remote Sensing/GIS Center
>> > US Army Corps of Engineers
>> >
>> >
>> >
>> > On 4/28/11 1:19 PM, "Even Rouault" <even.rouault at mines-paris.org> wrote:
>> >
>> >> Le jeudi 28 avril 2011 02:11:30, Paul Ramsey a écrit :
>> >>>
>> >>> I assume the failures are relationships we don't handle yet (or ever
>> >>> and will need to be silenced).
>> >>>
>> >>
>> >> Not sure what those relations things are.
>> >>
>> >>> There is a test file in the FGDB API itself, and it fails to open
>> >>> entirely, which seems odd,
>> >>>
>> >>> [pramsey at localhost data]$ ogrinfo ./TestData.gdb
>> >>> ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
>> >>> ERROR 1: GDB Error: Failed to open Geodatabase long:-2147467259
>> >>> FAILURE:
>> >>> Unable to open datasource `./TestData.gdb' with the following drivers.
>> >>>
>> >>> Do other folks have trouble opening the ESRI sample file? The error
>> >>> code doesn't make much sense, it is supposed to mean "If the path is
>> >>> seriously in error, say pointing to the wrong drive, a -2147467259
>> >>> (E_FAIL) error is returned" and relates to the CreateGeodatabase
>> >>> method, not the OpenGeodatabase method.
>> >>
>> >> Yes I did notice that issue too. I assume either the example is corrupted,
>> >> either it is a bug in the FileGDB API, either... Perhaps reporting to ESRI
>> >> might be usefull. Or perhaps Ragi has some clues.
>> >>
>> >> Even
>> >> _______________________________________________
>


More information about the gdal-dev mailing list