No columns for tables in style files #272

Open
pnorman opened this Issue Feb 2, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@pnorman
Collaborator

pnorman commented Feb 2, 2015

Based on an IRC report.

If a style file has no node lines in it, osm2pgsql reports the error ERROR: No columns provided for table planet_osm_point.

In this case the user had the style file with the line way maxspeed text linear, so it was entirely sensible for them to have no point columns.

I recommended the workaround of using node,way maxspeed text linear and ignoring the planet_osm_point table, but really, there's no reason for them need it.

@mojodna

This comment has been minimized.

Show comment
Hide comment
@mojodna

mojodna Dec 24, 2015

Contributor

I'm seeing this with 0.88.1 and the following style (which creates tables w/ osm_id, tags, and way columns only):

way             way_area        real
way             z_order         integer

# These tags can be long but are useless for rendering.
# This indicates that we shouldn't store them.
# List from <http://lists.osm.org/pipermail/dev/2012-June/025046.html>
# OsmType  Tag          DataType     Flags
node,way        3dshapes:*      text    delete
node,way        AND_nosr_r      text    delete
node,way        b5m:*   text    delete
node,way        bak:*   text    delete
node,way        canvec:*        text    delete
node,way        created_by      text    delete
node,way        dcgis:* text    delete
node,way        FIXME   text    delete
node,way        geobase:*       text    delete
node,way        gnis:*  text    delete
node,way        kms:*   text    delete
node,way        KSJ2:*  text    delete
node,way        massgis:*       text    delete
node,way        mvdgis:*        text    delete
node,way        naptan:*        text    delete
node,way        ngbe:*  text    delete
node,way        nhd:*   text    delete
node,way        NHD:*   text    delete
node,way        note    text    delete
node,way        note:*  text    delete
node,way        notes   text    delete
node,way        osak:*  text    delete
node,way        source  text    delete
node,way        source:*        text    delete
node,way        sourcedb:*      text    delete
node,way        tiger:* text    delete
node,way        WroclawGIS:*    text    delete
node,way        yh:*    text    delete
node,way        rednap:* text   delete
node,way        ideewfs:* text  delete
node,way        ign:* text      delete

# mark ways as polygon without creating a column for them
node,way   addr:flats   text         phstore
node,way   aeroway      text         phstore
node,way   amenity      text         phstore
node,way   boundary     text         phstore
node,way   building     text         phstore
node,way   historic     text         phstore
node,way   golf         text         phstore
node,way   landuse      text         phstore
node,way   leisure      text         phstore
node,way   man_made     text         phstore
node,way   military     text         phstore
node,way   natural      text         phstore
node,way   place        text         phstore
node,way   power        text         phstore
node,way   railway      text         phstore
node,way   shop         text         phstore
node,way   sport        text         phstore
node,way   tourism      text         phstore
node,way   waterway     text         phstore

I get varying output depending on hstore arguments (or lack thereof); Unknown flag '' line 1, ignored may be a separate issue:

$ osm2pgsql -c -d simple -H localhost -k -S hstore.style -x delaware-20151208.osm.pbf
osm2pgsql SVN version 0.88.1 (64bit id space)

Using built-in tag processing pipeline
Osm2pgsql failed due to ERROR: No columns provided for table planet_osm_point
$ osm2pgsql -c -d simple -H localhost -j -S hstore.style -x delaware-20151208.osm.pbf
osm2pgsql SVN version 0.88.1 (64bit id space)

Unknown flag '' line 1, ignored
Unknown flag '' line 2, ignored
Using built-in tag processing pipeline
Osm2pgsql failed due to ERROR: No columns provided for table planet_osm_point
$ osm2pgsql -c -d simple -H localhost -S hstore.style -x delaware-20151208.osm.pbf
osm2pgsql SVN version 0.88.1 (64bit id space)

Unknown flag '' line 1, ignored
Unknown flag '' line 2, ignored
Using built-in tag processing pipeline
Osm2pgsql failed due to ERROR: No columns provided for table planet_osm_point
Contributor

