gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.53k stars 819 forks source link

ogr2ogr is stripping non-FID fields #1729

Closed pnorman closed 9 years ago

pnorman commented 9 years ago

This causes errors when it tries to render

$ ogrinfo -so -al data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp
INFO: Open of `data/ne_10m_populated_places/ne_10m_populated_places_fixed.shp'
      using driver `ESRI Shapefile' successful.

Layer name: ne_10m_populated_places_fixed
Geometry: Point
Feature Count: 7343
Extent: (-179.589979, -90.000000) - (179.383304, 82.483323)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_84",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.017453292519943295]]
FID: Real (11.0)
$ ogrinfo -so -al data/ne_10m_populated_places/ne_10m_populated_places.shp
INFO: Open of `data/ne_10m_populated_places/ne_10m_populated_places.shp'
      using driver `ESRI Shapefile' successful.

Layer name: ne_10m_populated_places
Geometry: Point
Feature Count: 7343
Extent: (-179.589979, -90.000000) - (179.383304, 82.483323)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_84",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]
SCALERANK: Integer (4.0)
NATSCALE: Integer (4.0)
LABELRANK: Integer (4.0)
FEATURECLA: String (50.0)
NAME: String (100.0)
...

No idea why I've never seen this before

$ ogrinfo --version
GDAL 1.11.2, released 2015/02/10

Do we still need to run it through ogr2ogr? I can't recall if we've broken Mapnik 2.2 support in some other way.

matthijsmelissen commented 9 years ago

Which non-name fields do we need?

pnorman commented 9 years ago

Fixed topic, it's stripping non-FID

matthijsmelissen commented 9 years ago

Sorry, but what is FID?

pnorman commented 9 years ago

Sorry, but what is FID?

A shapefile field. Probably Feature ID.

mboeringa commented 9 years ago

A shapefile field. Probably Feature ID.

Correct, the equivalent of OBJECTID in ESRI File and Enterprise Geodatabases.

matkoniecz commented 9 years ago

also fixed by #1461