Hey all, i'm at my wits end with GDAL.  It looks as if everything is working as 
I see it in server settings > modules as enabled:
ImageI/O-Ext GDAL Coverage Extension    gs-gdal                 
GridCoverage2DReader    1.1.28


But I end up with errors trying to add a jp2000 store:
Could not list layers for this store, an error occurred retrieving them: The 
Provided input is not supported by this reader

Running gdalinfo on the jp2 file yields:

Driver: JP2ECW/ERDAS JPEG2000 (SDK 3.x)
Files: <redacted>
Size is 60000, 40000
Coordinate System is:
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",
    GEOGCS["GCS_WGS_1984",
        DATUM["WGS_1984",
            SPHEROID["WGS_84",6378137,0]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    PARAMETER["Auxiliary_Sphere_Type",0],
    UNIT["Meter",1]]
Origin = (-10926000.000000000000000,4266000.000000000000000)
Pixel Size = (0.150000000000000,-0.150000000000000)
Corner Coordinates:
Upper Left  (-10926000.000, 4266000.000) 
Lower Left  (-10926000.000, 4260000.000) 
Upper Right (-10917000.000, 4266000.000) 
Lower Right (-10917000.000, 4260000.000) 
Center      (-10921500.000, 4263000.000) 
Band 1 Block=60000x1 Type=Byte, ColorInterp=Red
  Overviews: 30000x20000, 15000x10000, 7500x5000, 3750x2500, 1875x1250, 
937x625, 468x312, 234x156
Band 2 Block=60000x1 Type=Byte, ColorInterp=Green
  Overviews: 30000x20000, 15000x10000, 7500x5000, 3750x2500, 1875x1250, 
937x625, 468x312, 234x156
Band 3 Block=60000x1 Type=Byte, ColorInterp=Blue
  Overviews: 30000x20000, 15000x10000, 7500x5000, 3750x2500, 1875x1250, 
937x625, 468x312, 234x156

So I believe the file is good and readable.  

I'm attempting to install Geoserver 2.14.2 with GDAL 1.9.2 following the 
instructions from here: 
https://docs.geoserver.org/2.14.x/en/user/data/raster/gdal.html

I'm using Docker, and here is the installation:

FROM tomcat:9-jre8

MAINTAINER Oscar Fonts <oscar.fo...@geomati.co>

ENV GEOSERVER_VERSION 2.14.2
ENV GEOSERVER_DATA_DIR /var/local/geoserver
ENV GEOSERVER_INSTALL_DIR /usr/local/geoserver
ENV GDAL_DATA=/usr/share/gdal/
ENV LD_LIBRARY_PATH=/usr/local/gdal

# Uncomment to use APT cache (requires apt-cacher-ng on host)
#RUN echo "Acquire::http { Proxy \"http://`/sbin/ip route|awk '/default/ { 
print $3 }'`:3142\"; };" > /etc/apt/apt.conf.d/71-apt-cacher-ng

# Microsoft fonts
RUN echo "deb http://httpredir.debian.org/debian stretch contrib" >> 
/etc/apt/sources.list
RUN set -x \
        && apt-get update \
        && apt-get install -yq ttf-mscorefonts-installer
        # && rm -rf /var/lib/apt/lists/*

# Native JAI & ImageIO
RUN cd /usr/lib/jvm/java-8-openjdk-amd64 \
        && wget 
http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib-linux-amd64-jdk.bin
 \
        && tail -n +139 jai-1_1_3-lib-linux-amd64-jdk.bin > INSTALL-jai \
        && chmod u+x INSTALL-jai \
        && ./INSTALL-jai \
        && rm jai-1_1_3-lib-linux-amd64-jdk.bin INSTALL-jai *.txt \
        && wget 
http://download.java.net/media/jai-imageio/builds/release/1.1/jai_imageio-1_1-lib-linux-amd64-jdk.bin
 \
        && tail -n +215 jai_imageio-1_1-lib-linux-amd64-jdk.bin > 
INSTALL-jai_imageio \
        && chmod u+x INSTALL-jai_imageio \
        && ./INSTALL-jai_imageio \
        && rm jai_imageio-1_1-lib-linux-amd64-jdk.bin INSTALL-jai_imageio *.txt

# GeoServer
ADD geoserver.xml /usr/local/tomcat/conf/Catalina/localhost/geoserver.xml
RUN mkdir ${GEOSERVER_DATA_DIR} \
        && mkdir ${GEOSERVER_INSTALL_DIR} \
        && cd ${GEOSERVER_INSTALL_DIR} \
        && wget 
http://sourceforge.net/projects/geoserver/files/GeoServer/${GEOSERVER_VERSION}/geoserver-${GEOSERVER_VERSION}-war.zip
 \
        && unzip geoserver-${GEOSERVER_VERSION}-war.zip \
        && unzip geoserver.war \
        && mv data/* ${GEOSERVER_DATA_DIR} \
        && rm -rf geoserver-${GEOSERVER_VERSION}-war.zip geoserver.war target 
*.txt

# GDAL Install
RUN cd /tmp
RUN wget 
http://sourceforge.net/projects/geoserver/files/GeoServer/${GEOSERVER_VERSION}/extensions/geoserver-${GEOSERVER_VERSION}-gdal-plugin.zip
 \
        && unzip -o geoserver-${GEOSERVER_VERSION}-gdal-plugin.zip  -d 
/usr/local/geoserver/WEB-INF/lib/

RUN wget 
https://demo.geo-solutions.it/share/github/imageio-ext/releases/native/gdal/1.9.2/gdal-data.zip
 \
        && unzip -j gdal-data.zip 'gdal-data/*' -d /usr/share/gdal \
        && rm -rf gdal-data.zip \
        && chown www-data:www-data /usr/share/gdal

run wget 
https://demo.geo-solutions.it/share/github/imageio-ext/releases/native/gdal/1.9.2/linux/gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz
 \
        && mkdir /usr/local/gdal \
        && tar -C /usr/local/gdal -zxvf gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz 

# Enable CORS
RUN sed -i '\:</web-app>:i\
<filter>\n\
    <filter-name>CorsFilter</filter-name>\n\
    <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>\n\
    <init-param>\n\
        <param-name>cors.allowed.origins</param-name>\n\
        <param-value>*</param-value>\n\
    </init-param>\n\
    <init-param>\n\
        <param-name>cors.allowed.methods</param-name>\n\
        <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>\n\
    </init-param>\n\
</filter>\n\
<filter-mapping>\n\
    <filter-name>CorsFilter</filter-name>\n\
    <url-pattern>/*</url-pattern>\n\
</filter-mapping>' ${GEOSERVER_INSTALL_DIR}/WEB-INF/web.xml

# Tomcat environment
ENV CATALINA_OPTS "-server -Djava.awt.headless=true \
        -Xms768m -Xmx1560m -XX:+UseConcMarkSweepGC -XX:NewSize=48m \
        -DGEOSERVER_DATA_DIR=${GEOSERVER_DATA_DIR}"

Everything starts and I can see the new raster data sources, but it all fails.  
In my logs I see this message:

21-Mar-2019 20:40:51.565 INFO [main] 
it.geosolutions.imageio.gdalframework.GDALUtilities.loadGDAL GDAL Native 
Library loaded (version: 1.9.2)

However I also receive this warning, which i think is where the problem is:

21 Mar 20:41:04 WARN [gce.imagemosaic] - Unable to set ordering between tiff 
readers spi
21 Mar 20:41:04 WARN [gce.imagemosaic] - Unable to set ordering between jp2 
readers 
spi-it.geosolutions.imageio.plugins.jp2ecw.JP2GDALEcwImageReaderSpi:com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderCodecLibSpi
21 Mar 20:41:04 WARN [gce.imagemosaic] - Unable to set ordering between jp2 
readers 
spi-it.geosolutions.imageio.plugins.jp2ecw.JP2GDALEcwImageReaderSpi:com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderSpi
21 Mar 20:41:04 WARN [gce.imagemosaic] - Unable to set ordering between jp2 
readers 
spi-it.geosolutions.imageio.plugins.jp2mrsid.JP2GDALMrSidImageReaderSpi:com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderCodecLibSpi
21 Mar 20:41:04 WARN [gce.imagemosaic] - Unable to set ordering between jp2 
readers 
spi-it.geosolutions.imageio.plugins.jp2mrsid.JP2GDALMrSidImageReaderSpi:com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderSpi

Any help with this would be great - feel free to tell me I'm just being dumb or 
if you need any further info, I'll be sure to get it.  

Thanks so much!


_______________________________________________
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

Reply via email to