[postgis-users] Spheroid Question
Dan Phillips
danp at americanclearinghouse.com
Fri Jun 24 12:45:50 PDT 2005
Much better! (29 seconds)
Thanks Paul,
Dan
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of Paul
Ramsey
Sent: Friday, June 24, 2005 3:32 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Spheroid Question
Unless you are desperate to get the correct answer to the n'th degree of
accurace, try distance_sphere, it's 10 times faster.
Dan Phillips wrote:
> 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
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
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