[postgis-devel] Rant on SRID -1 vs 0

Sandro Santilli strk at keybit.net
Tue Jul 16 00:15:55 PDT 2013


On Mon, Jul 15, 2013 at 05:38:22PM -0400, Stephen Woodbridge wrote:
> On 7/15/2013 5:36 PM, Bborie Park wrote:
>
> >I forget but can't you just shove in -1 for SRID? PostGIS 2.0 should
> >automatically clamp values < 0 to 0.
> 
> Yes this works, I was avoiding it because it raises an notice which
> messes with them test infrastructure.

If you don't care about testing warnings consider also using:

 SET client_min_messages TO ERROR;

(but yeah, the ST_Srid(<simple_geom_here>) trick works fine)

--strk;



More information about the postgis-devel mailing list