Package nz.org.riskscape.engine.output
Class ShapeFileNullMapper
java.lang.Object
nz.org.riskscape.engine.output.ShapeFileNullMapper
The Shapefile format does not support null values. Some shapefile readers such as ogr appear to handle nulls. ESRI software maps a null value to placeholder values on writing.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmapValueIfNecessary
(Object value, nz.org.riskscape.engine.types.Type type) Returns the value, or a mapped value should it be null.
-
Field Details
-
NULL_VALUE_TEXT
- See Also:
-
NULL_VALUE_NUMBER
-
NULL_VALUE_BOOLEAN
-
NULL_VALUE_DATE
-
NULL_VALUE_GEOMETRY
public static final org.locationtech.jts.geom.Geometry NULL_VALUE_GEOMETRY
-
-
Constructor Details
-
ShapeFileNullMapper
public ShapeFileNullMapper()
-
-
Method Details
-
mapValueIfNecessary
Returns the value, or a mapped value should it be null. The mapped value is safe to be used in shapefiles instead of the actual null value.
- Parameters:
value
- to maptype
- theType
that value should be- Returns:
- value or a mapped value if it is null and a mapping is known
-