SQL queries through FDO involving geometries

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SQL queries through FDO involving geometries

Jackie Ng
Hi All,

Do FDO providers that support SQL commands properly detect and convert geometry columns/expressions to FDO geometry values?

For example, suppose I execute this SQL command through FDO:

SELECT ID, MY_GEOM FROM TABLE

(where MY_GEOM is a SQL Server geometry/geography column)

Will the FDO SQL reader let me access MY_GEOM as a FDO geometry (ie. Am I able to call reader.GetGeometry("MY_GEOM")) ?

I'm researching an idea for MapGuide whose feasibility somewhat hinges on whether this is actually possible or not.

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

Re: SQL queries through FDO involving geometries

Traian Stanev

Hi Jackie,

With the SQLite provider at least, you can call GetGeometry on any column you want. Don't know about other providers. I am not sure what you gain from being able to call GetGeometry instead of GetBLOB or GetString though, because GetGeometry also returns just a blob.

Traian


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jackie Ng
Sent: Thursday, October 11, 2012 12:57 AM
To: [hidden email]
Subject: [fdo-users] SQL queries through FDO involving geometries

Hi All,

Do FDO providers that support SQL commands properly detect and convert geometry columns/expressions to FDO geometry values?

For example, suppose I execute this SQL command through FDO:

SELECT ID, MY_GEOM FROM TABLE

(where MY_GEOM is a SQL Server geometry/geography column)

Will the FDO SQL reader let me access MY_GEOM as a FDO geometry (ie. Am I able to call reader.GetGeometry("MY_GEOM")) ?

I'm researching an idea for MapGuide whose feasibility somewhat hinges on whether this is actually possible or not.

- Jackie



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SQL-queries-through-FDO-involving-geometries-tp5007900.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: SQL queries through FDO involving geometries

Jackie Ng
I wanted to explore the idea of rendering/stylizing features in MapGuide via raw SQL queries through FDO, which would require some uniform level of support from the FDO providers that support SQL commands in order to be feasible.

I know the King.Oracle provider does this correctly. The others are a bit of an unknown quantity.

- Jackie