[PostGIS] #5689: Set PostGIS windows bundle environment for service rather than machine.

PostGIS trac at osgeo.org
Thu Jan 15 01:27:12 PST 2026


#5689: Set PostGIS windows bundle environment for service rather than machine.
--------------------------+-------------------------------
  Reporter:  slefranc     |      Owner:  robe
      Type:  enhancement  |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS Packaging
 Component:  install      |    Version:  3.4.x
Resolution:               |   Keywords:  windows
--------------------------+-------------------------------
Comment (by groenebijgeo):

 Hi, this week I stumbeld upon this issue (or a similar issue). I have both
 QGIS and PostgreSQL (15.15) with PostGIS (3.6.1) installed on a Windows
 machine. I use the recommended EDB installer for PostgreSQl and PostGIS.

 I started experimenting with GDAL ogr2ogr in a terminal. The latest QGIS
 LTR (currently 3.40.14) comes with GDAL 3.12.1 and with PROJ 9.7.1

 I noticed ogr2or had troubles with CRS, e.g. certain WFS conversions
 resulted in layers with CRS:99999. Running ogr2ogr from I got these
 errors:

 {{{
 ERROR 1: PROJ: proj_create_from_database: C:\Program
 Files\PostgreSQL\15\share\contrib\postgis-3.6\proj\proj.db contains
 DATABASE.LAYOUT.VERSION.MINOR = 2 whereas a number >= 6 is expected. It
 comes from another PROJ installation.
 }}}

 {{{
 ERROR 1: PROJ: proj_create: no database context specified
 ERROR 1: Cannot parse CRS http://www.opengis.net/def/crs/EPSG/0/5482
 }}}
 I got multiple of these errors, al referring to different CRS numbers.
 Looking into this I noticed that windows has a system environment variable
 PROJ_LIB which points to a proj folder in the PostGIS installation. And
 PostGIS comes with PROJ 8.2.1

 Then, running a Terminal from within QGIS it adds another variable
 PROJ_DATA pointing to the proj folder in QGIS.
 Running ogr2ogr in this terminal instance I don't get the CRS errors.

 This makes me assume the PROJ_LIB is causing errors (or PROJ 8.2.1 is?),
 but I also found somewhere that PROJ_LIB actually is no longer relevant
 for PROJ?
 I also saw ticket #5188 which mentions something similar.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5689#comment:10>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list