-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Feature description
I ran into a few errors while finding an example for #13749. Note these are all user errors as I didn't read the docs that write support wasn't available in the TopoJSON driver - so consider these low priority.
gdal vector convert "https://cdn.jsdelivr.net/npm/us-atlas@3/counties-albers-10m.json" my.topojson --of TopoJSON
ERROR 1: convert: Invalid value for argument 'output-format'. Driver 'TopoJSON' does not expose the required 'DCAP_CREATE' capability.A more user-friendly error here might be useful? E.g. Driver 'TopoJSON' does not have write support.
gdal vector convert "https://cdn.jsdelivr.net/npm/us-atlas@3/counties-albers-10m.json" counties-albers-10m.json
Warning 1: Several drivers matching json extension. Using GeoJSON
0...10...20...30...40...50...60...70...80...90...ERROR 1: Layer 'states' does not already exist in the output dataset, and cannot be created by the output driver.
ERROR 1: Terminating translation prematurely after failed
translation of layer states (use -skipfailures to skip errors)This was due to the source TopoJSON having multiple layers. The first layer is output successfully, which isn't clear from the output. Maybe a warning that multiple layers are not supported in the output format would be useful here?
Also -skipfailures isn't an option for gdal vector convert (see #13662).
gdal vector convert "https://cdn.jsdelivr.net/npm/us-atlas@3/counties-albers-10m.json" my.topojson
ERROR 1: Cannot guess driver for my.topojsonIf TopoJSON is picked up as the format, it would be good to report Driver 'TopoJSON' does not have write support.
Additional context
Again all the above are a result of my misunderstanding, not bugs.