inasafe / inasafe_data

A GIT mirror of the InaSAFE test data svn repository
5 stars 9 forks source link

Invalid geometry in Jakarta boundary data #2

Open KolesovDmitry opened 10 years ago

KolesovDmitry commented 10 years ago

File kabupaten_jakarta.shp has a polygon with invalid geometry. For example, load the layer in QGIS, then:

p = iface.activeLayer()
for f in p.getFeatures():
    print f.attributes(), f.geometry().isGeosValid()

The result is:

[u'JAKARTA BARAT', 0.489965321] True
[u'JAKARTA PUSAT', 0.495809369] True
[u'JAKARTA SELATAN', 0.494102439] False
[u'JAKARTA TIMUR', 0.490687674] True
[u'JAKARTA UTARA', 0.496168105] True
timlinux commented 10 years ago

Hi

Yes I know about that - I left it there as in the real world people have broken data and I InaSAFE should be able to deal with it gracefully. Thanks for checking on that though!

Regards

Tim

On Thu, Jan 16, 2014 at 10:38 PM, Dmitry Kolesov notifications@github.comwrote:

File _kabupatenjakarta.shp has a polygon with invalid geometry. For example, load the layer in QGIS, then:

p = iface.activeLayer() for f in p.getFeatures(): print f.attributes(), f.geometry().isGeosValid()

The result is:

[u'JAKARTA BARAT', 0.489965321] True [u'JAKARTA PUSAT', 0.495809369] True [u'JAKARTA SELATAN', 0.494102439] False [u'JAKARTA TIMUR', 0.490687674] True [u'JAKARTA UTARA', 0.496168105] True

— Reply to this email directly or view it on GitHubhttps://github.com/AIFDR/inasafe_data/issues/2 .

Tim Sutton - QGIS Project Steering Committee Member

Visit http://linfiniti.com to find out about: