Chetan Tiwari wrote:
Hi All
I had a quick question about a relatively simple problem. I have 2
point-based datasets (table1 and table2). I'd like to find out which
dataset covers a larger geographic area. I guess there can be several
ways of trying to figure that out. What I'm using is a query like
select extent(t1.the_geom) ~ extent(t2.the_geom) from myschema.table1
t1, myschema.table2 t2;
Might ST_convexhull() give a "better" result.? You could then use the
ST_area() function on it... I think ST_extent() will give you a box3d,
which might be much larger than the geographical area covered.
Table 1 contains about 5500 points and table 2 around 8000. The query
takes about a minute to execute (with and without indexes on the_geom)
and I was wondering if there was something that I was doing wrong or
if there was a more efficient way of accomplishing this task?
I don't think an index could be used here, since you're using a function
that requires each individual value and therefore a table scan.
Thanks much,
Chetan
------------------------------------------------------------------------
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Chander
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users