Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 8.0-M4
-
Fix Version/s: None
-
Component/s: main
-
Labels:None
-
Environment:OS X, Java 6
Description
I have an SLD (see line_rendering_transform.sld)
that contains two FeatureTypeStyles. The first FTS contains a
<sld:Transformation/> that uses the gs:BufferFeatureCollection process. The
second FTS just contains a LineSymbolizer. When I render this SLD with the
lines from the SLD Cook Book, I get the following image: rendering_transform_line1.png.
It appears that the LineSymbolizer from the second FTS is being applied to
the polygons created by the buffer process. I assumed that they would apply
to the original lines.
When I flip the order of the FTS (line above buffer) I get a wierder result: rendering_transform_line2.png
-
- line_rendering_transform.sld
- 15/Mar/12 11:43 PM
- 2 kB
- Jared Erickson
-
Hide
- RenderingTransformsFTS.zip
- 16/Mar/12 12:03 AM
- 74 kB
- Jared Erickson
-
- RenderingTransformsFTS/data/1.png 40 kB
- RenderingTransformsFTS/data/2.png 23 kB
- RenderingTransformsFTS/.../sld_cookbook_line.dbf 4 kB
- RenderingTransformsFTS/.../sld_cookbook_line.fix 0.3 kB
- RenderingTransformsFTS/.../sld_cookbook_line.prj 0.1 kB
- RenderingTransformsFTS/.../sld_cookbook_line.qix 0.3 kB
- RenderingTransformsFTS/.../sld_cookbook_line.shp 5 kB
- RenderingTransformsFTS/.../sld_cookbook_line.shx 0.3 kB
- RenderingTransformsFTS/pom.xml 3 kB
- RenderingTransformsFTS/src/.../jce/App.java 5 kB
- RenderingTransformsFTS/.../line_rendering_transform.sld 2 kB
- RenderingTransformsFTS/.../line_rendering_transform2.sld 2 kB
- RenderingTransformsFTS/src/.../AppTest.java 0.6 kB
-
- streaming_renderer.diff
- 18/Mar/12 10:02 PM
- 1 kB
- Jared Erickson
-
- streaming_renderer2.diff
- 25/Mar/12 10:07 PM
- 4 kB
- Jared Erickson
-
- streaming_renderer3.diff
- 21/Apr/12 11:15 PM
- 5 kB
- Jared Erickson
-
- rendering_transform_line1_afterpatch.png
- 47 kB
- 18/Mar/12 10:04 PM
-
- rendering_transform_line1.png
- 50 kB
- 15/Mar/12 11:43 PM
-
- rendering_transform_line2_after_patch.png
- 35 kB
- 18/Mar/12 10:04 PM
-
- rendering_transform_line2.png
- 28 kB
- 15/Mar/12 11:43 PM
-
- renderingTransform.png
- 2 kB
- 24/Apr/12 11:04 PM
Activity
Hide
Permalink
Jared Erickson
added a comment -
A small maven project that illustrates the bug.
Show
Jared Erickson
added a comment - A small maven project that illustrates the bug.
Show
Jared Erickson
added a comment - Patch that fixes the bug.
Hide
Andrea Aime
added a comment -
Yep, seems like a good fix. We need to factory out the block that classifies by tx in its own method to avoid confusion with variables and add a test before commit can be done
Show
Andrea Aime
added a comment - Yep, seems like a good fix. We need to factory out the block that classifies by tx in its own method to avoid confusion with variables and add a test before commit can be done
Hide
Jared Erickson
added a comment -
New patch with classification block extracted as a method. Andrea, I am not sure how to write a unit test for this. Could you point me in the right direction?
Show
Jared Erickson
added a comment - New patch with classification block extracted as a method. Andrea, I am not sure how to write a unit test for this. Could you point me in the right direction?
Hide
Andrea Aime
added a comment -
Ah, for this one the easiest thing is to make it render an image, and then peek it in different pixels to check if the actual rendering did what you expected. Or if you have perceptual diff installed on your machine, use ImageAssert
Have a look at LineTest in the renderer module or at the last test in GeometryTransformationTest
Have a look at LineTest in the renderer module or at the last test in GeometryTransformationTest
Show
Andrea Aime
added a comment - Ah, for this one the easiest thing is to make it render an image, and then peek it in different pixels to check if the actual rendering did what you expected. Or if you have perceptual diff installed on your machine, use ImageAssert
Have a look at LineTest in the renderer module or at the last test in GeometryTransformationTest
Hide
Jared Erickson
added a comment -
New patch with unit test using ImageAssert and perceptualdiff. I added a method to LineTest but had to add a test dependency of process-feature to the render module. I really appreciate the help so far Andrea, let me know if I can improve this patch in any way!
Show
Jared Erickson
added a comment - New patch with unit test using ImageAssert and perceptualdiff. I added a method to LineTest but had to add a test dependency of process-feature to the render module. I really appreciate the help so far Andrea, let me know if I can improve this patch in any way!
Hide
Jared Erickson
added a comment -
Just noticed that svn diff didn't include the image used in the ImageAssert unit test. This should go in src/test/resources/org/geotools/renderer/lite/test-data/line/
Show
Jared Erickson
added a comment - Just noticed that svn diff didn't include the image used in the ImageAssert unit test. This should go in src/test/resources/org/geotools/renderer/lite/test-data/line/
Hide
Andrea Aime
added a comment -
Patch applied on trunk with some modifications.
The SLD buffering distance was higher than in the image, resulting in a different map, the sld file name did not match the one in the code, and the dependency from a supported module towards an unsupported one is not usable since they won't be both in the build unless you specify -Dall.
For the latter I rolled a quick buffering function that does the same work without being a process and that keeps everything in memory (good enough for testing anyways).
The SLD buffering distance was higher than in the image, resulting in a different map, the sld file name did not match the one in the code, and the dependency from a supported module towards an unsupported one is not usable since they won't be both in the build unless you specify -Dall.
For the latter I rolled a quick buffering function that does the same work without being a process and that keeps everything in memory (good enough for testing anyways).
Show
Andrea Aime
added a comment - Patch applied on trunk with some modifications.
The SLD buffering distance was higher than in the image, resulting in a different map, the sld file name did not match the one in the code, and the dependency from a supported module towards an unsupported one is not usable since they won't be both in the build unless you specify -Dall.
For the latter I rolled a quick buffering function that does the same work without being a process and that keeps everything in memory (good enough for testing anyways).