Revision: 6528
http://sourceforge.net/p/jump-pilot/code/6528
Author: ma15569
Date: 2020-09-23 18:48:37 +0000 (Wed, 23 Sep 2020)
Log Message:
-----------
Correct bug pointed by Michael: if the attribute value is null it throws an
Exception. Now a null value in a vector generates a no data value in the output
raster
Modified Paths:
--------------
core/trunk/src/org/openjump/core/rasterimage/algorithms/RasterizeAlgorithm.java
Modified:
core/trunk/src/org/openjump/core/rasterimage/algorithms/RasterizeAlgorithm.java
===================================================================
---
core/trunk/src/org/openjump/core/rasterimage/algorithms/RasterizeAlgorithm.java
2020-09-23 16:47:27 UTC (rev 6527)
+++
core/trunk/src/org/openjump/core/rasterimage/algorithms/RasterizeAlgorithm.java
2020-09-23 18:48:37 UTC (rev 6528)
@@ -118,7 +118,11 @@
FeatureDataset inputFC = new FeatureDataset(inputC, schema);
for (Iterator<Feature> it = inputFC.iterator() ; it.hasNext() ; )
{
Feature f = it.next();
- dValue =
Double.parseDouble(f.getAttribute(attributeName).toString());
+ try {
+ dValue =
Double.parseDouble(f.getAttribute(attributeName).toString());
+ } catch (Exception e) {
+ dValue = NoData;
+ }
final Geometry geom = f.getGeometry();
if (geom.intersects(extent)) {
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel