OneGeology / TechnicalDiscussion

A location for TIG, TAG, and any future OneGeology technical group to discuss technical issues surrounding portal, catalogue, service implementations, etc
3 stars 1 forks source link

Portrayal of minerals layer is not working correctly #61

Closed nmtoken closed 3 years ago

nmtoken commented 3 years ago

Similar/related to https://github.com/OneGeology/TechnicalDiscussion/issues/55 the downloadable SLD for a example a query of Produced commodity > metalloid, is a generic style that makes no mention to the referenced search. The SLD applied shows no obvious filtering (so downloadable and applied SLD are the same and broken).

<?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>MR.MineralOccurrence</sld:Name>
        <sld:UserStyle>
            <sld:Name>onegeosld</sld:Name>
            <sld:Title/>
            <sld:FeatureTypeStyle>
                <sld:Name>name</sld:Name>
                <sld:FeatureTypeName>Feature</sld:FeatureTypeName>
                <sld:SemanticTypeIdentifier>SemanticType[ANY]</sld:SemanticTypeIdentifier>
                <sld:Rule>
                    <sld:PointSymbolizer>
                        <sld:Graphic>
                            <sld:Mark>
                                <sld:WellKnownName>circle</sld:WellKnownName>
                                <sld:Fill>
                                    <sld:CssParameter name="fill">
                                        <ogc:Literal>#FFD800</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="fill-opacity">
                                        <ogc:Literal>1.0</ogc:Literal>
                                    </sld:CssParameter>
                                </sld:Fill>
                                <sld:Stroke>
                                    <sld:CssParameter name="stroke">
                                        <ogc:Literal>#000000</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-linecap">
                                        <ogc:Literal>butt</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-linejoin">
                                        <ogc:Literal>miter</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-opacity">
                                        <ogc:Literal>1</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-width">
                                        <ogc:Literal>1</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-dashoffset">
                                        <ogc:Literal>0</ogc:Literal>
                                    </sld:CssParameter>
                                </sld:Stroke>
                            </sld:Mark>
                            <sld:Opacity>
                                <ogc:Literal>1</ogc:Literal>
                            </sld:Opacity>
                            <sld:Size>
                                <ogc:Literal>6</ogc:Literal>
                            </sld:Size>
                            <sld:Rotation>
                                <ogc:Literal>0</ogc:Literal>
                            </sld:Rotation>
                        </sld:Graphic>
                    </sld:PointSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:NamedLayer>
</sld:StyledLayerDescriptor>
nicolas-m-brgm commented 3 years ago

Fixed in staging, let me know if it ok for you

<?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>MR.MineralOccurrence</sld:Name>
        <sld:UserStyle>
            <sld:Name>onegeosld</sld:Name>
            <sld:Title/>
            <sld:FeatureTypeStyle>
                <sld:Name>name</sld:Name>
                <sld:FeatureTypeName>Feature</sld:FeatureTypeName>
                <sld:SemanticTypeIdentifier>SemanticType[ANY]</sld:SemanticTypeIdentifier>
                <sld:Rule>
                    <ogc:Filter>
                        <ogc:Or>
                            <ogc:PropertyIsEqualTo>
                                <ogc:PropertyName>representativeCommodity_uri</ogc:PropertyName>
                                <ogc:Literal>http://resource.geosciml.org/classifier/cgi/commodity-code/metalloid</ogc:Literal>
                            </ogc:PropertyIsEqualTo>
                            <ogc:PropertyIsEqualTo>
                                <ogc:PropertyName>representativeCommodity_uri</ogc:PropertyName>
                                <ogc:Literal>http://resource.geosciml.org/classifier/cgi/commodity-code/antimony</ogc:Literal>
                            </ogc:PropertyIsEqualTo>
                            <ogc:PropertyIsEqualTo>
                                <ogc:PropertyName>representativeCommodity_uri</ogc:PropertyName>
                                <ogc:Literal>http://resource.geosciml.org/classifier/cgi/commodity-code/arsenic</ogc:Literal>
                            </ogc:PropertyIsEqualTo>
                            <ogc:PropertyIsEqualTo>
                                <ogc:PropertyName>representativeCommodity_uri</ogc:PropertyName>
                                <ogc:Literal>http://resource.geosciml.org/classifier/cgi/commodity-code/boron</ogc:Literal>
                            </ogc:PropertyIsEqualTo>
                            <ogc:PropertyIsEqualTo>
                                <ogc:PropertyName>representativeCommodity_uri</ogc:PropertyName>
                                <ogc:Literal>http://resource.geosciml.org/classifier/cgi/commodity-code/germanium</ogc:Literal>
                            </ogc:PropertyIsEqualTo>
                            <ogc:PropertyIsEqualTo>
                                <ogc:PropertyName>representativeCommodity_uri</ogc:PropertyName>
                                <ogc:Literal>http://resource.geosciml.org/classifier/cgi/commodity-code/silicon</ogc:Literal>
                            </ogc:PropertyIsEqualTo>
                            <ogc:PropertyIsEqualTo>
                                <ogc:PropertyName>representativeCommodity_uri</ogc:PropertyName>
                                <ogc:Literal>http://resource.geosciml.org/classifier/cgi/commodity-code/tellurium</ogc:Literal>
                            </ogc:PropertyIsEqualTo>
                        </ogc:Or>
                    </ogc:Filter>
                    <sld:PointSymbolizer>
                        <sld:Graphic>
                            <sld:Mark>
                                <sld:WellKnownName>circle</sld:WellKnownName>
                                <sld:Fill>
                                    <sld:CssParameter name="fill">
                                        <ogc:Literal>#B6FF00</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="fill-opacity">
                                        <ogc:Literal>1.0</ogc:Literal>
                                    </sld:CssParameter>
                                </sld:Fill>
                                <sld:Stroke>
                                    <sld:CssParameter name="stroke">
                                        <ogc:Literal>#000000</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-linecap">
                                        <ogc:Literal>butt</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-linejoin">
                                        <ogc:Literal>miter</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-opacity">
                                        <ogc:Literal>1</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-width">
                                        <ogc:Literal>1</ogc:Literal>
                                    </sld:CssParameter>
                                    <sld:CssParameter name="stroke-dashoffset">
                                        <ogc:Literal>0</ogc:Literal>
                                    </sld:CssParameter>
                                </sld:Stroke>
                            </sld:Mark>
                            <sld:Opacity>
                                <ogc:Literal>1</ogc:Literal>
                            </sld:Opacity>
                            <sld:Size>
                                <ogc:Literal>6</ogc:Literal>
                            </sld:Size>
                            <sld:Rotation>
                                <ogc:Literal>0</ogc:Literal>
                            </sld:Rotation>
                        </sld:Graphic>
                    </sld:PointSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:NamedLayer>
</sld:StyledLayerDescriptor>
nmtoken commented 3 years ago

staging portal not available for testing at the moment (HTTP 503 status message)

nmtoken commented 3 years ago

On the live portal, testing against FIN GTK 1:1M MINERAL OCCURRENCES (Erml-Lite) allows an analysis to created, but on applying, the service gives an error and is removed from the view

nicolas-m-brgm commented 3 years ago

Fixed on staging and production portal