On Fri, Sep 6, 2013 at 6:14 PM, Pepijn Van Eeckhoudt <
pep...@vaneeckhoudt.net> wrote:

> On 06 Sep 2013, at 17:58, Dominique Devienne <ddevie...@gmail.com> wrote:
>
> >> select Distance( constGeom, geometry ) from table, (select
> >> GeomFromText('Point(13.457 3)') as constGeom );
> >
> > Clever. Thanks for that.
>
> Simple and elegant. Thanks for the idea, I'll give it a try.
>
> > Or make your Distance function implementation do the GeomFromText
> > implicitly, with a bit of duck-typing.
>
> The semantics of Distance (or better ST_Distance) are defined in the ISO
> SQL/MM part 3 and OGC Simple Feature/SQL specs. I would prefer to avoid
> non-specified behaviour
>

Well, given the fact that SQLite does not have user-defined-types, the spec
is already abused by using a blob for the "geometry" type. And that's more
natural a query with the duck-typing IMHO, rather than joining with a
scalar query. And aux-data use in Distance would make it just as efficient.
But I get your point too. My $0.02 :) --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to