[fdo-internals] FDO RFC 16 - FDO Provider for SQLite

Traian Stanev traian.stanev at autodesk.com
Wed Apr 23 00:29:16 EDT 2008


Yes, so the problem is that the type mapping code had an incomplete set of data types -- it assumed that SQLite reports data types that are already mapped to SQLite affinities, while in fact it returns whatever was in the raw SQL that created the table. In this case, VARCHAR and FLOAT, instead of TEXT and REAL respectively. I'm going to add some more types that I got off the SQLite documentation, but will still return an invalid value (-1) if the type cannot be mapped, in order to catch more type mapping problems as we get more sample data. I was tempted to return Int32 if the type cannot be mapped, but decided it would be just a tad too reckless to do so.

Traian

> -----Original Message-----
> From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-
> bounces at lists.osgeo.org] On Behalf Of Traian Stanev
> Sent: Wednesday, April 23, 2008 12:10 AM
> To: FDO Internals Mail List
> Subject: RE: [fdo-internals] FDO RFC 16 - FDO Provider for SQLite
>
> Yeah so I'm obviously wrong in my guess about the problem being the
> coord sys. I'd need to go and see what exactly Mapguide is calling to
> get a data type. So yes, it could be a problem with the schema
> creation, it just needs some debugging to get to the problem.
>
> Traian
>
>
> > -----Original Message-----
> > From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-
> > bounces at lists.osgeo.org] On Behalf Of Jason Birch
> > Sent: Wednesday, April 23, 2008 12:00 AM
> > To: FDO Internals Mail List
> > Subject: RE: [fdo-internals] FDO RFC 16 - FDO Provider for SQLite
> >
> > Frank's new files are still not working.  I don't think that MapGuide
> > has a specific requirement for a CS; it works fine with shape files
> > that
> > don't have projection info.
> >
> > This explanation doesn't make a lot of sense given where in the
> > MapGuide
> > code this is failing.
> >
> >
> http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Server/src/Services/
> > F
> > eature/ServerGetFeatures.cpp#l978
> >
> > (or thereabouts).  I find it amusing that the comment at the default
> > condition is "We will probably never hit this code" :)
> >
> > My guess would be that the provider is passing a data type that
> > MapGuide
> > hasn't accounted for or is not a valid FDO type.  From the code, it
> > looks like MapGuide understands:
> >
> >   Boolean, Byte, DateTime, Decimal, Double, Int16, Int32, Int64,
> > Single,
> > String, BLOB and CLOB.
> >
> > Traian, in your manual tests of describing the schema of Frank's
> > tables,
> > what data types are you getting?
> >
> > Jason
> >
> > -----Original Message-----
> > From: Traian Stanev
> > Subject: RE: [fdo-internals] FDO RFC 16 - FDO Provider for SQLite
> >
> >
> > The data reads fine in my manual tests, but Jason pointed out that it
> > errors out in MapGuide. One thing I noticed is that some of the
> > geometry
> > columns have an SRID equal to 0, meaning they don't have a coord sys.
> > Was that intentional? Generally FDO data sources are required to have
> a
> > coordinate system, so this is what could be causing the problem in
> > MapGuide.
> > _______________________________________________
> > fdo-internals mailing list
> > fdo-internals at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/fdo-internals
> _______________________________________________
> fdo-internals mailing list
> fdo-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-internals


More information about the fdo-internals mailing list