Line | |
---|
1 | package cadastre_fr;
|
---|
2 |
|
---|
3 | public class BuildingsImageModifier extends ImageModifier {
|
---|
4 |
|
---|
5 | public BuildingsImageModifier() {super();};
|
---|
6 |
|
---|
7 | public BuildingsImageModifier(GeorefImage buildings, GeorefImage parcels) {
|
---|
8 | bufferedImage = buildings.image;
|
---|
9 | VectorImageModifier vim = new VectorImageModifier();
|
---|
10 | for (int x = 0; x < bufferedImage.getWidth(); x++) {
|
---|
11 | for (int y = 0; y < bufferedImage.getHeight(); y++) {
|
---|
12 | if (vim.isBuildingOrRoofColor(bufferedImage, x, y, false)
|
---|
13 | && !vim.isBackgroundColor(parcels.image, x, y)) {
|
---|
14 | // create a clear 'cut' for the parcels
|
---|
15 | bufferedImage.setRGB(x, y, parcelColor);
|
---|
16 | }
|
---|
17 | }
|
---|
18 | }
|
---|
19 | }
|
---|
20 |
|
---|
21 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.