[Geoserver-users] Unable to get GDAL support in Geoserver 2.16

2019-10-03 Thread Mats Elfström
Hi All!
I am unable to find sufficient information on how to enable the GDAL plugin
for Geoserver.
The mailing list has no information that I can use, and the documentation
is incomplete.

My setup is Geoserver 2.16, deployed from a war-file under Tomcat 9 on
Windows Server 2016 Standard. All 64bit.
The GDAL module is registered, but with a warning sign and this message






*Module Name: ImageI/O-Ext GDAL Coverage ExtensionModule ID:
gs-gdalVersion: 1.3.2Component: GridCoverage2DReaderMessage:JNI GDAL
Wrapper Version: unavailablejava.library.path:
C:\apache\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program
Files\AdoptOpenJDK\jre-8.0.222.10-hotspot\bin;C:\Program
Files\AdoptOpenJDK\jdk-8.0.222.10-hotspot\bin;C:\Program
Files\AdoptOpenJDK\jre-8.0.222.10-hotspot\bin;C:\Program Files
(x86)\Cuminas\Document Express DjVu
Plug-in\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\ServiceProfiles\LocalService\AppData\Local\Microsoft\WindowsApps;.*

I have followed various instructions back and forth, but all attempts end
up at this same result.
The crucial points are:
1 How do you enable the JNI GDAL Wrapper, and where is it?
2 How do you add the GDAL path to the java.library.path?
or does the answer to 2 also solve 1?
I have added the GDAL path and the GDAL variables as per instructions to no
avail.

Another factor is what GDAL version to use? The advised link to
gisinternals.com leads to a repository with dozens of packages.
3 Which GISInternal package shall I use for my setup?

One thread claims that only GDAL 1.9.2 will work with Geoserver, so my
latest attempt was with release-1600-x64-gdal-1-9-2-mapserver-6-2-0. It did
not work.

I might add that I have installed and running instances of PSQL/PostGIS and
Geonetwork 3.8.1.0 on the very same machine, and that the rest of Geoserver
has no problems.

Regards, Mats.E
__
Mats Elfström, Väpplingvägen 21, SE-227 38 LUND, Sweden
tel: +46 46 145959 / mob: +46 70 595 39 35
alt e-mail: mats.elfst...@giskraft.com 
___
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


[Geoserver-users] Attempting to add encryption string to sql server extension

2019-10-03 Thread David Colombini via Geoserver-users
Hi everyone,

I wanted to ask about the best way to add encryption settings to the SQL
Server extension for geoserver 2.16 (on a windows 2012 server using
tomcat).  I was able to unpack the JAR file, modify the java file, however,
I seem to be having compiling issues on windows command prompt.  What is
considered best practice for customizing extensions?

Here is the modified java file:

 package org.geotools.data.sqlserver;

import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import org.geotools.data.DataAccessFactory;
import org.geotools.jdbc.JDBCDataStore;
import org.geotools.jdbc.JDBCDataStoreFactory;
import org.geotools.jdbc.SQLDialect;





















