Just wondering what the consensus is for or against adding Point to the region material?
It makes the set of types more or less complete and makes the CONTAINS and DISTANCE functions a bit more tidy. I know Alex prefers that Point is not a type of Region (eg one with no area). In geometry libraries I have used about half take this approach and it is certainly simpler when the Point includes a coordinate system.
One minor complication is that if we define it as
POINT(coordsys, longitude, latitude)
then I don't think one can trivially put this in a single column of a VOTable (query response). The reason is that it mixes string and double datatypes and the FIELD in VOTable seems to require a single datatype, so one could not use an arraysize=3. Maybe an arraysize=2 could be used if the coordsys can be stuffed someplace else... is that possible?
Anyway, we could define Point for use as above, then we would have
CONTAINS( <region>, <point> )
The downside of Point, as Alex mentioned, is that if an existing database has this in three columns AND they would really implement Point as a function then the user would have to write:
CONTAINS( CIRCLE('ICRS', 123, 45, 1), POINT(t.coordsys, t.longitude, t.latitude) )
and their point function would get evaluated to create a blob for many rows. However, so would CIRCLE without some care, plus I don't see that they would have to implement POINT: in such a case they could re-write the CONTAINS to match their own implementation, which would be optimal (eg they could really implement CIRCLE_VS_POINT( <circle columns>, <point columns>) if they wanted to.
So, I would vote for such a change, despite the apparent complications. And I am OK with including DISTANCE(<point>, <point>) as well if others think it is valuable.
Comments?
-- Patrick Dowler Tel/Tél: (250) 363-6914 | fax/télécopieur: (250) 363-0045 Canadian Astronomy Data Centre | Centre canadien de donnees astronomiques National Research Council Canada | Conseil national de recherches Canada Government of Canada | Gouvernement du Canada 5071 West Saanich Road | 5071, chemin West Saanich Victoria, BC | Victoria (C.-B.)Received on 2007-10-05Z19:58:32