King.Oracle & PostGIS provider failed with Empty tables

5 messages Options
Embed this post
Permalink
Bruno Scott

King.Oracle & PostGIS provider failed with Empty tables

Reply Threaded More More options
Print post
Permalink
When adding an empty table using King.Oracle or PostGIS provider on AutoCAD Map 2010
It throws this exception
'FdoPtr::operator->': Cannot execute function due to invalid value for the input parameter(s) 'p'.
The exception comes from gwsfdo.dll and it is pretty hard to find the cause.

After that it is not possible to use the "Create" function to add any records on the table.
I'm trying to fix this issue on the PostGIS provider
Does someone have any clue?

Bruno
Traian Stanev

RE: King.Oracle & PostGIS provider failed with Empty tables

Reply Threaded More More options
Print post
Permalink

Hi Bruno,

Does the PostGIS provider implement the SpatialExtents aggregate function? I seem to remember getting the same message with the OGR provider, and I think it was related to the lack of SpatialExtents capability.

Traian


> -----Original Message-----
> From: [hidden email] [mailto:fdo-internals-
> [hidden email]] On Behalf Of Bruno Scott
> Sent: Tuesday, May 26, 2009 4:40 AM
> To: [hidden email]
> Subject: [fdo-internals] King.Oracle & PostGIS provider failed with
> Empty tables
>
>
> When adding an empty table using King.Oracle or PostGIS provider on
> AutoCAD
> Map 2010
> It throws this exception
> 'FdoPtr::operator->': Cannot execute function due to invalid value for
> the
> input parameter(s) 'p'.
> The exception comes from gwsfdo.dll and it is pretty hard to find the
> cause.
>
> After that it is not possible to use the "Create" function to add any
> records on the table.
> I'm trying to fix this issue on the PostGIS provider
> Does someone have any clue?
>
> Bruno
> --
> View this message in context: http://n2.nabble.com/King.Oracle---
> PostGIS-provider-failed-with-Empty-tables-tp2973492p2973492.html
> Sent from the FDO Internals mailing list archive at Nabble.com.
>
> _______________________________________________
> fdo-internals mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fdo-internals
_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Bruno Scott

RE: King.Oracle & PostGIS provider failed with Empty tables

Reply Threaded More More options
Print post
Permalink
Yes it does now implement the spatialextents, but maybe there is a problem when the table is empty.
Do you know what an empty table should return on spatialextent? null, box(0,0,0,0)?
Bruno




Hi Bruno,

Does the PostGIS provider implement the SpatialExtents aggregate function? I seem to remember getting the same message with the OGR provider, and I think it was related to the lack of SpatialExtents capability.

Traian

</quo
Bruno Scott

RE: King.Oracle & PostGIS provider failed with Empty tables

Reply Threaded More More options
Print post
Permalink

I've just made some testing to check the spatialextents,
It does even not call the spatialextents function.
I only see the initial select that return 0 records

Bruno
Traian Stanev

RE: King.Oracle & PostGIS provider failed with Empty tables

Reply Threaded More More options
Print post
Permalink

In my case it was because the OGR provider doesn't support SpatialExtents, and the table being added as layer in Map3D had a null geometry in one feature. Map3D attempts to compute the extents of the layer by itself, in case the provider doesn't support SpatialExtents, and was throwing that same error when it encountered the null geometry (and tried to dereference the pointer).

Another problem that may generate a similar error is if from your DescribeSchema you return feature classes with NULL ClassCapabilities. This is the fix I did for the OGR (and SQLite) provider to avoid that particular problem:

    FdoPtr<FdoClassCapabilities> caps = FdoClassCapabilities::Create(*m_fc);
    caps->SetSupportsLocking(false);
    caps->SetSupportsLongTransactions(false);
    caps->SetSupportsWrite(true);
    m_fc->SetCapabilities(caps);

If the feature classes you return from DescribeSchema happen to not have an initialized capabilities object, you will also get that error.


Traian


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Bruno Scott
Sent: Wednesday, May 27, 2009 4:14 AM
To: [hidden email]
Subject: RE: [fdo-internals] King.Oracle & PostGIS provider failed with Empty tables



I've just made some testing to check the spatialextents,
It does even not call the spatialextents function.
I only see the initial select that return 0 records

Bruno
--
View this message in context: http://n2.nabble.com/King.Oracle---PostGIS-provider-failed-with-Empty-tables-tp2973492p2979703.html
Sent from the FDO Internals mailing list archive at Nabble.com.

_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals