Commit e0e1a749 authored by Kris Vanneste's avatar Kris Vanneste
Browse files

Set 'replace_null_values' argument to 0 for MapInfo File format as well if it...

Set 'replace_null_values' argument to 0 for MapInfo File format as well if it is not specified in export_gis method of MultiData.
Explicitly set NULL values in to_ogr_feature method of SingleData.

git-svn-id: https://svn.seismo.oma.be/svn/seismo/mapping/layeredbasemap/trunk@5838 40b490c5-b4d9-47cb-8714-9bef99b524d5
parent 0f9455d2
......@@ -235,7 +235,8 @@ class SingleData(BasemapData):
if replace_null_values is not None:
feature.SetField(field_name, replace_null_values)
else:
feature.SetField(field_name, np.nan)
feature.SetFieldNull(field_name)
#feature.UnsetField(field_name)
#feature.SetFID(0)
feature.SetGeometry(self.to_ogr_geom())
return feature
......@@ -546,7 +547,8 @@ class MultiData(BasemapData):
"""
import os
if format == 'ESRI Shapefile' and replace_null_values is None:
if (format in ('ESRI Shapefile', 'MapInfo File')
and replace_null_values is None):
replace_null_values = 0
# TODO: determine out_filespec automatically from format, or
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment