Mika, can you atleast create a ticket for this ( https://osgeo-org.atlassian.net/jira/software/c/projects/GEOT/issues) and add the information that you've found so far.
Thanks Ian On Thu, 11 Aug 2022 at 10:31, <m...@digikartta.net> wrote: > Jody, > I understand that. I still feel that this "bug" is something that needs > particular dev experience on Geotools or Java. I haven't been an active > developer for five years now and I have very limited time to investigate > things but.. > > I did what you asked and I can confirm and repeat this malfunction. > First of all Javas: > - java-11-openjdk-11.0.16.0.8-1.el7_9.x86_64 > - java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64 > and the code (Geotools): > > ExplicitBoundsShape dotShape = > new ExplicitBoundsShape( > new Ellipse2D.Double(-0.000001, -0.000001, > 0.000001, 0.000001)); > dotShape.setBounds(new Rectangle2D.Double(-0.5, 0.5, 1.0, 1.0)); > shapes.put("dot", dotShape); > > and especially this: > > new Ellipse2D.Double(-0.000001, -0.000001, 0.000001, 0.000001) > > Doesn't work (in Geoserver) with OpenJDK 11 > > This one does (almost the same functioning): > > new Ellipse2D.Double(-0.1, -0.1, 0.1, 0.1) > > And even this one (of course the dots are squares, not circles): > > new Rectangle2D.Double(-0.000001, -0.000001, 0.000001, 0.000001) > > I have no idea why this kind of behaviour, API should be 100% same. What > might have changed are the definitions of doubles and floats and maybe > some locale issues between 8 and 11, but I didn't find any that would > suite into this problem. So some kind of cul-de-sac for me, can't spend > any time on this without help. > > - mika - > > P.S. There's no unit test for this and probably some bugs or mix ups on > tests named as > > https://github.com/geotools/geotools/blob/main/modules/library/render/src/test/java/org/geotools/renderer/style/markwkt/ShapeMarkFactoryTest.java > Any way they wouldn't find this problem because no exceptions found even > though function is not what wanted. > > > > On 2022-08-09 16:46, Jody Garnett wrote: > > This list is for the developer side of the street; we can help you > > here when you submit a bug and start working on a patch. > > > > There should be some existing test cases for mark factory you can > > copy; or if you run a build in that environment they should *fail* if > > there is indeed a regression in OpenJDK11. > > > > As far as I know we are running all tests on OpenJDK8 and OpenJDK11 > > (both on build server and pull requests). > > > > Can you grab the source code and build in your environment? Perhaps > > you have a new OpenJDK11 with a problem; or are on a system such as > > windows that is not often used by developers. > > > > Jody > > > > On Tue, Aug 9, 2022 at 5:21 AM <m...@digikartta.net> wrote: > > > >> Hello, > >> maybe not the best platform to ask (spam..), but anyone having any > >> idea > >> of ShapeMarkfactory > >> > > ( > https://github.com/geotools/geotools/blob/26.5/modules/library/render/src/main/java/org/geotools/renderer/style/ShapeMarkFactory.java > ) > >> ..does it work with OpenJDK11 as planned? Or can someone debug that? > >> My problem is in Geoserver, loosing dot hatch if using OpenJDK11, > >> with 8 > >> it works. I found these lines, which I believe do the dots: > >> > >> ExplicitBoundsShape dotShape = > >> new ExplicitBoundsShape( > >> new Ellipse2D.Double(-0.000001, -0.000001, > >> 0.000001, 0.000001)); > >> dotShape.setBounds(new Rectangle2D.Double(-0.5, 0.5, 1.0, > >> 1.0)); > >> shapes.put("dot", dotShape); > >> > >> According to Javadoc that seems to be ok also with 11, but for some > >> reason dots disappear (SLD below). With for example shape://plus, > >> hatch > >> works, with dot, nothing. > >> > >> Thanks, > >> - mika - > >> > >> <?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor > >> xmlns="http://www.opengis.net/sld" > >> xmlns:sld="http://www.opengis.net/sld" > >> xmlns:gml="http://www.opengis.net/gml" > >> xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0"> > >> <sld:NamedLayer> > >> <sld:Name>Default Styler</sld:Name> > >> <sld:UserStyle> > >> <sld:Name>Default Styler</sld:Name> > >> <sld:FeatureTypeStyle> > >> <sld:Name>name</sld:Name> > >> <sld:Rule> > >> <sld:Name>Name something</sld:Name> > >> <sld:PolygonSymbolizer> > >> <sld:Fill> > >> <sld:GraphicFill> > >> <sld:Graphic> > >> <sld:Mark> > >> > >> <sld:WellKnownName>shape://dot</sld:WellKnownName> > >> <sld:Stroke> > >> <sld:CssParameter > >> name="stroke">#646464</sld:CssParameter> > >> <sld:CssParameter > >> name="stroke-width">2</sld:CssParameter> > >> </sld:Stroke> > >> </sld:Mark> > >> <sld:Size>5</sld:Size> > >> </sld:Graphic> > >> </sld:GraphicFill> > >> </sld:Fill> > >> </sld:PolygonSymbolizer> > >> </sld:Rule> > >> </sld:FeatureTypeStyle> > >> </sld:UserStyle> > >> </sld:NamedLayer> > >> </sld:StyledLayerDescriptor> > >> > >> _______________________________________________ > >> GeoTools-Devel mailing list > >> GeoTools-Devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/geotools-devel > > -- > > > > -- > > Jody Garnett > > > _______________________________________________ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > -- Ian Turton
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel