SpatialExtents() in SQLite

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

SpatialExtents() in SQLite

Jackie Ng
Hi All,

Does the SQLite FDO provider support the SpatialExtent() aggregate function?

The capabilities say it does, but when I try to execute an FdoISelectAggregate command containing a SpatialExtent() computed property, it throws back an exception:

no such function: SpatialExtents

- Jackie
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Romica Dascalescu
Hi Jackie,

Do you call the function like below?

Thanks,
Romy.

FdoPtr<FdoISelectAggregates> select = (FdoISelectAggregates*)m_connection->CreateCommand (FdoCommandType_SelectAggregates);
FdoPtr<FdoIdentifierCollection> identifiers = select->GetPropertyNames();
FdoPtr<FdoIdentifier> identifier;

identifier = FdoComputedIdentifier::Create(L"SE_NAME", FdoPtr<FdoExpression>(FdoExpression::Parse(L"SpatialExtents(geometry)")));
identifiers->Add(identifier);

________________________________________
From: [hidden email] [[hidden email]] on behalf of Jackie Ng [[hidden email]]
Sent: Thursday, October 27, 2011 10:21 AM
To: [hidden email]
Subject: [fdo-users] SpatialExtents() in SQLite

Hi All,

Does the SQLite FDO provider support the SpatialExtent() aggregate function?

The capabilities say it does, but when I try to execute an
FdoISelectAggregate command containing a SpatialExtent() computed property,
it throws back an exception:

no such function: SpatialExtents

- Jackie

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/SpatialExtents-in-SQLite-tp6936514p6936514.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Jackie Ng
Hi Romy,

Yes, that's how I called it.

- Jackie
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Romica Dascalescu
Then, it must be something else... Here is an example with SC and it works.
 https://svn.osgeo.org/fdo/trunk/Providers/SQLite/Src/UnitTest/ReaderTest.cpp

Romy
________________________________________
From: [hidden email] [[hidden email]] on behalf of Jackie Ng [[hidden email]]
Sent: Thursday, October 27, 2011 11:06 AM
To: [hidden email]
Subject: [fdo-users] RE: SpatialExtents() in SQLite

Hi Romy,

Yes, that's how I called it.

- Jackie

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/SpatialExtents-in-SQLite-tp6936514p6936689.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Jackie Ng
I noticed in all cases the SpatialExtents() function is only added in conjunction with a Count() expression

Is Count() always required beside SpatialExtents()?

- Jackie
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Romica Dascalescu
No, I just tested: I comment out count identifier and it worked.
What FDO version you are using?

________________________________________
From: [hidden email] [[hidden email]] on behalf of Jackie Ng [[hidden email]]
Sent: Thursday, October 27, 2011 11:38 AM
To: [hidden email]
Subject: [fdo-users] RE: SpatialExtents() in SQLite

I noticed in all cases the SpatialExtents() function is only added in
conjunction with a Count() expression

Is Count() always required beside SpatialExtents()?

- Jackie

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/SpatialExtents-in-SQLite-tp6936514p6936826.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Jackie Ng
FDO 3.6 final

Actually I think I know what the problem is. In my test SQLite data store, the geometry property used by SpatialExtents() had an association to an non-existent spatial context.

Bit of a red herring error.

- Jackie
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Jackie Ng
Actually not so red herring after all.

Does SpatialExtents() work if joins are involved?

I am trying to do SpatialExtents(Geometry) with an inner join to another class definition and I get the "no such function" error.

- Jackie
Reply | Threaded
Open this post in threaded view
|

RE: SpatialExtents() in SQLite

Romica Dascalescu
Hi Jackie,

Yes, it seems this case is not "implemented", so we are not handle join select in aggregate select with SpatialExtents().
I might have a look at the issue but not sure when.

Thanks,
Romy.
________________________________________
From: [hidden email] [[hidden email]] on behalf of Jackie Ng [[hidden email]]
Sent: Wednesday, November 02, 2011 10:56 AM
To: [hidden email]
Subject: [fdo-users] RE: SpatialExtents() in SQLite

Actually not so red herring after all.

Does SpatialExtents() work if joins are involved?

I am trying to do SpatialExtents(Geometry) with an inner join to another
class definition and I get the "no such function" error.

- Jackie

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/SpatialExtents-in-SQLite-tp6936514p6955534.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users