[Qgis-user] Unable to open XTF (INTERLIS 2) file in QGIS

Even Rouault even.rouault at spatialys.com
Fri Mar 17 06:15:17 PDT 2017


On vendredi 17 mars 2017 07:48:05 CET Germán Carrillo wrote:
> Hi All,
> 
> I'm attempting to visualize the data contained in a XTF file in QGIS (OGR
> provider). I'm using these data [1], specifically the Lake polygon layer,
> which has 3 features.
> 
> QGIS displays the geometries but cannot distinguish among features, i.e.,
> if I select one, all 3 lakes are selected. Moreover, all 3 records in the
> attribute table have the same attributes. Strangely, printing each
> feature's id using PyQGIS gives me -1.
> 
> One could think it's an OGR issue; however, the following OGR command is
> able to distinguish the 3 features properly, each one with its own id and
> attributes:
> 
> $ ogrinfo -ro data/CHBaseEx_WaterNet_V1.xtf CHBaseEx_WaterNet_V1.WaterNet_
> WithModificationObjects.Lake
> 
> 
> I've confirmed this issue in QGIS v2.14.x, 2.18.x, and 2.99 (built on
> Monday). In the latter, the attribute table shows only one record, although
> QGIS displays 3 polygons.
> 
> 
> Is this a known problem? Should I create an issue in QGIS Issue Tracking?

This is an issue in the OGR Interlis 2 driver that didn't set a feature id to the features, so it 
was left to its -1 default value (you could see it on the ogrinfo report)

Fixed per https://trac.osgeo.org/gdal/ticket/6839

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170317/c824ba75/attachment.html>


More information about the Qgis-user mailing list