[postgis-users] Help shaping the future: how do you use spatial_ref_sys ?

Sandro Santilli strk at kbt.io
Fri Feb 4 11:10:27 PST 2022


On Fri, Feb 04, 2022 at 06:56:58PM +0000, Moen, Paul T. wrote:
> Sorry, we insert into the spatial_ref_sys table not the spatial_ref_sys.sql file.
> 
> We assign the SRIDs starting at 900000.  We have been setting the auth_name to 'EPSG' and the auth_srid to the same value as the srid.
> 
> Example. 
> 
> INSERT INTO spatial_ref_sys(srid, auth_name, auth_srid, srtext, proj4text) VALUES (6933, 'EPSG', 6933, '', '+proj=cea +lon_0=-100.5 +lat_ts=47.5 +x_0=2000000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +to_meter=0.3048 +no_defs');

Is the above an actual custom entry of yours ?
Because the SRID is NOT higher than 900000 as you mentioned.

What version of libproj are you using ?
Are you aware that given a new enough libproj (>= 6.1)
the proj4text in your record might not be used at all ?

In the spatial_ref_sys.sql file in current PostGIS 3.3 the
EPSG/6933 entry has a different proj4text:

  +proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs

You said you also keep the entries installed by spatial_ref_sys.sql,
does it mean at the time you issued the above example INSERT your
PostGIS version did NOT include an entry for SRID=6933?

--strk;

> 
> On 2/4/22, 12:04 PM, "postgis-users on behalf of Sandro Santilli" <postgis-users-bounces at lists.osgeo.org on behalf of strk at kbt.io> wrote:
> 
>     ***** CAUTION: This email originated from an outside source. Do not click links or open attachments unless you know they are safe. *****
> 
>     Thanks for answering Paul, more question inline
> 
>     On Fri, Feb 04, 2022 at 05:21:23PM +0000, Moen, Paul T. wrote:
> 
>     > We have 54 custom entries that we store in spatial_ref_sys.sql.
> 
>     Do you mean in the "spatial_ref_sys" PostgreSQL table or in the
>     "spatial_ref_sys.sql" file ?
>     How do you decide what SRIDs to assign to your custom entries ?
>     What auth_name and auth_srid do you use ?
> 
>     >> - Do you also keep the entries installed by spatial_ref_sys.sql ?
>     >
>     > Yes.
>     >
>     >> - Do you ever update the table with entries from newer
>     >>   spatial_ref_sys.sql ?
>     >
>     > No.
> 
>     Would you expect (or like) PostGIS upgrade to also upgrade
>     thse system entries ?
> 
>     How do you upgrade PostGIS ?
> 
> 
>     --strk;


More information about the postgis-users mailing list