[Tile-serving] [openstreetmap/osm2pgsql] Reprojection using flex config fails in Windows version (Issue #1949)

Mathias notifications at github.com
Thu Mar 16 20:06:58 UTC 2023


<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. -->

## What version of osm2pgsql are you using?
osm2pgsql version 1.8.1
Database version: 14.2 (Debian 14.2-1.pgdg110+1)
PostGIS version: 3.2

## What operating system and PostgreSQL/PostGIS version are you using?

Window 10 Pro, Version 21H2


## What did you do exactly?

Call: 

    osm2pgsql -c -C 4000 -O flex -S 09_osm_import.lua -d postgres://...  pirna.osm.pbf

Sample from configuration:

      local tables = {}
      local mySchema = 'public' -- Zielschema
      local srid = 32633 -- EPSG-Code für Daten
      
      tables.forest = osm2pgsql.define_area_table('forest', {
	      { column = 'fid', sql_sql_type = 'serial', create_only = true },
          { column = 'name', type = 'text' },
          { column = 'geom', type = 'multipolygon', projection = srid },
      }, {schema = mySchema})
  
    function osm2pgsql.process_way(object)
    
        -- A closed way that also has the right tags for an area is a polygon.
        if object.is_closed and (object.tags.landuse == 'forest' or object.tags.natural == 'wood') then
            tables.forest:add_row({
                name = object.tags.name,
                geom = { create = 'area' }
            })
        end
    end


## What did you expect to happen?

Reprojection from EPSG:4326 to EPSG:32633 during database import.

## What did happen instead?
  
    osm2pgsql version: 1.8.1
    proj_create: Cannot find proj.db
    proj_create: no database context specified
    2023-03-16 20:57:12  ERROR: Invalid projection from 4326 to 32633: Unknown error (code 2)

## What did you do to try analyzing the problem?

Check if proj.db is in the same directory as the osm2pgsql binary. It is present.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1949
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/issues/1949 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230316/1d4334f2/attachment.htm>


More information about the Tile-serving mailing list