Thanks very much Jody, that was just the information that I needed.
From: Jody Garnett <[email protected]>
Sent: Thursday, February 1, 2024 9:55 PM
To: Phil Scadden <[email protected]>
Cc: [email protected]
Subject: Re: [Geotools-gt2-users] Using gt-referencing within an app bundled
with JPackage - where does the epsg database go.
CAUTION: This email originated from outside of the organization. Do not click
links or open attachments unless you recognize the sender and know the content
is safe:
If you have done sharing correctly then plugin discovery works.
The zip is unpacked into the the temp folder I believe? Yes it is:
File directory = new File(System.getProperty("java.io.tmpdir", "."),
"Geotools");
if (directory.isDirectory() || directory.mkdir()) {
directory = new File(directory, "Databases/HSQL");
if (directory.isDirectory() || directory.mkdirs()) {
return directory;
}
}
You can also set a property "EPSG-HSQL.directory" to indicate where the
database is located.
See
https://github.com/geotools/geotools/blob/main/modules/plugin/epsg-hsql/src/main/java/org/geotools/referencing/factory/epsg/hsql/HsqlEpsgDatabase.java
--
Jody Garnett
On Jan 31, 2024 at 8:07:47 PM, Phil Scadden
<[email protected]<mailto:[email protected]>> wrote:
I have a little console app (pushing excel sheet to a database), that runs fine
as a shaded jar with java. However, I have folk using it that are reluctant to
install java and I packaged it with JRT etc using JPackage. If the code is
launched with JPackage, then it doesn’t find the EPSG database. Tried with both
epgl-h2sql and epsg-wkt. No luck. JPackage allows me to specify a resource
directory, but no idea what it would be. When the app runs, what exactly
happens to say the EPSG.zip in epsg-h2sql for instance?
________________________________________________
Ngā mihi, Nā Phil Scadden (he/him)
Te Raraunga me te Tātaritanga Mokowā Aronuku (Geospatial Data and Analysis)
GNS Science Te Pῡ Ao
764 Cumberland St, Private Bag 1930,
Dunedin, New Zealand Ph +64 3 4799663, 027 3463185
“Whāia te iti kahurangi ki te tūohu koe me he maunga teitei”
Notice: This email and any attachments are confidential and may not be used,
published or redistributed without the prior written consent of the Institute
of Geological and Nuclear Sciences Limited (GNS Science). If received in error
please destroy and immediately notify GNS Science. Do not copy or disclose the
contents.
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Notice: This email and any attachments are confidential and may not be used,
published or redistributed without the prior written consent of the Institute
of Geological and Nuclear Sciences Limited (GNS Science). If received in error
please destroy and immediately notify GNS Science. Do not copy or disclose the
contents.
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users