[Geoserver-devel] [JIRA] (GEOS-9305) Add Raster Data Source Fails without prj file

Constant Marks created an issue

GeoServer / BugGEOS-9305

Add Raster Data Source Fails without prj file

Issue Type:

BugBug

Affects Versions:

2.15.2

Assignee:

Unassigned

Attachments:

GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif, GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif.ovr, GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif.ovr.aux.xml

Created:

16/Aug/19 4:41 PM

Environment:

Operating System: Ubuntu 18.04.2 LTS
Kernel: Linux 4.9.140-tegra
Architecture: arm64

Priority:

MediumMedium

Reporter:

Constant Marks

When trying to add a raster data source I get the following error:

“Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file:///home/nvidia/Projects/onr/map_layers/GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0/GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif and hints Hints: REPOSITORY = org.geoserver.catalog.CatalogRepository@anonymised.com EXECUTOR_SERVICE = java.util.concurrent.ThreadPoolExecutor@anonymised.com[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] System defaults: FORCE_LONGITUDE_FIRST_AXIS_ORDER = true FILTER_FACTORY = FilterFactoryImpl FORCE_AXIS_ORDER_HONORING = http LENIENT_DATUM_SHIFT = true FEATURE_FACTORY = org.geotools.feature.LenientFeatureFactoryImpl@anonymised.com STYLE_FACTORY = StyleFactoryImpl COMPARISON_TOLERANCE = 1.0E-8 GRID_COVERAGE_FACTORY = GridCoverageFactory TILE_ENCODING = null SaveCancel”

The server log error is :
Caused by: java.io.IOException: Failed to create reader from file:///home/nvidia/Projects/onr/map_layers/GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0/GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif and hints Hints:
REPOSITORY = org.geoserver.catalog.CatalogRepository@anonymised.com
EXECUTOR_SERVICE = java.util.concurrent.ThreadPoolExecutor@anonymised.com[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
System defaults:
FORCE_LONGITUDE_FIRST_AXIS_ORDER = true
FILTER_FACTORY = FilterFactoryImpl
FORCE_AXIS_ORDER_HONORING = http
LENIENT_DATUM_SHIFT = true
FEATURE_FACTORY = org.geotools.feature.LenientFeatureFactoryImpl@anonymised.com
STYLE_FACTORY = StyleFactoryImpl
COMPARISON_TOLERANCE = 1.0E-8
GRID_COVERAGE_FACTORY = GridCoverageFactory
TILE_ENCODING = null

at org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1492)
at org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1436)
at org.geoserver.catalog.impl.CoverageStoreInfoImpl.getGridCoverageReader(CoverageStoreInfoImpl.java:53)
at jdk.internal.reflect.GeneratedMethodAccessor426.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.geoserver.catalog.impl.ModificationProxy.invoke(ModificationProxy.java:127)
at com.sun.proxy.$Proxy35.getGridCoverageReader(Unknown Source)
at org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:86)
… 140 more"

The tif and associated files are attached.

The header from gdalinfo is:

Driver: GTiff/GeoTIFF
Files: GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif
GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif.ovr
GHS_SMOD_POP2015_GLOBE_R2016A_54009_1k_v1_0.tif.aux.xml
Size is 35497, 15236
Coordinate System is:
PROJCRS[“World_Mollweide”,
BASEGEOGCRS[“WGS 84”,
DATUM[“World Geodetic System 1984”,
ELLIPSOID[“WGS 84”,6378137,298.257223563,
LENGTHUNIT[“metre”,1]],
ID[“EPSG”,6326]],
PRIMEM[“Greenwich”,0,
ANGLEUNIT[“Degree”,0.0174532925199433]]],
CONVERSION[“unnamed”,
METHOD[“Mollweide”],
PARAMETER[“Longitude of natural origin”,0,
ANGLEUNIT[“Degree”,0.0174532925199433],
ID[“EPSG”,8802]],
PARAMETER[“False easting”,0,
LENGTHUNIT[“metre”,1],
ID[“EPSG”,8806]],
PARAMETER[“False northing”,0,
LENGTHUNIT[“metre”,1],
ID[“EPSG”,8807]]],
CS[Cartesian,2],
AXIS[“(E)”,east,
ORDER[1],
LENGTHUNIT[“metre”,1,
ID[“EPSG”,9001]]],
AXIS[“(N)”,north,
ORDER[2],
LENGTHUNIT[“metre”,1,
ID[“EPSG”,9001]]]]
Data axis to CRS axis mapping: 1,2
Origin = (-17619594.547443531453609,8751029.461868489161134)
Pixel Size = (1000.000000000000000,-1000.000000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=BAND
Corner Coordinates:
Upper Left (-17619594.547, 8751029.462)
Lower Left (-17619594.547,-6484970.538)
Upper Right (17877405.453, 8751029.462)
Lower Right (17877405.453,-6484970.538)
Center ( 128905.453, 1133029.462) ( 1d17’47.25"E, 9d10’43.07"N)
Band 1 Block=512x512 Type=Byte, ColorInterp=Gray
Min=0.000 Max=3.000
Minimum=0.000, Maximum=3.000, Mean=0.055, StdDev=0.249
Overviews: 17749x7618, 8875x3809, 4438x1905, 2219x953, 1110x477
Metadata:
STATISTICS_MAXIMUM=3
STATISTICS_MEAN=0.054612442564741
STATISTICS_MINIMUM=0
STATISTICS_STDDEV=0.24926505885785"

I thought maybe the World_Mollweide projection was a problem so I tried converting this tif to EPSG:4326 and 3857 but that did not fix the problem. Finally I created used the python script found here (https://gis.stackexchange.com/questions/9421/creating-tfw-and-prj-files-for-folder-of-geotiff-files?noredirect=1&lq=1) to create the prj file for the tif and finally I was able to add the raster data store.

Maybe there is a problem with geoserver interpreting the header for the tif? Perhaps some of the osgeo libraries could be implemented to resolve this issue?

Thanks!

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100107-sha1:b873bb8)

Atlassian logo