[Geoserver-users] Pre-generalized features

Hi all,

I’ve pre-generalized a layer.

It works as expected but it doesn’t seem much faster. It’s hard to tell the difference.

Layer type : multipolygon

features : 86790

These polygons are spread on 2 different countries and the way of collecting data is different for each country resulting in diffrent polygons structure

Half of the polygons are 200 meters x 200 meters squares (lower part of the map) and these seem to be a reference to take into account before any pre-generalization process.

I’m a bit confused, in the example I found, they choose 5, 10, 20, and 50 meters for the pre-generalization process.

I’ve customised it and I’ve added 3 thresholds => 5, 10, 20, 50, 100, 150, 190

I stopped at 190, a bit before 200, because there’s no way to generalize a 200m x 200m square, is it ?

Now, maybe 86790 features is not enough to see a dramatic change in loading time.

So, my final question is : did I do that properly ? Is it worth pre-generalizing ? I’m not so sure…

Ben

[RESOLVED]

I found that pre-generalized feature only works with WMS service.

See discussion : http://osgeo-org.1560.x6.nabble.com/GeoServer-pregeneralized-features-extension-with-OpenLayers-td4981400.html

And indeed, this can be seen in Geoserver logs : Geoserver uses pre-generalization only when clients send WMS requests.

image002.png

···

Ben

De : DEGRÈVE Benoît [mailto:b.degreve@anonymised.com]
Envoyé : jeudi 25 juillet 2019 10:02
À : geoserver-users@lists.sourceforge.net
Objet : [Geoserver-users] Pre-generalized features

Hi all,

I’ve pre-generalized a layer.

It works as expected but it doesn’t seem much faster. It’s hard to tell the difference.

Layer type : multipolygon

features : 86790

These polygons are spread on 2 different countries and the way of collecting data is different for each country resulting in diffrent polygons structure

Half of the polygons are 200 meters x 200 meters squares (lower part of the map) and these seem to be a reference to take into account before any pre-generalization process.

I’m a bit confused, in the example I found, they choose 5, 10, 20, and 50 meters for the pre-generalization process.

I’ve customised it and I’ve added 3 thresholds => 5, 10, 20, 50, 100, 150, 190

I stopped at 190, a bit before 200, because there’s no way to generalize a 200m x 200m square, is it ?

Now, maybe 86790 features is not enough to see a dramatic change in loading time.

So, my final question is : did I do that properly ? Is it worth pre-generalizing ? I’m not so sure…

Ben

[RESOLVED]

I found that pre-generalized feature only works with WMS service.

See discussion : http://osgeo-org.1560.x6.nabble.com/GeoServer-pregeneralized-features-extension-with-OpenLayers-td4981400.html

And indeed, this can be seen in Geoserver logs : Geoserver uses pre-generalization only when clients send WMS requests.

···

Ben

De : DEGRÈVE Benoît [mailto:b.degreve@anonymised.com]
Envoyé : jeudi 25 juillet 2019 10:02
À : geoserver-users@lists.sourceforge.net
Objet : [Geoserver-users] Pre-generalized features

Hi all,

I’ve pre-generalized a layer.

It works as expected but it doesn’t seem much faster. It’s hard to tell the difference.

Layer type : multipolygon

features : 86790

These polygons are spread on 2 different countries and the way of collecting data is different for each country resulting in diffrent polygons structure

Half of the polygons are 200 meters x 200 meters squares (lower part of the map) and these seem to be a reference to take into account before any pre-generalization process.

I’m a bit confused, in the example I found, they choose 5, 10, 20, and 50 meters for the pre-generalization process.

I’ve customised it and I’ve added 3 thresholds => 5, 10, 20, 50, 100, 150, 190

I stopped at 190, a bit before 200, because there’s no way to generalize a 200m x 200m square, is it ?

Now, maybe 86790 features is not enough to see a dramatic change in loading time.

So, my final question is : did I do that properly ? Is it worth pre-generalizing ? I’m not so sure…

Ben

There isn’t really any benefit to generalising a 200m square, it only has 5 points and will (hopefully) always have 5 points no matter what you do to it, so there will be no speed up. In fact there is every chance of a slowdown due to the overhead of the pre-generalisation steps.

The other half of your map may or may not speed up but they don’t look very complex to me either.

Ian

···

Ian Turton

That is indeed the case, there is no other service that can use reduced resolution geometries. In the future the new features API (previously known as wfs3) might have an extension to return reduced resolution geometries based on a target resolution parameter passed in the request (there is chatter about it, but the extension is not formally defined yet).

Cheers
Andrea

Il ven 26 lug 2019, 16:27 DEGRÈVE Benoît <b.degreve@anonymised.com> ha scritto:

[RESOLVED]

I found that pre-generalized feature only works with WMS service.

See discussion : http://osgeo-org.1560.x6.nabble.com/GeoServer-pregeneralized-features-extension-with-OpenLayers-td4981400.html

And indeed, this can be seen in Geoserver logs : Geoserver uses pre-generalization only when clients send WMS requests.

Ben

De : DEGRÈVE Benoît [mailto:b.degreve@anonymised.com]
Envoyé : jeudi 25 juillet 2019 10:02
À : geoserver-users@anonymised.comet
Objet : [Geoserver-users] Pre-generalized features

Hi all,

I’ve pre-generalized a layer.

It works as expected but it doesn’t seem much faster. It’s hard to tell the difference.

Layer type : multipolygon

features : 86790

These polygons are spread on 2 different countries and the way of collecting data is different for each country resulting in diffrent polygons structure

Half of the polygons are 200 meters x 200 meters squares (lower part of the map) and these seem to be a reference to take into account before any pre-generalization process.

I’m a bit confused, in the example I found, they choose 5, 10, 20, and 50 meters for the pre-generalization process.

I’ve customised it and I’ve added 3 thresholds => 5, 10, 20, 50, 100, 150, 190

I stopped at 190, a bit before 200, because there’s no way to generalize a 200m x 200m square, is it ?

Now, maybe 86790 features is not enough to see a dramatic change in loading time.

So, my final question is : did I do that properly ? Is it worth pre-generalizing ? I’m not so sure…

Ben


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