public class SQLServerDataStoreFactory
  extends JDBCDataStoreFactory
{
  public static final DataAccessFactory.Param DBTYPE = new
DataAccessFactory.Param("dbtype", String.class, "Type", true, "sqlserver",






  Collections.singletonMap("level", "program"));





  public static final DataAccessFactory.Param INTSEC = new
DataAccessFactory.Param("Integrated Security", Boolean.class, "Login as
current windows user account. Works only in windows. Ignores user and
password settings.", false, Boolean.FALSE);








  public static final DataAccessFactory.Param NATIVE_PAGING = new
DataAccessFactory.Param("Use Native Paging", Boolean.class, "Use native
paging for sql queries. For some sets of data, native paging can have a
performance impact.", false, Boolean.TRUE);








  public static final DataAccessFactory.Param GEOMETRY_METADATA_TABLE = new
DataAccessFactory.Param("Geometry metadata table", String.class, "The
optional table containing geometry metadata (geometry type and srid). Can
be expressed as 'schema.name' or just 'name'", false);







  public static final DataAccessFactory.Param NATIVE_SERIALIZATION = new
DataAccessFactory.Param("Use native geometry serialization", Boolean.class,
"Use native SQL Server serialization, or WKB serialization.", false,
Boolean.FALSE);








  public static final DataAccessFactory.Param FORCE_SPATIAL_INDEX = new
DataAccessFactory.Param("Force spatial index usage via hints",
Boolean.class, "When enabled, spatial filters will be accompained by a WITH
INDEX sql hint forcing the usage of the spatial index.", false,
Boolean.FALSE);








  public static final DataAccessFactory.Param TABLE_HINTS = new
DataAccessFactory.Param("Table hints", String.class, "These table hints
will be added to every select query.", false, "");



  public static final DataAccessFactory.Param ENCRYPT = new
DataAccessFactory.Param(
"Encryption",
String.class,
"This will enforce TLS encryption in the sql server
connection.",
true,
"");





  public static final DataAccessFactory.Param PORT = new
DataAccessFactory.Param("port", Integer.class, "Port", false);


  public static final DataAccessFactory.Param INSTANCE = new
DataAccessFactory.Param("instance", String.class, "Instance Name", false);




  protected SQLDialect createSQLDialect(JDBCDataStore dataStore) { return
new SQLServerDialect(dataStore); }




  protected String getDatabaseID() { return (String)DBTYPE.sample; }




  public String getDescription() { return "Microsoft SQL Server"; }




  protected String getDriverClassName() { return
"com.microsoft.sqlserver.jdbc.SQLServerDriver"; }




  protected String getValidationQuery() { return "select 1"; }




  protected void setupParameters(Map parameters) {
super.setupParameters(parameters);
parameters.put(PORT.key, PORT);
parameters.put(DBTYPE.key, DBTYPE);
parameters.put(INTSEC.key, INTSEC);
parameters.put(NATIVE_PAGING.key, NATIVE_PAGING);
parameters.put(NATIVE_SERIALIZATION.key, NATIVE_SERIALIZATION);
parameters.put(GEOMETRY_METADATA_TABLE.key, GEOMETRY_METADATA_TABLE);
parameters.put(FORCE_SPATIAL_INDEX.key, FORCE_SPATIAL_INDEX);
parameters.put(TABLE_HINTS.key, TABLE_HINTS);
parameters.put(INSTANCE.key, INSTANCE);
parameters.put(ENCRYPT.key, ENCRYPT);
  }




  protected String getJDBCUrl(Map params) throws IOException {
String host = (String)HOST.lookUp(params);
Integer port = (Integer)PORT.lookUp(params);
String db = (String)DATABASE.lookUp(params);
String instance = (String)INSTANCE.lookUp(params);

String url = "jdbc:" + getDatabaseID() + "://" + host;
if (port != null) {
  url = url + ":" + port;
} else if (instance != null) {
  url = url + "\\" + instance;
}

if (db != null) {
  url = url + "/" + db;
}
Boolean EncryptBool = (Boolean) ENCRYPT.lookUp(params);
Boolean intsec = (Boolean)INTSEC.lookUp(params);
if (db != null)
{
  url = url.substring(0, url.lastIndexOf("/")) + ((db != null) ?
(";DatabaseName=" + db) : "");
}


if (intsec != null && intsec.booleanValue()) {
  url = url + ";integratedSecurity=true";
}

if (EncryptBool != null && EncryptBool.booleanVa

[Geoserver-users] image mosaic granule on a single image

2019-10-03 Thread Bessette-Halsema, Dominique E
Hello

I'm using image mosaic for the time series aspect.  Each time produces a single 
image.  I'm wondering why GeoServer appears to be composing granules with a 
"nodata" area for my single image?  Is it Tiling?  Should I be setting the 
SUGGESTED_TILE_SIZE?  This also only appears to happen in projections other 
than 4326.

Thanks

Dominique Bessette

G:\>gdalinfo EMETEO-VIS-1km_201909301900.tif
Driver: GTiff/GeoTIFF
Files: EMETEO-VIS-1km_201909301900.tif
Size is 8250, 14303
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (29.9961229,65.00938829998)
Pixel Size = (0.009091848993939,-0.009090315080752)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  29.9961229,  65.0093883) ( 29d59'46.04"E, 65d 0'33.80"N)
Lower Left  (  29.9961229, -65.0093883) ( 29d59'46.04"E, 65d 0'33.80"S)
Upper Right ( 105.0038771,  65.0093883) (105d 0'13.96"E, 65d 0'33.80"N)
Lower Right ( 105.0038771, -65.0093883) (105d 0'13.96"E, 65d 0'33.80"S)
Center  (  67.500,   0.000) ( 67d30' 0.00"E,  0d 0' 0.01"N)
Band 1 Block=8250x1 Type=Byte, ColorInterp=Palette
  NoData Value=0
  Color Table (RGB with 256 entries)
0: 0,0,0,0
1: 0,0,0,255
2: 1,1,1,255
3: 2,2,2,255
4: 3,3,3,255
5: 4,4,4,255
6: 5,5,5,255
7: 6,6,6,255
8: 7,7,7,255
9: 8,8,8,255
   10: 9,9,9,255
   11: 10,10,10,255
   12: 11,11,11,255
   13: 12,12,12,255
   14: 13,13,13,255
   15: 14,14,14,255
   16: 15,15,15,255
   17: 16,16,16,255
   18: 17,17,17,255
   19: 18,18,18,255
   20: 19,19,19,255
   21: 20,20,20,255
   22: 21,21,21,255
   23: 22,22,22,255
   24: 23,23,23,255
   25: 24,24,24,255
   26: 25,25,25,255
   27: 26,26,26,255
   28: 27,27,27,255
   29: 28,28,28,255
   30: 29,29,29,255
   31: 30,30,30,255
   32: 31,31,31,255
   33: 32,32,32,255
   34: 33,33,33,255
   35: 34,34,34,255
   36: 35,35,35,255
   37: 36,36,36,255
   38: 37,37,37,255
   39: 38,38,38,255
   40: 39,39,39,255
   41: 40,40,40,255
   42: 41,41,41,255
   43: 42,42,42,255
   44: 43,43,43,255
   45: 44,44,44,255
   46: 45,45,45,255
   47: 46,46,46,255
   48: 47,47,47,255
   49: 48,48,48,255
   50: 49,49,49,255
   51: 50,50,50,255
   52: 51,51,51,255
   53: 52,52,52,255
   54: 53,53,53,255
   55: 54,54,54,255
   56: 55,55,55,255
   57: 56,56,56,255
   58: 57,57,57,255
   59: 58,58,58,255
   60: 59,59,59,255
   61: 60,60,60,255
   62: 61,61,61,255
   63: 62,62,62,255
   64: 63,63,63,255
   65: 64,64,64,255
   66: 65,65,65,255
   67: 66,66,66,255
   68: 67,67,67,255
   69: 68,68,68,255
   70: 69,69,69,255
   71: 70,70,70,255
   72: 71,71,71,255
   73: 72,72,72,255
   74: 73,73,73,255
   75: 74,74,74,255
   76: 75,75,75,255
   77: 76,76,76,255
   78: 77,77,77,255
   79: 78,78,78,255
   80: 79,79,79,255
   81: 80,80,80,255
   82: 81,81,81,255
   83: 82,82,82,255
   84: 83,83,83,255
   85: 84,84,84,255
   86: 85,85,85,255
   87: 86,86,86,255
   88: 87,87,87,255
   89: 88,88,88,255
   90: 89,89,89,255
   91: 90,90,90,255
   92: 91,91,91,255
   93: 92,92,92,255
   94: 93,93,93,255
   95: 94,94,94,255
   96: 95,95,95,255
   97: 96,96,96,255
   98: 97,97,97,255
   99: 98,98,98,255
  100: 99,99,99,255
  101: 100,100,100,255
  102: 101,101,101,255
  103: 102,102,102,255
  104: 103,103,103,255
  105: 104,104,104,255
  106: 105,105,105,255
  107: 106,106,106,255
  108: 107,107,107,255
  109: 108,108,108,255
  110: 109,109,109,255
  111: 110,110,110,255
  112: 111,111,111,255
  113: 112,112,112,255
  114: 113,113,113,255
  115: 114,114,114,255
  116: 115,115,115,255
  117: 116,116,116,255
  118: 117,117,117,255
  119: 118,118,118,255
  120: 119,119,119,255
  121: 120,120,120,255
  122: 121,121,121,255
  123: 122,122,122,255
  124: 123,123,123,255
  125: 124,124,124,255
  126: 125,125,125,255
  127: 126,126,126,255
  128: 127,127,127,255
  129: 128,128,128,255
  130: 129,129,129,255
  131: 130,130,130,255
  132: 131,131,131,255
  133: 132,132,132,255
  134: 133,133,133,255
  135: 134,134,134,255
  136: 135,135,135,255
  137: 136,136,136,255
  138: 137,137,137,255
  139: 138,138,138,255
  140: 139,139,139,255
  141: 140,140,140,255
  142: 141,141,141,255
  143: 142,142,142,255
  144: 143,143,143,255
  145: 144,144,144,255
  146: 145,145,145,255
  147: 146,146,146,255
  148: 147,147,147,255
  149: 148,148,148,255
  150: 149,149,149,255
  151: 150,150,150,255
  152: 151,151,151,255
  153: 152,152,152,255
  154: 153,153,153,255
  155: 154,154,154,255
  156: 155,155,155,255
  157: 156,156,156,255
  158: 157,157,157,255
  159: 158,158,158,255
  160: 159,159,159,255
  161: 160,160,160,255
  162: 161,161,161,255
  163: 162,162,162,255
  164: 163,163,163,255
  165: 164,164,164,255
  166: 1