Skip to content

Conversation

@na9da
Copy link
Collaborator

@na9da na9da commented Jul 29, 2025

What this PR does

Port region picker input for WPS from terriajs v7.

The WPS input parameter is described as below by setting a special mime type:

<Input minOccurs="1" maxOccurs="1">
   <ows:Identifier>region</ows:Identifier>
   <ows:Title>Region to run analysis</ows:Title>
   <ows:Abstract></ows:Abstract>
   <ComplexData maximumMegabytes="10">
     <Default>
       <Format>
         <MimeType>application/vnd.terriajs.region+json</MimeType>
       </Format>
     </Default>
   </ComplexData>
</Input>

The Execute request will have the parameter filled as below:

<wps:Input>
  <ows:Identifier>region</ows:Identifier>
  <wps:Data>
    <wps:ComplexData>{"regionType":"SA2","region":"51203"}</wps:ComplexData>
  </wps:Data>
</wps:Input>

Note the JSON payload with keys regionType and region. The region corresponds to the value of regionProp property specified in the region map definition. For SA2 it corresponds to sa2_5dig11. Should we change this to property name instead?

This currently requiresWMS type region mapping servers (or region maps with analyticsWmsServer configured).
See example region mapping definition.

Test me

Steps:

  1. Load this CI link with custom config.json > parameters > regionMappingDefinitonsUrl.
  2. Open the WPS catalog item from the catalog explorer
  3. You should see a parameter with Select region button - click it to start the region selection flow.

UI screenshot:
image

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants