Newer
Older
import geopandas
def is_valid(resource, file):
"""Check if the content is a readable GML file."""
with open(file.name, "rb") as f:
try:
geopandas.read_file(f)
return True
except Exception as e:
resource["error"] = str(e)
return False