[postgis-users] More Semantics: SRID Matching

Dylan Beaudette debeaudette at ucdavis.edu
Thu Jan 29 14:29:07 PST 2009


On Thursday 29 January 2009, Paragon Corporation wrote:
> I'm afraid I agree with Jan on this.  Like Brent said you'd want to know
> about the assumption being made, but I'd just assume not have warnings and
> without warnings things like this where there is no match are just too hard
> to debug.  And code running in lalala land is not going to be looking at
> warnings.
>
> Say your table had a projection of 4326 once and then later your change it
> to 2249 or whatever and had no idea there was code lying around thinking it
> was working with 4326.  Your code would mysteriously just stop producing
> results or odd results.
>
> I'd rather it just break than do the logically wrong thing.
>
> -1
>
> Thanks,
> Regina

I second this as well: -1 on assuming anything about SRID. Any kind of default 
behavior when it comes to SRID should assume the worst- i.e. different SRIDs. 
This is one of the only safety checks one has when working with geographic 
data.

Cheers,
Dylan



>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Jan
> Hartmann
> Sent: Thursday, January 29, 2009 4:52 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] More Semantics: SRID Matching
>
> I wouldn't do that. My experience is that you'll run into errors that are
> very hard to detect when you allow this sort of "default" behavior.
> What's wrong whith an extra setsrid or so?
>
> Jan
>
> Paul Ramsey wrote:
> > I just did this:
> >
> > aggtest=# select name from tm_world_2 where st_dwithin(the_geom,
> > 'POINT(32.4122 -21.2178)', 0.0001);
> > ERROR:  Operation on two geometries with different SRIDs
> >
> > And you know what, that seems a bit harsh to me. Given an operation
> > where one SRID is known (st_srid(the_geom) == 4326), and the other is
> > unknown (-1), can we not simply assume that everything is in the known
> > SRID?
> >
> > Comments?
> >
> > P
> > _______________________________________________
> > 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



-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341



More information about the postgis-users mailing list