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 11294b map ml wms vector representation query filter #359

Conversation

turingtestfail
Copy link

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).

@turingtestfail turingtestfail force-pushed the GEOS-11294b-MapML-WMS-Vector-Representation-query-filter branch from 7eeb165 to 577a75f Compare March 5, 2024 02:56
Copy link
Member

@aaime aaime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, see feedback below

@@ -355,6 +355,7 @@ private MapMLLayerMetadata layersToOneMapMLLayerMetadata(List<RawLayer> layers)
MapMLLayerMetadata mapMLLayerMetadata = new MapMLLayerMetadata();
mapMLLayerMetadata.setLayerMeta(new MetadataMap());
mapMLLayerMetadata.setUseTiles(false);
useFeaturesAllLayers = allLayersUsingFeatures(layers);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this one was meant to be gone, or not?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

WMSMapContent mapContent,
GeoServer geoServer,
HttpServletRequest httpServletRequest,
List<Query> queries) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the builder supports a single layer I'd recommend simplifying things, and getting a single Query object here, eventually null.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment on lines 173 to 197
ds.addFeature(
feature(
polyType,
"polygon1",
"123 Main Street",
1000,
"POLYGON ((1 1, 2 2, 3 3, 4 4, 1 1))"));
ds.addFeature(
feature(
polyType,
"polygon2",
"95 Penny Lane",
2000,
"POLYGON ((6 6, 7 7, 8 8, 9 9, 6 6))"));
ds.addFeature(
feature(
polyType,
"polygon3",
"154 Sesame Street",
3000,
"POLYGON ((11 11, 12 12, 13 13, 14 14, 11 11))"));
ReferencedEnvelope mapBounds =
new ReferencedEnvelope(
0, 0.005, 0, 0.005, CRS.decode("urn:x-ogc:def:crs:EPSG:4326"));
Rectangle renderingArea = new Rectangle(256, 256);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given you're testing the query filter only, do you actually need to have features in the sample data source?
A DataUtilities.store(new EmptyFeatureColection(targetType))might work as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Comment on lines 17 to 20
/**
* This is a simple class that contains the information needed to render a layer.
*
* <p>Basically, for a SLD, you create one of these for each of the FeatureTypeStyles inside it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make it clear this is a copy of GeoTools code that is here to support building queries for rendering in formats that are not using StreamingRenderer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Comment on lines 48 to 49
* Utility class for creating a query selecting those features relevant to the style and extent of
* the given map, for the given layer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make it clear here too, that some of the same code is available buried somewhere down in GeoTools.
Also make it clear that unlike GeoTools, the query does not contain a selection of properties, because the usage points need to dump all properties (vector tiles use case) and indicate the current consumers are mapml and vector tiles.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

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.

2 participants