NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I've only used osm2pgsql a few times with files from downloads.geofabrik.de and I've never run into a problem.

Today, I downloaded a PDF file from geofabrik (165 MB), created an empty databse in postgresql, and tried running it through osm2pgsql. This is the only output that I get...

C:\AKH_Maps\osm2pgsql>osm2pgsql -c -d gisdb-mi -U postgres -W -H localhost -S C:\AKH_Maps\osm2pgsql\default.style C:\AKH_Maps\GIS-sources\geofabrik\michigan-latest.osm.pbf
2020-12-09 21:05:16  osm2pgsql version 1.4.0

Password:

2020-12-09 21:05:22  Database version: 12.1
2020-12-09 21:05:22  Node-cache: cache=800MB, maxblocks=12800*65536, allocation method=1
2020-12-09 21:05:23  Setting up table 'planet_osm_point'
2020-12-09 21:05:23  node cache: stored: 0(0.00%), storage efficiency: 0.00% (dense blocks: 0, sparse nodes: 0), hit rate: 0.00%
2020-12-09 21:05:23  ERROR: Database error: ERROR:  type "geometry" does not exist
LINE 1: ... text,"width" text,"wood" text,"z_order" int4,way geometry(P...
                                                             ^


Any idea what the problem is?

asked 10 Dec '20, 03:37

AndrewNDeBear's gravatar image

AndrewNDeBear
11113
accept rate: 0%


You forgot to run the PostgreSQL command CREATE EXTENSION postgis (or enable the PostGIS extension in another way).

permanent link

answered 10 Dec '20, 08:45

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

Yup. That was it.

2020-12-10 08:57:23  Osm2pgsql took 129s (2m 9s) overall.

Thanks!

alt text

(10 Dec '20, 14:05) AndrewNDeBear

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×165
×40

question asked: 10 Dec '20, 03:37

question was seen: 2,018 times

last updated: 10 Dec '20, 15:29

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum