Hi,
first of all, apologies for the cross post, I've done it because the
refactor I'm proposing concerns both projects.

I want to add zoom level support in CSS, with a familiar syntax like [@z =
10] or [@z >= 15],
and an eventual tile matrix set choice as a top level directive like @tms
"myCustomTileMatrixSet".

In order to do so, I'll need to convert zoom levels to scale denominators,
and look up configured tile
matrix sets in GeoServer. YSLD has this problem basically already solved,
with a set of interfaces and
classes that have apparently nothing YSLD specific:

   - ZoomContext
   
<https://github.com/geotools/geotools/blob/029dc5c8ccc503de3cfd7f4d1c939d8056c260c4/modules/extension/ysld/src/main/java/org/geotools/ysld/parse/ZoomContext.java#L27>,
   describing relationships between zoom levels and scale denominators (e.g.,
   part of what a TileMatrixSet does)
   - ZoomContextFinder
   
<https://github.com/geotools/geotools/blob/029dc5c8ccc503de3cfd7f4d1c939d8056c260c4/modules/extension/ysld/src/main/java/org/geotools/ysld/parse/ZoomContextFinder.java#L27>,
   to lookup up ZoomContext by name
   - GWCZoomContextFinder
   
<https://github.com/geoserver/geoserver/blob/6e9e25c0c7cdda9ada9f33f8255130d3afc76801/src/extension/ysld/src/main/java/org/geoserver/ysld/GWCZoomContextFinder.java#L22>,
   to look up specifically GWC configured Tile Matrix Set objects.

I would like to propose the following refactoring, to reuse the same work
in the CSS parser

Step 1, move the  the ZoomContext* classes to gt-main, inside a new
org.geotools.styling.zoom package
(I've checked, it's not taken).

Step 2, move the GWCZoomContextFinder into the GWC module, again for
sharing purposes.

Then I will be able to use the same functionality from the CSS modules.
As an added bonus, I'd like to refactor the gs-ysld module so that it does
not depend on the GWC presence,
as a deploy might use alternative style languages in WMS, without having
tile caching embedded in the same process (e.g., GeoServer Cloud).
The code will look up a ZoomContextFinder using GeoServerExtensions, and if
not found, use the DefaultZoomContextFinder instead.

If there are no objections, I'll move on with the refactor next week.

Regards,

Andrea Aime


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to