[postgis] distance(geometry,geometry) function
Dave Blasby
dblasby at refractions.net
Tue Jul 24 12:55:52 PDT 2001
> Not in general, no. This is all made more complex by the fact that
> postgis points and polygons are not seperate SQL types, but are instead
> mixed together within a single column of type "geometry", so you have to
> make your function accept all types of geometry objects. I'm curious
> why you chose this path instead of making each geometric type a
> different SQL type as with the built-in postgresql geometry types? Come
> to think of it, I'm not sure what postgis provides that the built-in
> types don't (except maybe much faster queries?).
I've actually been thinking of making types like GEOMETRY_POINT and
GEOMETRY_MULTIPOLYGON available (leaving the current GEOMETRY as
GEOMETRY_GENERIC). It just means a whole lot of extra functions for
handling all the operators and indexing. I think I've come up with a
plan that will make this much easier than writing a HUGE number of
support functions. I just need the time to do it. There's been some
dissention in the ranks arguing that it doesnt actually give you much
extra than whats already there.
As far as having more complex functions, since openGIS defines a
geometrycollection type, all those functions still have to provided.
Besides, its still legal to say distance(polygon, line) so all the
support functions need to be written anyways. Once they're written its
trivial to write the generic case (just pass smaller parts off to the
support functions).
The PostGIS geometry type is different from the standard PostgreSQL
geometry types in that (1) we support 3D (2) indexing on all types (3)
more advanced geometries (like polygons with holes) (4) collection-type
geometries (multi* and geometrycollection) and (5) no size limit.
dave
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think! http://promo2.yahoo.com/sbin/Yahoo!_BusinessNewsletter/survey.cgi
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the postgis-users
mailing list