Re: REGION

From: Francois Ochsenbein <francois-at-vizir.u-strasbg.fr>
Date: Thu, 10 May 2007 14:16:42 +0200

Hi Inaki,

OK, it's therefore just for the region syntax (not the query), sorry for the misunderstanding.

But I still don't see how you would write with regions how, for instance, you would write a search for tuples with overlapping error ellipses. I mean assuming 2 tables having the same schema (lon, lat, lon_err, lat_err) you could with the REGION syntax write the condition to get the tuples with overlapping regions ?

For circles (i.e. assuming that lon_err is always identical to lat_err on both tables, and I call them just "pos_err"), the predicate

    fDistanceLonLat(t1.lon, t1.lat, t2.lon, t2.lat) < (t1.pos_err + t2.pos_err)

locates all tuples with overlapping error circles. How would you write this condition with the REGION syntax ?

Cheers, francois

>
>Hi Francois
>What I was proposing was to use the BNF I was describing in the email
>before, which I believe is consistent with what Alex was suggesting,
>plus the specific syntax of the REGION following the specification of
>the footprint service. Therefore my suggestion would be like this:
>
><predicate> ::= <comparison_predicate>| <between_predicate> |
><in_predicate> | <like_predicate> | <null_predicate>
>| <exists_predicate> | <region_predicate>
>
><region_predicate> ::=
>REGION<period><region_verbs>
><left_paren>
><region_specification>
>[ <comma> <column_reference> [ { <comma> <column_reference> }... ] ]
><right_paren>
>
><region_verbs> ::= INTERSECTS | CONTAINS ...
><region_specification>
> ::= !! 'Footprint Service'-like syntax, e.g. RECT LATLON 37 -109.55 41 -102.05
>
>


Francois Ochsenbein       ------       Observatoire Astronomique de Strasbourg
   11, rue de l'Universite F-67000 STRASBOURG       Phone: +33-(0)390 24 24 29
Email: francois-at-astro.u-strasbg.fr   (France)         Fax: +33-(0)390 24 24 32
================================================================================
Received on 2007-05-10Z14:22:25