Re: [Geoserver-users] GeoServer tileSize and SRS for best performance with Leaflet

2021-03-03 Thread Simone Giannecchini
Dear Vera,
please, read below...

Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://bit.ly/gs-services for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob:   +39  333 8128928

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.


On Mon, Mar 1, 2021 at 10:09 PM Vera Green  wrote:

> 3 questions in one.   Our end goal is serving vector and raster data from
> GeoServer (GeoWebCash) in Leaflet quickly - in other words we are trying to
> improve performance.
>
> *Tile Size *
> We are deciding if our workflow should use the tile size of 512 OR 256.
>
> GeoSolutions raster processing tutorial (here
> )
> is using 512 but 256 is the GeoServer and Leaflet L.TileLayer
> 
> default.
>

Mind you the two things are not strictly related.
You can't ensure that tiles on disk align with tiles on map unless you are
serving a TMS from files directly.
Bigger tiles, within reason, when preprocessing raster data means less I/O
and smaller disk tiles.
For client applications I tend to prefer 512pix tiles as well especially if
you have amny overlays as it reduces the # of calls you make.
I think we recently added 512pix gridset on GeoServer to cope with this
scenario.


>
> Does anyone have insight on this?
> Is the recommendation different for vector vs raster data?
>
> *Projection Settings  *
> We are also investigating performance impacts of projection settings.
> Leaflet displays everything in  3857, we are currently storing all our
> vector data in PG in  4269 and the raster data we have been using the
> datasets local UTM reference such as  26912.  If anyone knows what the best
> projection or combination is. Or if the native SRS doesn't matter but we
> should set the Declared SRS to 3857 so that there is as little translation
> work for GeoServer when the request is called?
>

Native CRS matters if the data IS in that CRS so that you avoid the
reprojection, which in some cases has a significant cost.
So by reprojecting upfront you offset the cost of reprojection to the
preprocessing stage.
Obviously this is not always possible (if your data covers the poles, you
can't go to google mercator :)) and it might also introduce some
inflexibility in what you can do afterwards with your data.

Generally speaking the more you move to a single preprocessing step, the
better for serving at scale with speed.
I mean, think about if your case allows it, you could preprocessing
everything into static files to be served with TMS or so and put a CDN in
front of it.
This means almost no backend, but this does not work for all use cases. You
need to balance the possibility to preprocess as much as possible upfront,
especially for raster data and balance that with what you need afterwards
when serving.
This applies primarily to the storage format, compression and CRS.


>
>  - [26912](https://spatialreference.org/ref/epsg/26912/) - NAD 83 UTM
> Zone 12
>  - [4269](https://spatialreference.org/ref/epsg/4269/) - NAD 83 - PG
> Default
>  - [3857](https://spatialreference.org/ref/sr-org/7483/) - leaflet default
>  - [4326](https://spatialreference.org/ref/epsg/4326/) - WGS 83
>
> *OWS vs GWC*
>
> And lastly we are currently calling the layer through
>
> https://
> .../ows?=WMS=GetMap=layer_name==image%2Fpng=true=1.1.1=true_format=text%2Fhtml=false=256=256=EPSG%3A3857=...
>
> But according to this post
> 
> to get the GeoWebCashed version we might need to call it through something
> more like this:
> http://example.com/geoserver/*gwc*/service/wms
>
> Any advice on this 

[Geoserver-users] GeoServer tileSize and SRS for best performance with Leaflet

2021-03-01 Thread Vera Green
3 questions in one.   Our end goal is serving vector and raster data from
GeoServer (GeoWebCash) in Leaflet quickly - in other words we are trying to
improve performance.

*Tile Size *
We are deciding if our workflow should use the tile size of 512 OR 256.

GeoSolutions raster processing tutorial (here
)
is using 512 but 256 is the GeoServer and Leaflet L.TileLayer
default.

Does anyone have insight on this?
Is the recommendation different for vector vs raster data?

*Projection Settings  *
We are also investigating performance impacts of projection settings.
Leaflet displays everything in  3857, we are currently storing all our
vector data in PG in  4269 and the raster data we have been using the
datasets local UTM reference such as  26912.  If anyone knows what the best
projection or combination is. Or if the native SRS doesn't matter but we
should set the Declared SRS to 3857 so that there is as little translation
work for GeoServer when the request is called?

 - [26912](https://spatialreference.org/ref/epsg/26912/) - NAD 83 UTM Zone
12
 - [4269](https://spatialreference.org/ref/epsg/4269/) - NAD 83 - PG Default
 - [3857](https://spatialreference.org/ref/sr-org/7483/) - leaflet default
 - [4326](https://spatialreference.org/ref/epsg/4326/) - WGS 83

*OWS vs GWC*

And lastly we are currently calling the layer through

https://
.../ows?=WMS=GetMap=layer_name==image%2Fpng=true=1.1.1=true_format=text%2Fhtml=false=256=256=EPSG%3A3857=...

But according to this post

to get the GeoWebCashed version we might need to call it through something
more like this:
http://example.com/geoserver/*gwc*/service/wms

Any advice on this is very much appreciated,

Vera
___
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