gecos-lab / PZero

GNU Affero General Public License v3.0
22 stars 2 forks source link

Failing shp import if no geometry is associated with attribute table #60

Open r-monti14 opened 7 months ago

r-monti14 commented 7 months ago

As of now to check if the input gdf contains Linestring or Multilinestring we look at the first entry of the shapefile. If this entry has no geometry (geometry column =None) or it is a non compatible geometry, the import fails and prints Only Point and Line geometries can be imported - aborting.. We should fix this either by:

  1. Analyse the Geometry column and select only LineString/MultilineString
  2. Print a different warning (e.g. "check the shapefile for anomalous geometries/entries")