#5870 closed defect (fixed)
Topojson driver not reading all feature attributes
Reported by: | springmeyer | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
It appears that TopoJSON support is lacking handling for feature attributes? I'm not familiar enough with the TopoJSON spec to know if something changed, but here is a testfile that leaflet/github renders with attributes but ogrinfo does not: https://github.com/ohsk/topojson-shp-testing/blob/master/json/tl_2010_us-hawi_WGS84.json
I get only id
and name
showing up in the attributes and not fields like tract
, gid
, state
, etc:
ERROR 4: GeoJSON Driver doesn't support update. Had to open data source read-only. INFO: Open of `/Users/dane/projects/mapnik/3.x/hawaii.topojson' using driver `GeoJSON' successful. Layer name: tl_2010_us-hawi_WGS84 Geometry: Unknown (any) Feature Count: 326 Extent: (-178.309703, 18.910690) - (-154.806622, 28.402182) Layer SRS WKT: (unknown) id: String (0.0) name: String (0.0)
Downstream issue: https://github.com/mapbox/mapbox-studio/issues/1220
Change History (3)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 2.0 |
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
"id" and "name" are currently hardcoded in the driver. I don't recall the reason. Probably because it was based from examples with those attributes or early spec? I can see the spec at https://github.com/topojson/topojson-specification allows for arbitrary attributes like GeoJSON.