Revision: 6565
http://sourceforge.net/p/jump-pilot/code/6565
Author: ma15569
Date: 2020-10-02 14:29:59 +0000 (Fri, 02 Oct 2020)
Log Message:
-----------
Correct method to rasterize that derives from AdbToolbox
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-10-02 12:23:18 UTC (rev 6564)
+++
core/trunk/src/org/openjump/core/rasterimage/algorithms/RasterizeAlgorithm.java
2020-10-02 14:29:59 UTC (rev 6565)
@@ -209,14 +209,26 @@
}
}
}
+ for (int x=0; x < m_iNX; x++ ) {
+ for (int y=0; y < m_iNY; y++ ) {
+ if(bimage.getRGB(x, y) != 0 &&
bimage.getRGB(x, y) != -1){
+ valori[x][y]=1;
+ }
+ }
+ }
}
- for (int x=0; x < m_iNX; x++ ) {
- for (int y=0; y < m_iNY; y++ ) {
- if(bimage.getRGB(x, y) != 0 && bimage.getRGB(x, y) !=
-1){
- raster.setSample(x, y, 0, dValue);
+ for (Iterator<Feature> it = inputFC.iterator() ; it.hasNext() ; )
{
+ Feature f = it.next();
+ dValue =
Double.parseDouble(f.getAttribute(attributeName).toString());
+ raster = GridRasterWrapper.matrixToRaster(valori);
+ for (int x=0; x < m_iNX; x++ ) {
+ for (int y=0; y < m_iNY; y++ ) {
+ if( valori[x][y]==1){
+ raster.setSample(x, y, 0, dValue);
}
- }
- }
+ }
+ }
+ }
RasterImageIO rasterImageIO = new RasterImageIO();
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel