Hi

Is there any plan to simplify geometries in WMS “vector” layers ?

I have been looking for a simple way to simplify the geometries in zoomed tiles for a layer.

My datastore being PostGIS, simply using the simplification mechanism of this datastore when querying it via WMS would be a simple and efficient solution. I do understand that WFS queries need to return untouched geometries, but why would WMS queries bypass the simplification process ?

Actually, I have to do a quite dirty trick, passing a viewparams with the current zoom level to the view and using this to simplify the geometry. The resulting tiles are nice, but take ages to generate because having a parametrized ST_Simplify in the query prevents any use of the index.

Thanks a lot

Regards

Arnaud

Hi,

You could generate another Geometry field in your table but generalized. Then, create another rule in your sld to switch geometry field according to the denominator.

Hope this helps.

## ···

Envoyé à partir d’Outlook

**De :** Arnaud LESAUVAGE arnaud.lesauvage@anonymised.com

**Envoyé :** 18 novembre 2022 11:12

**À :** geoserver-users@lists.sourceforge.net geoserver-users@anonymised.coms.sourceforge.net

**Objet :** [Geoserver-users] Simplify geometries for WMTS queries

Hi

Is there any plan to simplify geometries in WMS “vector” layers ?

I have been looking for a simple way to simplify the geometries in zoomed tiles for a layer.

My datastore being PostGIS, simply using the simplification mechanism of this datastore when querying it via WMS would be a simple and efficient solution. I do understand that WFS queries need to return untouched geometries, but why would WMS queries bypass the simplification process ?

Actually, I have to do a quite dirty trick, passing a viewparams with the current zoom level to the view and using this to simplify the geometry. The resulting tiles are nice, but take ages to generate because having a parametrized ST_Simplify in the query prevents any use of the index.

Thanks a lot

Regards

Arnaud

If I remember correctly you have a “enable on the fly simplification” in the postgis datastore.

Alexandre

Le ven. 18 nov. 2022 à 20:22, Arnaud LESAUVAGE <arnaud.lesauvage@anonymised.com> a écrit :

Hi

Is there any plan to simplify geometries in WMS “vector” layers ?

I have been looking for a simple way to simplify the geometries in zoomed tiles for a layer.

My datastore being PostGIS, simply using the simplification mechanism of this datastore when querying it via WMS would be a simple and efficient solution. I do understand that WFS queries need to return untouched geometries, but why would WMS queries bypass the simplification process ?

Actually, I have to do a quite dirty trick, passing a viewparams with the current zoom level to the view and using this to simplify the geometry. The resulting tiles are nice, but take ages to generate because having a parametrized ST_Simplify in the query prevents any use of the index.

Thanks a lot

Regards

Arnaud

Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,

Right, the option is documented in https://docs.geoserver.org/latest/en/user/data/database/postgis.html and it is on by default when a new PostGIS store is created. It affects at least WMS but I suppose WMTS as well. It has a side effect with small polygons, follow the links from https://gis.stackexchange.com/questions/253820/geoserver-shape-simplification-performance.

-Jukka Rahkonen-

## ···

**Lähettäjä:** Alexandre Gacon alexandre.gacon@anonymised.com

**Lähetetty:** perjantai 18. marraskuuta 2022 21.30

**Vastaanottaja:** Arnaud LESAUVAGE arnaud.lesauvage@anonymised.com

**Kopio:** geoserver-users geoserver-users@lists.sourceforge.net

**Aihe:** Re: [Geoserver-users] Simplify geometries for WMTS queries

If I remember correctly you have a “enable on the fly simplification” in the postgis datastore.

Alexandre

Le ven. 18 nov. 2022 à 20:22, Arnaud LESAUVAGE <arnaud.lesauvage@anonymised.com> a écrit :

Hi

Is there any plan to simplify geometries in WMS “vector” layers ?

I have been looking for a simple way to simplify the geometries in zoomed tiles for a layer.

My datastore being PostGIS, simply using the simplification mechanism of this datastore when querying it via WMS would be a simple and efficient solution. I do understand that WFS queries need to return untouched geometries, but why would WMS queries bypass the simplification process ?

Actually, I have to do a quite dirty trick, passing a viewparams with the current zoom level to the view and using this to simplify the geometry. The resulting tiles are nice, but take ages to generate because having a parametrized ST_Simplify in the query prevents any use of the index.

Thanks a lot

Regards

Arnaud

Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/geoserver-users