Dear Andrea, Thank you very mutch for your clarification! Looking at the logs I was suspecting that but I'm not sure if it was developed in this way for some reason, f.e. we tested also GeoJSON with same result (no hint passed) so I was thinking that adding support for those hints may cause some side effects when using WFS (using those DataStore). If the activity will be approved by our management I'll proceed following your indications to prepare a PR at least for the vector-tyle extension since it will bring a great speedup improvement when generating new tiles. Best regards, C.
Il giorno sab 16 mag 2020 alle ore 10:39 Andrea Aime < andrea.a...@geo-solutions.it> ha scritto: > Hi Carlo, > by what I can see, the vector tiles plugin is not passing down the target > geometry resolution, it's not providing > neither the Hints.GEOMETRY_DISTANCE nor the Hints.GEOMETRY_SIMPLIFICATION, > so the pre-generalized > store cannot choose which overview level to choose. > > The vector tiles plugin should probably be modified, although I'm > wondering why this was not done when it was written. > Could be an oversight, but could have also been a conscious decision? > Maybe something related to producing > topologically valid geometries in output? And yet, the GEOMETRY_DISTANCE > hint is specifically designed to return > topologically valid geometries: > > /** > * Asks a datastore having a vector pyramid (pre-generalized > geometries) to return the geometry > * version whose points have been generalized less than the specified > distance (further > * generalization might be performed by the client in memory). > * > * <p>The geometries returned are supposed to be topologically valid. > */ > public static final Key GEOMETRY_DISTANCE = new Key(Double.class); > > Well, you know where to look and have familiarity with the source code... > PRs welcomed :-D > > Cheers > Andrea > > On Thu, May 14, 2020 at 6:45 PM carlo cancellieri < > geo.ccancelli...@gmail.com> wrote: > >> Dear list, >> we're trying to configure a pregeneralized datastore to speedup the >> vector tyles cache generation with no luck. >> >> Actually asking in layerpreview for a simple application/openlayer >> everything works very well. >> ------- >> 14 May 20:45:36 DEBUG [renderer.lite] - Computed scale denominator: >> 2.7922819993363017E8 >> 14 May 20:45:36 DEBUG [renderer.lite] - creating rules for scale >> denominator - 279,228,199.934 >> 14 May 20:45:36 DEBUG [data.util] - CRSConverterFactory can be applied >> from Strings to CRS only. >> 14 May 20:45:36 DEBUG [data.util] - InterpolationConverterFactory can be >> applied from Strings to Interpolation only. >> 14 May 20:45:36 DEBUG [renderer.lite] - Processing 1 stylers for >> n50:gadm36_0_3857_gen >> 14 May 20:45:36 DEBUG [renderer.lite] - Expanding rendering area by 2 >> pixels to consider stroke width >> 14 May 20:45:36 WARN [operation.projection] - Possible use of "Popular >> Visualisation Pseudo Mercator" projection outside its valid area. >> Longitude 2147483287░00.0'W is out of range (▒180░). >> 14 May 20:45:36 DEBUG [renderer.lite] - Querying layer >> n50:gadm36_0_3857_gen with bbox: ReferencedEnvelope[-2.4862478922090434E7 : >> 2.4862478922090434E7, -3.604277604743299E7 : 2.4315191650220517E7] >> 14 May 20:45:36 TRACE [util.factory] - ENTRY (GeometryFactory, >> JTS_GEOMETRY_FACTORY) >> 14 May 20:45:36 TRACE [util.factory] - RETURN (GeometryFactory, >> JTS_GEOMETRY_FACTORY): found implementation Optional. >> 14 May 20:45:36 DEBUG [data.gen] - Hint geometry distance: >> 62547.11678513289 >> 14 May 20:45:36 DEBUG [data.gen] - Hint geometry distance: >> 62547.11678513289 >> 14 May 20:45:36 INFO [data.gen] - Using generalizsation: postgis_n50 >> gadm36_0_3857 geom500 500.0 >> 14 May 20:45:36 DEBUG [geotools.jdbc] - CREATE CONNECTION >> 14 May 20:45:36 DEBUG [data.jdbc] - exporting PropertyName >> 14 May 20:45:36 DEBUG [data.util] - CRSConverterFactory can be applied >> from Strings to CRS only. >> 14 May 20:45:36 DEBUG [data.util] - InterpolationConverterFactory can be >> applied from Strings to Interpolation only. >> 14 May 20:45:36 DEBUG [geotools.jdbc] - SELECT >> "gid",ST_AsBinary("geom500") as "geom500" FROM "public"."gadm36_0_3857" >> WHERE "geom" && ST_GeomFromWKB(?, 3857) >> 14 May 20:45:36 DEBUG [geotools.jdbc] - 1 = POLYGON ((-24862478.922090434 >> -19971868.88040857, 24862478.922090434 -19971868.88040857, >> 24862478.922090434 19971868.880408563, -24862478.922090434 >> 19971868.880408563, -24862478.922090434 -19971868.88040857)) >> 14 May 20:45:48 DEBUG [geotools.jdbc] - CLOSE CONNECTION >> ----- >> >> Once we try to ask for a mapbox vector tile (or geoJson) to WMS using the >> layerpreview page, seems that the hint for the geometry distance is not >> used as well. >> >> ---- >> 14 May 20:49:34 DEBUG [geoserver.wms] - setting up map >> 14 May 20:49:34 DEBUG [data.gen] - Hint for geometry simplification in >> query, fallback to base feature >> 14 May 20:49:34 DEBUG [data.gen] - No hint for geometry distance in >> query, fallback to base feature >> 14 May 20:49:34 DEBUG [data.gen] - Hint for geometry simplification in >> query, fallback to base feature >> 14 May 20:49:34 DEBUG [data.gen] - No hint for geometry distance in >> query, fallback to base feature >> 14 May 20:49:34 DEBUG [geotools.jdbc] - CREATE CONNECTION >> 14 May 20:49:34 DEBUG [data.jdbc] - exporting PropertyName >> 14 May 20:49:34 DEBUG [data.util] - CRSConverterFactory can be applied >> from Strings to CRS only. >> 14 May 20:49:34 DEBUG [data.util] - InterpolationConverterFactory can be >> applied from Strings to Interpolation only. >> 14 May 20:49:34 DEBUG [geotools.jdbc] - SELECT >> "gid","gid_0","name_0",ST_AsBinary("geom") as "geom","fid" FROM >> "public"."gadm36_0_3857" WHERE "geom" && ST_GeomFromWKB(?, 3857) >> 14 May 20:49:34 DEBUG [geotools.jdbc] - 1 = POLYGON ((-20100916.899652816 >> -30304381.79087722, 20100916.899652816 -30304381.79087722, >> 20100916.899652816 18516704.85076622, -20100916.899652816 >> 18516704.85076622, -20100916.899652816 -30304381.79087722)) >> 14 May 20:52:01 DEBUG [geotools.jdbc] - CLOSE CONNECTION4 >> ------ >> >> Is this behaviour related to this thread?: >> >> https://subscription.packtpub.com/book/application_development/9781783289615/1/ch01lvl1sec18/improving-performance-with-pregeneralized-features >> >> >> If so, which is the best way to sort it out (use pregeneralized to >> speedup the vector tyle generation)? >> >> Our table has 4 geometry columns for each feature, may we can try to >> select them using an appropriate style? >> >> Thank you for your hints! >> >> C. >> >> -- >> Mr. Carlo Cancellieri >> *skype*: ccancellieri >> *Twitter*: @cancellieric >> *LinkedIn*: http://it.linkedin.com/in/ccancellieri/ >> _______________________________________________ >> Geoserver-users mailing list >> >> Please make sure you read the following two resources before posting to >> this list: >> - Earning your support instead of buying it, but Ian Turton: >> http://www.ianturton.com/talks/foss4g.html#/ >> - The GeoServer user list posting guidelines: >> http://geoserver.org/comm/userlist-guidelines.html >> >> 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 >> > > > -- > > Regards, Andrea Aime > > == GeoServer Professional Services from the experts! Visit > http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf > Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa > (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 > http://www.geo-solutions.it 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.* > -- Mr. Carlo Cancellieri *skype*: ccancellieri *Twitter*: @cancellieric *LinkedIn*: http://it.linkedin.com/in/ccancellieri/
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html 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