But then you should have tagged all your geometries with 4326 in the first place, no? So then things *would* break, as required.

I'm with Paul on this - if a user hasn't taken the trouble to properly set the SRID, then PostGIS should just carry out the computation. Otherwise, you might as well insist that all geometries carry a valid SRID (not -1). But being able to use -1 is useful shorthand for quick computation.

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
-----Original Message-----
From: [email protected]
[mailto:[email protected]] 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
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users



_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users


--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to