#5205 closed defect (fixed)
Reading empty MTK GML files returns None
Reported by: | tpikonen | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.11.0 |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | normal | Keywords: | MTK GML |
Cc: |
Description (last modified by )
Trying to read an MTK GML file which does not have any actual data, just container tags with python-ogr results in a NoneType object:
from osgeo import ogr ff = ogr.Open('/tmp/K23441.xml') type(ff) -> NoneType
The file in question is part of the official Finnish land survey database and can be downloaded e.g. here: http://kartat.kapsi.fi/files/maastotietokanta/kaikki/etrs89/gml/K2/K23/K23441_mtk.zip
This feature makes some conversion scripts (like ogr2osm) fail, so it would be nice to get an empty osgeo.ogr.DataSource object from empty containers, if possible.
Non-empty files work fine with the MTK GML driver, so thanks for that!
Change History (3)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 2.0 |
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 10 years ago
Milestone: | 2.0 → 1.11.0 |
---|
Note:
See TracTickets
for help on using tickets.
trunk r26339 "GML: open successfully GML datasources with 0 layers (#249, #5205)"