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

When I used osm2pgsql to load OpenStreetMap data into my postgis, I got the error message:Error reading style file line 1(fields = 1). I really don't know how to deal with it. Beg your help! Thanks very much!

asked 12 Oct '15, 03:46

kandifa's gravatar image

kandifa
11112
accept rate: 0%

It would help if you could add the full line of the osm2pgsql command you're using (and on what OS).

(12 Oct '15, 08:54) SomeoneElse ♦

I have the same problem. I tried to load *.pbf file via osm2pgsql. I copied the command from site, but when I replaced filename, I deleted one parametr.

Commnd from site:

C:>osm2pgsql -d gis -U postgres -W -H localhost -P 5432 -s -S C:\osm2pgsql\default.style RU-MOW.osm.pbf

My command:

osm2pgsql -d gis -U postgres -W -H localhost -P 5432 -s -S C:\RU-MOW.osm.pbf
Instead of style-file I specify pbf, and get the error:
Osm2pgsql Error reading style file line 2 (fields=1)

correct command:

C:>osm2pgsql -d gis -U postgres -W -H localhost -P 5432 -s -S C:\osm2pgsql-bin\default.style C:\osm.pbf

permanent link

answered 04 Jul '18, 09:41

Vladimir-554455's gravatar image

Vladimir-554455
112
accept rate: 0%

edited 04 Jul '18, 09:46

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
×134
×3

question asked: 12 Oct '15, 03:46

question was seen: 5,371 times

last updated: 04 Jul '18, 09:46

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