Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

v7 to v8 - none of the WPS work #105

Closed
juan-guerschman opened this issue Feb 10, 2021 · 17 comments
Closed

v7 to v8 - none of the WPS work #105

juan-guerschman opened this issue Feb 10, 2021 · 17 comments
Assignees

Comments

@juan-guerschman
Copy link
Contributor

none of our WPS items under "analysis tools" work

{ "name": "Analysis Tools", "type": "group", "description": "The Analysis Tools provide time-series data for selected points (pixels) or regions (polygons). \n\nThe \"Mean for point or region\" function returns the mean value for the vegetation fractional cover fractions and precipitation for a given region or pixel.\n\nThe \"Proportion of region within a Total Vegetation Cover range\" function returns the proportion of a given region within a range of Total Vegetation Cover that you can select. \n\nSimply click on the function and follow the instructions. ", "preserveOrder": true, "items": [ { "name": "Mean for point or region (Monthly)", "url": "http://gsky.nci.org.au/ows/geoglam", "type": "wps", "identifier": "geometryDrill", "description": "This function returns the mean value for the monthly vegetation fractional cover fractions and precipitation for a given region or pixel. Fractional cover includes green cover, non-green cover and bare ground. Total vegetation cover is green+non-green. \n\nYou can provide the name of the polygon or pixel. You can click on a point, draw a polygon or select a polygon already displayed in the screen.\n\nThe output is a graph and the data can be downloaded as a csv file. " }, { "name": "Mean for point or region (8-day)", "url": "http://gsky.nci.org.au/ows/geoglam", "type": "wps", "identifier": "geometryDrill_8day", "description": "This function returns the mean value for the 8-day vegetation fractional cover fractions and precipitation for a given region or pixel. Fractional cover includes green cover, non-green cover and bare ground. Total vegetation cover is green+non-green. \n\nYou can provide the name of the polygon or pixel. You can click on a point, draw a polygon or select a polygon already displayed in the screen.\n\nThe output is a graph and the data can be downloaded as a csv file. " }, { "name": "Proportion of region within a Total Vegetation Cover range (Monthly)", "url": "http://gsky.nci.org.au/ows/geoglam", "type": "wps", "identifier": "geometryDrillPixelFraction", "description": "This function returns the proportion of a given region within a range of Total Vegetation Cover. Total cover is the sum of green and non-green cover. You can provide the name of the polygon. You must provide the lower and upper limits of total vegetation cover. You can click on a point, draw a polygon or select a polygon already diplayed in the screen.\n\nThe output is a graph and the data can be downloaded as a csv file. " }, { "name": "Proportion of region within a Total Vegetation Cover range (8-day)", "url": "http://gsky.nci.org.au/ows/geoglam", "type": "wps", "identifier": "geometryDrillPixelFraction_8day", "description": "This function returns the proportion of a given region within a range of Total Vegetation Cover. Total cover is the sum of green and non-green cover. You can provide the name of the polygon. You must provide the lower and upper limits of total vegetation cover. You can click on a point, draw a polygon or select a polygon already diplayed in the screen.\n\nThe output is a graph and the data can be downloaded as a csv file. " }

@AnaBelgun
Copy link
Member

To check first what is missing from WPS support in V8: TerriaJS/terriajs#4068

@AnaBelgun AnaBelgun changed the title NEW v7 - v8 - none of the WPS work v7 to v8 - none of the WPS work Feb 13, 2021
@na9da
Copy link
Contributor

na9da commented Mar 4, 2021

@juan-guerschman confirmed that the WPS in v8 is working and can be opened by clicking on the text of the item in the catalog explorer.

However, in v8 the catalog functions show a + icon in the explorer instead of the analysis (chart like) icon in v7. Clicking the + icon tries to add the item to workbench with no effect. This should be fixed to match the v7 behavior.

@juan-guerschman
Copy link
Contributor Author

not working on https://beta.geo-rapp.terria.io/
not found in config processes: /ows/geoglam?service=WPS&request=Execute&version=1.0.0

@juan-guerschman
Copy link
Contributor Author

how do I test it? The link above doesn't have the WPS in the catalog. In the one I was using https://beta.geo-rapp.terria.io/ the WPS work but don't show the results in a plot.

@nf-s
Copy link

nf-s commented Dec 6, 2021

Hi @juan-guerschman sorry I put the wrong test link - I have just updated it. You should be able to see WPS in the catalog now

@juan-guerschman
Copy link
Contributor Author

thanks. Works fine with point, polygon, but not with "existing polygon". The expected behaviour is to allow the user to click on an existing polygon on the screen.

@nf-s
Copy link

nf-s commented Dec 6, 2021

OK, I'll look into it and let you know when I have a fix

@nf-s nf-s assigned nf-s and unassigned na9da Dec 6, 2021
@nf-s
Copy link

nf-s commented Dec 6, 2021

Hi @juan-guerschman "existing polygon" should be working now. You can test it with the same link above

Cheers,
Nick

@juan-guerschman
Copy link
Contributor Author

point and polygon working fine, but existing polygon still throwing an error:

I'm using apolygon from https://geo.abs.gov.au/arcgis/rest/services/ASGS2016/SA2/MapServer/1

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>500 - Internal server error</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="/public/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all"/>
        <link href="/public/css/custom.css" rel="stylesheet" type="text/css" media="all"/>
        <link href='//fonts.googleapis.com/css?family=Roboto:300' rel='stylesheet' type='text/css'>
        <style>
            body {
                padding-top: 50px;
            }
            .starter-template {
                padding: 40px 15px;
            }
        </style>
        <!-- TODO: Complete this project :) -->
    </head>
    <body>
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="about.html"><img src="/public/img/nm-logo.png"></a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
            <li class="active"><a href="about.html">About National Map</a></li>
            <li ><a href="help/howto.html">Help &amp; FAQ</a></li>
            <li ><a href="privacy.html">Privacy</a></li>
            <li><a href="http://nationalmap.gov.au">Launch the National Map</a></li>
        </ul>

        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>
        <div class="container">


    <div class="starter-template">
    <div class="row">
        <div class="col-md-2">
            <img height="105" class="logo center-block" src="/public/img/pmc-stacked.jpg" style="opacity:0.6" alt="Logo of Department of the Prime Minister and Cabinet"><!-- match desaturated GA logo. -->
            <img height="80" class="logo center-block" src="/public/img/GA-dark.png" alt="Logo of Geoscience Australia">
            <img height="80" class="logo center-block" src="/public/img/data61-white.jpg" alt="Logo of Data61/CSIRO">
            <img height="140" class="logo center-block" src="/public/img/iawards.png" alt="Logo of iAwards">
            <img width="160" class="logo center-block" src="/public/img/Finalist-Innovation.gif" alt="Finalist in Innovation at CeBIT AU Business Awards 2015">
        </div>
        <div class="col-md-9">

        <h2>Internal server error</h2>
        <p>Something went wrong on our server. Please send an email to <a href="mailto:[email protected]">[email protected]</a>, explaining what you were doing at the time it happened. This will help us track down the cause.</p>
        <p><b>&larr; Return to <a href="/">NationalMap</a></b>.
        <div style="font-size: 300px; color: hsl(0, 100%, 85%); text-align:center">500</div>


    </div>
    </div>


        </div>
        <!-- Footer -->
<footer class="footer">
    <div class="container">
        <div class="col-lg-12">
            <p>&copy; Department of the Prime Minister and Cabinet, Department of Communications, and National ICT Australia Limited (NICTA) 2014-2015. All Rights Reserved.</p>
            <p>
                <strong><a href="#terms">Terms and conditions</a></strong> –
                <strong><a href="privacy.html">Privacy</a></strong>
            </p>
        </div>
    </div>
</footer>
        <script src="//code.jquery.com/jquery.min.js"></script>
        <script>
            $(document).ready(function () {
                if (location.hash) {
                    location.hash && $(location.hash + '.collapse').collapse('show');
                }
            });
        </script>
        <script src="/public/js/bootstrap.min.js"></script>
    </body>
</html>

@nf-s
Copy link

nf-s commented Dec 7, 2021

Hi @juan-guerschman

I've fixed the feature picking issue, please let me know if it works for you.

http://ci.terria.io/wps-v7-fix/#configUrl=https://raw.githubusercontent.com/TerriaJS/saas-catalogs-public/main/geo-rapp/map-config/dev.json

Cheers,
Nick

@nf-s
Copy link

nf-s commented Dec 7, 2021

Actually, I have just found a polygon which fails - give me a minute.

Never mind, the polygon I selected was too large - the server responded with something like this:

expected: 153121,
length: 153121,
limit: 102400,
type: 'entity.too.large'

Other than that, it seems to be working!

@nf-s
Copy link

nf-s commented Jan 18, 2022

Currently there is an issue with calling GSKY WPS through TerriaJS-server

For example:

Proxied through TerriaJS-Server

curl 'https://geo-rapp.dev.saas.terria.io/proxy/_1d/https://gsky.nci.org.au/ows/geoglam?service=WPS&request=Execute&version=1.0.0' \
  -H 'content-type: text/plain;charset=UTF-8' \
  --data-raw $'<?xml version="1.0" encoding="UTF-8"?>\n<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">\n  <ows:Identifier>geometryDrill</ows:Identifier>\n  <wps:DataInputs>\n    <wps:Input>\n      <ows:Identifier>geometry</ows:Identifier>\n      <wps:Data>\n        <wps:ComplexData>{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[0.31126143551543944,24.0709775348446,-2158.5837976252737]},"properties":{}}]}</wps:ComplexData>\n      </wps:Data>\n    </wps:Input>\n  </wps:DataInputs>\n  <wps:ResponseForm>\n    <wps:ResponseDocument storeExecuteResponse="true" status="true"/>\n  </wps:ResponseForm>\n</wps:Execute>\n' \
  --compressed

The request will time-out (504 Gateway Time-out)

Direct request

curl 'https://gsky.nci.org.au/ows/geoglam?service=WPS&request=Execute&version=1.0.0' \
  -H 'content-type: text/plain;charset=UTF-8' \
  --data-raw $'<?xml version="1.0" encoding="UTF-8"?>\n<wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">\n  <ows:Identifier>geometryDrill</ows:Identifier>\n  <wps:DataInputs>\n    <wps:Input>\n      <ows:Identifier>geometry</ows:Identifier>\n      <wps:Data>\n        <wps:ComplexData>{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[0.31126143551543944,24.0709775348446,-2158.5837976252737]},"properties":{}}]}</wps:ComplexData>\n      </wps:Data>\n    </wps:Input>\n  </wps:DataInputs>\n  <wps:ResponseForm>\n    <wps:ResponseDocument storeExecuteResponse="true" status="true"/>\n  </wps:ResponseForm>\n</wps:Execute>\n' \
  --compressed

Works fine

@nf-s
Copy link

nf-s commented Jan 18, 2022

I am removing proxy for now - by adding gsky.nci.org.au to corsDomains

@nf-s
Copy link

nf-s commented Jan 24, 2022

This was due to TerriaJS/terriajs-server#146 - fixed by downgrading NodeJS to 14

@nf-s
Copy link

nf-s commented Jan 27, 2022

Working dev and test

https://geo-rapp.test.saas.terria.io/

@nf-s
Copy link

nf-s commented Jan 27, 2022

Working in production!
https://beta.geo-rapp.terria.io

@nf-s nf-s closed this as completed Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants