<div dir="ltr">Change your tests. Early versions of geography were 4326-only, but it's now possible to have other geographic SRIDs<div><br></div><div>P</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 21, 2017 at 1:57 PM, J Smith <span dir="ltr"><<a href="mailto:dark.panda+lists@gmail.com" target="_blank">dark.panda+lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">G'day list.<br>
<br>
I was just updating some code recently that had some unit tests that<br>
tested some operations on geography columns and noticed that between<br>
PostGIS 2.1 and 2.2 the following query gives different results:<br>
<br>
SELECT ST_covers('SRID=4326;POLYGON((<wbr>5 5,5 10,10 10,10 5,5<br>
5))'::geography, 'SRID=4269;POINT(7 7)'::geography);<br>
<br>
On PostGIS 2.1 we get true, but on 2.2+ it errors out with "ERROR:<br>
XX000: Operation on mixed SRID geometries".<br>
<br>
I haven't been using PostGIS on any projects recently so I might be a<br>
bit behind the times, but is this expected behaviour? I would have<br>
assumed that SRID isn't really used on geography types and figured<br>
that everything would be coerced or otherwise transformed to 4326<br>
anyways.<br>
<br>
Is this new behaviour expected, or should I change my unit tests and<br>
code to match the new behaviour?<br>
<br>
Cheers<br>
______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-devel</a></blockquote></div><br></div>