Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEOS-11486] Mapml Adding customdims to mapMl document #371

Closed
wants to merge 7 commits into from

Conversation

dromagnoli
Copy link
Member

https://osgeo-org.atlassian.net/browse/GEOS-11486

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

@aaime
Copy link
Member

aaime commented Aug 1, 2024

@prushforth what do you think of this one?

@prushforth
Copy link
Collaborator

While I do see the custom dimension in the capabilities document, and of course the GetMap response in the preview reflects the default value, I don't see it reflected in any of the URLs in the text/mapml document as a DIM_WHATEVER variable / parameter, and I was hoping it would get reflected into a <map-select name="DIM_WHATEVER"> so that it could be queried by the client and be useful as a way to query the content. My understanding of how to use WMS dimensions is a bit limited, but if you create a custom dimension for a layer that has say 50 values for that dimension, you could present them for selection by the client. That's what I've done so far with non-custom dimensions, at least.

@dromagnoli
Copy link
Member Author

dromagnoli commented Aug 2, 2024

Hi @prushforth.
I think what are you looking for is already in place but I'm not sure if I understood correctly so I'm reporting how it works with the updated code on a sample layer rtadcp_customdim where I have configured a dim_corr custom dimension based on a corr4 existing attribute of the underlying featureType:

This is how the mapml HTML client preview looks like:
image

Where we can select one of the possible values and see the output reflected in the preview:
Selecting dim_corr = 23:
image

Selecting dim_corr = 24:
image

And when requesting the MapML output, I'm getting this content (Please, click on the image to enlarge it):
image

With all the supported map-options reported in the map-select

<map-select id="dim_corr" name="dim_corr">
<map-option>23</map-option>
<map-option>24</map-option>
<map-option>38</map-option>
<map-option>41</map-option>
... 
... 
... 
<map-option>241</map-option>
<map-option>242</map-option>
<map-option>243</map-option>
</map-select>

And the map-link containing the dim_corr parameter:

<map-link tref="http://localhost:8080/geoserver/it.geosolutions/wms?request=GetFeatureInfo&amp;query_layers=rtadcp_custom&amp;crs=MapML:WGS84&amp;bbox={xmin},{ymin},{xmax},{ymax}&amp;language=en&amp;cql_filter=&amp;version=1.3.0&amp;dim_corr={dim_corr}&amp;transparent=true&amp;service=WMS&amp;layers=rtadcp_custom&amp;width={w}&amp;x={i}&amp;feature_count=50&amp;y={j}&amp;styles=point&amp;info_format=text/mapml&amp;height={h}" rel="query"/>

When requesting the MapML output (with the check box on Use Tiles), I'm getting this (Please, click on the image to enlarge it):
image

Is it what you was expecting or are we still missing something?
Please, let us know.

@prushforth
Copy link
Collaborator

That's what I'm expecting. I couldn't recall where I put that custom data, so I tried it with the states layer on population and couldn't reproduce the results, so probably user error. Please proceed!

turingtestfail and others added 3 commits August 2, 2024 17:43
…oserver#7804)

* [GEOS-11368] Allow Freemarker templates to update MapML responses

started on template page

ftl file names correction

fixed xml code block and added map-property

Created preview header integration test and started extracting template

swapped in better method for empty feature

finished first integration test

switched to dedicated template

head template style

registering servicelink

fixed servicelink

changed serviceLink to base,path,kvp

cleanup

dollar signs breaking code block

started on subfeature span insertion with integration test

Got point xml interpolation working

progressing on polygon

Got polygon unmarshal working

got multipolygon to unmarshal

changed strings to coords and linestring parsing

removed interpolated, created head styles using basic mapml

attributes and point test working and phantom space removed

polygon and multipolygon tests

added feature id check to multipolygon test

tests with space replacement

version that uses lists of coordinates instead of strings

removed some other remainder stuff from the space thing

cleanup

added check for tagged geom

doc update

PR changes, mainly map-span

tests updated without xml escape

updated documentation removing cdata escaping

added template attributes to mapml feature

fixed attribute replacement and added documentation examples

more doc update

line test fix

fixed issue with geometrycollection and updated documentation with example

better output if error

format coordinates, including number of decimals

fixed pmd

PR doc updates and started on a wrapper

fixed underline in template doc

preview header change restored

test

remoe ipr iws

simplified optional

doc updates

* Small doc edits

* Make MapMLMapTemplate thread safe

* Make MapMLMapTemplate thread safe

---------

Co-authored-by: Andrea Aime <andrea.aime@gmail.com>
@dromagnoli
Copy link
Member Author

Closing PR after having rebased to main (which introduced some commits from Joseph and Andrea).
Official PR is here:
geoserver#7806

@dromagnoli dromagnoli closed this Aug 6, 2024
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.

4 participants