mojodna commented Dec 24, 2015

I'm seeing this with 0.88.1 and the following style (which creates tables w/ osm_id, tags, and way columns only):

way             way_area        real
way             z_order         integer

# These tags can be long but are useless for rendering.
# This indicates that we shouldn't store them.
# List from <http://lists.osm.org/pipermail/dev/2012-June/025046.html>
# OsmType  Tag          DataType     Flags
node,way        3dshapes:*      text    delete
node,way        AND_nosr_r      text    delete
node,way        b5m:*   text    delete
node,way        bak:*   text    delete
node,way        canvec:*        text    delete
node,way        created_by      text    delete
node,way        dcgis:* text    delete
node,way        FIXME   text    delete
node,way        geobase:*       text    delete
node,way        gnis:*  text    delete
node,way        kms:*   text    delete
node,way        KSJ2:*  text    delete
node,way        massgis:*       text    delete
node,way        mvdgis:*        text    delete
node,way        naptan:*        text    delete
node,way        ngbe:*  text    delete
node,way        nhd:*   text    delete
node,way        NHD:*   text    delete
node,way        note    text    delete
node,way        note:*  text    delete
node,way        notes   text    delete
node,way        osak:*  text    delete
node,way        source  text    delete
node,way        source:*        text    delete
node,way        sourcedb:*      text    delete
node,way        tiger:* text    delete
node,way        WroclawGIS:*    text    delete
node,way        yh:*    text    delete
node,way        rednap:* text   delete
node,way        ideewfs:* text  delete
node,way        ign:* text      delete

# mark ways as polygon without creating a column for them
node,way   addr:flats   text         phstore
node,way   aeroway      text         phstore
node,way   amenity      text         phstore
node,way   boundary     text         phstore
node,way   building     text         phstore
node,way   historic     text         phstore
node,way   golf         text         phstore
node,way   landuse      text         phstore
node,way   leisure      text         phstore
node,way   man_made     text         phstore
node,way   military     text         phstore
node,way   natural      text         phstore
node,way   place        text         phstore
node,way   power        text         phstore
node,way   railway      text         phstore
node,way   shop         text         phstore
node,way   sport        text         phstore
node,way   tourism      text         phstore
node,way   waterway     text         phstore

I get varying output depending on hstore arguments (or lack thereof); Unknown flag '' line 1, ignored may be a separate issue:

$ osm2pgsql -c -d simple -H localhost -k -S hstore.style -x delaware-20151208.osm.pbf
osm2pgsql SVN version 0.88.1 (64bit id space)

Using built-in tag processing pipeline
Osm2pgsql failed due to ERROR: No columns provided for table planet_osm_point
$ osm2pgsql -c -d simple -H localhost -j -S hstore.style -x delaware-20151208.osm.pbf
osm2pgsql SVN version 0.88.1 (64bit id space)

Unknown flag '' line 1, ignored
Unknown flag '' line 2, ignored
Using built-in tag processing pipeline
Osm2pgsql failed due to ERROR: No columns provided for table planet_osm_point
$ osm2pgsql -c -d simple -H localhost -S hstore.style -x delaware-20151208.osm.pbf
osm2pgsql SVN version 0.88.1 (64bit id space)

Unknown flag '' line 1, ignored
Unknown flag '' line 2, ignored
Using built-in tag processing pipeline
Osm2pgsql failed due to ERROR: No columns provided for table planet_osm_point
@pnorman

This comment has been minimized.

Show comment
Hide comment
@pnorman

pnorman Dec 24, 2015

Collaborator

I'm seeing this with 0.88.1

Yes, the issue is still open.

Unknown flag '' line 1, ignored may be a separate issue:

Your style file doesn't give any flags for those columns.

For your use-case, just use the sample empty.style in the repo

Collaborator

pnorman commented Dec 24, 2015

I'm seeing this with 0.88.1

Yes, the issue is still open.

Unknown flag '' line 1, ignored may be a separate issue:

Your style file doesn't give any flags for those columns.

For your use-case, just use the sample empty.style in the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment