[postgis-users] Spheroid Question

Dan Phillips danp at americanclearinghouse.com
Fri Jun 24 08:36:27 PDT 2005


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?

SELECT
  CRID,
  distance_spheroid(centroid(the_geom),
  makepoint(-72.607912, 42.058052),
  'SPHEROID["GRS_1980",6378137,298.257222101]') as distance
FROM crrts
WHERE
  the_geom && expand(makepoint(-72.607912, 42.058052),2000)
  AND distance_spheroid(centroid(the_geom),
  makepoint(-72.607912, 42.058052),
  'SPHEROID["GRS_1980",6378137,298.257222101]')<2000 ;

Thanks again,

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: Thursday, June 23, 2005 5:03 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Spheroid Question


Yes, that's the secret sauce. The spheroid string parser is not exactly
a model of robustness. (Most people just copy and paste a string from
the docs so noone notices.)
Paul

Jeff Hoffmann wrote:

> Dan Phillips wrote:
>
>> I'm a PostGIS newbie & would really appreciate some help. I'm taking my
>> first stab at some basic sql and have hit a wall. The code below
>> generates
>> the error "SPHEROID parser - doesnt start with SPHEROID"
>
>
> This may sound silly, but have to tried capitalizing spheroid (i.e.,
> SPHEROID instead of spheroid)?  I think that may be case sensitive.
>

_______________________________________________
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