[postgis-users] Spheroid Question
Dan Phillips
danp at americanclearinghouse.com
Fri Jun 24 12:10:23 PDT 2005
Okay, this works. It's just really slow (~40 minutes). Any suggestions on
speeding this up?
SELECT
CRID,
distance_spheroid(centroid(the_geom),
setSRID(makepoint(-72.607912, 42.058052),4326),
'SPHEROID["GRS_1980",6378137,298.257222101]') as distance
FROM crrts
WHERE
the_geom && expand(setSRID(makepoint(-72.607912, 42.058052),4326),2000)
AND distance_spheroid(centroid(the_geom),
setSRID(makepoint(-72.607912, 42.058052),4326),
'SPHEROID["GRS_1980",6378137,298.257222101]')<2000 ;
Thanks,
Dan
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
strk at refractions.net
Sent: Friday, June 24, 2005 11:39 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Spheroid Question
On Fri, Jun 24, 2005 at 11:36:27AM -0400, Dan Phillips wrote:
> Thanks Jeff & Paul. That was the problem.
>
> Now I'm getting "ERROR: Operation on two geometries with different SRIDs"
>
> I assume this is because I'm not setting the SRID for my makepoint(). How
do
> I do this to make it match the SRID (4326) of my 'crrts' table?
Use the setSRID() function:
setSRID(makepoint())
--strk;
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list