[postgis-users] spatialreference.org srid insert error

Mike Toews mwtoews at gmail.com
Tue Jul 17 12:25:45 PDT 2012


On 18 July 2012 07:19, Peter Tittmann <ptittmann at gmail.com> wrote:
> Seems a little strange that spatialreference.org would produce an invalid
> insert statement. Regardless, thanks for the pointer.

Personally, I feel that spatialreference.org is a bit broke (but
otherwise an excellent resource!). Firstly, it is broke with respect
to the current version of PostGIS, where their SRID > MAX_SRID, thus
invalid. Secondly, their SRIDs are probably internal representations
in their database, so they have really peculiar codes. For instance,
if one were to use the definition of EPSG:4326 from
http://spatialreference.org/ref/epsg/4326/postgis/ they wound need to
use SRID=94326 to encode geometries, which is really odd and could
raise some unexpected behaviour if it were converted to a geography type.

So in general, try to set srid the same as auth_srid.

-Mike



More information about the postgis-users mailing list