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 by age or lithology not working in Staging or Live portal #55

Closed nmtoken closed 6 months ago

nmtoken commented 3 years ago

As reported in https://github.com/OneGeology/TechnicalDiscussion/issues/52

Using the filter by age analysis tool in either the staging portal or live portal (v2020.0.1) does not work correctly. Rather than providing an SLD based on the selected age, a generic SLD is supplied.

Like

<?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>OGE_1M_bedrock_GeologicUnit_age</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:PolygonSymbolizer>
                        <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:PolygonSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:NamedLayer>
</sld:StyledLayerDescriptor>

Similarly for lithology like:

<?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>OGE_1M_bedrock_GeologicUnit</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:PolygonSymbolizer>
                        <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:PolygonSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>
        </sld:UserStyle>
    </sld:NamedLayer>
</sld:StyledLayerDescriptor>
nmtoken commented 3 years ago

Filter by age has not been working for some time now: https://github.com/OneGeology/TechnicalDiscussion/issues/46

nicolas-m-brgm commented 3 years ago

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

nmtoken commented 3 years ago

Similar to comments for minerals SLD, staging portal not available, testing on live portal results in layer being removed. with message like:

layer 1GE BGS 1M surface geologic unit (GeoSciML Portrayal) has been removed from map because of an error during image loading

nicolas-m-brgm commented 2 years ago

Fix in release 2021.0.0

nmtoken commented 6 months ago

Noting, and still investigating, but found that when SLD url is given as HTTPS link, mapserver services are rejecting the request with errors in logs like:

msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 7 (Failed to connect to portal.onegeology.org port 443 after 157 ms: Bad access) for https://portal.onegeology.org/OnegeologyGlobal//slds/20240102_1704212523844_6.sld

Manually editing requests and using HTTP links for the SLD URL is working.

For example this fails:

https://portal.onegeology.org/OnegeologyGlobal/proxycesium?url=http%3A%2F%2Fogc2.bgs.ac.uk%2Fcgi-bin%2FBGS_OGE_Bedrock_and_Surface_Geology%2Fows%3Flanguage%3Deng%26SERVICE%3DWMS%26VERSION%3D1.3.0%26REQUEST%3DGetMap%26FORMAT%3Dimage%252Fpng%26TRANSPARENT%3DTRUE%26LAYERS%3DOGE_1M_bedrock_GeologicUnit%26SLD%3Dhttps%253A%252F%252Fportal.onegeology.org%252FOnegeologyGlobal%252F%252Fslds%252F20240102_1704212523844_6.sld%26CRS%3DEPSG%253A4326%26STYLES%3D%26WIDTH%3D1128%26HEIGHT%3D1149%26BBOX%3D49.33021889457221%252C-9.171424106428933%252C61.00561555820137%252C2.290584106428934&_=1704212203228

but this works:

https://portal.onegeology.org/OnegeologyGlobal/proxycesium?url=https%3A%2F%2Fogc2.bgs.ac.uk%2Fcgi-bin%2FBGS_OGE_Bedrock_and_Surface_Geology%2Fows%3Flanguage%3Deng%26SERVICE%3DWMS%26VERSION%3D1.3.0%26REQUEST%3DGetMap%26FORMAT%3Dimage%252Fpng%26TRANSPARENT%3DTRUE%26LAYERS%3DOGE_1M_bedrock_GeologicUnit%26SLD%3Dhttp%253A%252F%252Fportal.onegeology.org%252FOnegeologyGlobal%252F%252Fslds%252F20240102_1704212523844_6.sld%26CRS%3DEPSG%253A4326%26STYLES%3D%26WIDTH%3D1128%26HEIGHT%3D1149%26BBOX%3D49.33021889457221%252C-9.171424106428933%252C61.00561555820137%252C2.290584106428934

Not sure if this affects other server software, or is MapServer specific. Not sure if there is an issue with the SSL certificate for the portal