[Featureserver] SQLite

Christopher Schmidt crschmidt at metacarta.com
Tue Jul 24 08:53:27 EDT 2007


On Mon, Jul 23, 2007 at 03:07:58PM -0700, Brent Pedersen wrote:
> hi, i'm on an sqlite kick. so i've uploaded an sqlite datasource for
> feature server:
> http://dev.featureserver.org/ticket/3
> and the code:
> http://dev.featureserver.org/attachment/ticket/3/SQLite.py
> it's just cribbed from DBM.py and PostGIS.py so there's  likely stuff
> in there from both of those that shouldnt be, but it's functional.
> 
> the justification is that it's more portable than postgis, more easily
> updated outside of FeatureServer than DBM, and accessible via any
> language.
> it has no extra dependencies in python2.5. and requires pysqlite2 in <=2.4
> 

Brent --

Thanks! I had originally been planning to do a sqlite DataSource, but
decided against it when I realized that earlier versions of Python
didn't have the neccesary support built in. It's good that 2.5 does, and
I'll definitely work on getting this in soon -- hopefully later this
week. 

Couple quick comments from a short readthrough: 

 * in general, we've avoided decorator syntax to maintain backwards
   compatibility with 2.3. (I was almost convinced I could drop this,
   until I found out that the IronPython and Jython ports are both based
   off something like 2.1. Sigh.) if it's possible to change the
   '@property' to something else, that would be cool. (If you can't suss
   it out, I can look at it when I get time.)
 * It looks like you might have reimplemented feature.get_bbox(),
   defined in DataSource.__init__, with your DataSource._bbox -- though
   I'm not 100% sure.
 * Oh man, it even supports open-ended attributes. sweet. I don't think
   we even bothered to do this with the standard PostGIS stuff...
   Though it looks like that might mean it doesn't support attribute
   queries. I might make that behavior a switch on the DS, so that it'll
   just shove everything in the main table if it is told to.

All in all, thanks a ton for this. We should have written it in the
first place, but hey, there's only so much you can do :)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list