VectorToRaster throws NullPointerException
------------------------------------------

                 Key: GEOT-3846
                 URL: https://jira.codehaus.org/browse/GEOT-3846
             Project: GeoTools
          Issue Type: Bug
          Components: process, unsupported, wps
    Affects Versions: 8.0-M1, 8.0-M0, 2.7.2, 2.7.1
         Environment: OS: Ubuntu 11.04
Java: 1.6.0_26
CPU: x86_64
            Reporter: Michael Romero
             Fix For: 2.7.3, 8.0-M2, 8.0-M1, 2.7.2
         Attachments: process-raster-patch.diff

The _execute_ method in VectorToRaster.java calls the _convert_ method passing 
an the {{attribute}} parameter as an Expression. When the type of {{attribute}} 
is checked in the _initialize_ method, it is always evaluated as an Expression 
and the {{transferType}} is never set. This causes a NullPointerException in 
the _processFeature_ method when {{transferType}} is used in the switch 
statement. Unit tests bypass the _execute_ method so they pass without this 
issue.

In the _processFeature_ there is a missing break statement for POLYGON, 
LINESTRING, and POINT geometry types.

Float (and Double) values are not getting read properly in the 
_flattenImageToFloat_ method.

Attached is a patch that fixes bugs above. The patch is applied to the 8.0-x 
releases after process-raster was separated out. The patch also includes a few 
more unit tests to test the _execute_ method, float values, and String values 
that evaluate to a Number.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to