[Geoserver-users] Using geotools within geoserver

Regarding: https://docs.geoserver.org/stable/en/user/extensions/netcdf/netcdf.html

A number of system properties allow us to configure this behavior:

- `org.geotools.coverage.io.netcdf.param.max``` - `org.geotools.coverage.io.netcdf.param.min` - `org.geotools.coverage.io.netcdf.auxiliary.store`

How can I set these system properties? It seems it is not discussed in the documentation how to work with geotools.

We cannot provide a direct answer - because it changes depending on which application server you are using (and some by your own opinion or practice).

For example in tomcat application server I personally like making a file called setenv.sh:

#!/bin/sh

Prepend JVM Options

CATALINA_OPTS=“-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UsePerfData ${CATALINA_OPTS}”

Append system properties

CATALINA_OPTS=“${CATALINA_OPTS} -Dorg.geotools.referencing.forceXY=true”

“Catalina” being the internal name tomcat uses to refer to its “servlet container” responsible for running GeoServer. You can see I often make one line for each setting so I can comment things on or off.

Another application server is Jetty, as used by the GeoServer bin download. You can set a JAVA_OPS environment variable (similar to how I have done above) and it is applied by bin/start.sh when running Jetty.

Tips:

  • To be flexible the geoserver specific settings can often be configured by a system environment variable, a web-context property, or a java system property.

  • You can also check the current GeoServer setup using the Server Status page. The modules tab lists what is going on, try clicking on System Environment and System Properties modules to display more information.

···


Jody Garnett

Careful here… GeoServer own properties can be configured this way, GeoTools modules can only react to Java system properties normally.

Cheers
Andrea

···

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

Thanks for the clarification.
If someone wanted to develop GeoServer to make it support NetCDF with 2D lat/lon, how should he start? What would be the first steps?

Best,
Amirhossein

On Tue, May 9, 2023 at 9:46 AM Andrea Aime <andrea.aime@anonymised.com9…> wrote:

On Tue, May 9, 2023 at 3:23 AM Jody Garnett <jody.garnett@anonymised.com> wrote:

  • To be flexible the geoserver specific settings can often be configured by a system environment variable, a web-context property, or a java system property.

Careful here… GeoServer own properties can be configured this way, GeoTools modules can only react to Java system properties normally.

Cheers
Andrea

==

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