Samo Dadela (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3Ac5ea42fd-4c28-4c3e-afee-02bd7c5c8c5f
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiYmZhNWM1MGFkNDA4NDZkYzg1ZTgxODNmOTczY2VkZmMiLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-11028?atlOrigin=eyJpIjoiYmZhNWM1MGFkNDA4NDZkYzg1ZTgxODNmOTczY2VkZmMiLCJwIjoiaiJ9
) GEOS-11028 (
https://osgeo-org.atlassian.net/browse/GEOS-11028?atlOrigin=eyJpIjoiYmZhNWM1MGFkNDA4NDZkYzg1ZTgxODNmOTczY2VkZmMiLCJwIjoiaiJ9
) Cannot use COG on GCS (
https://osgeo-org.atlassian.net/browse/GEOS-11028?atlOrigin=eyJpIjoiYmZhNWM1MGFkNDA4NDZkYzg1ZTgxODNmOTczY2VkZmMiLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.23.0 Assignee: Unassigned Components:
Community modules Created: 15/Jun/23 8:35 PM Environment:
kartoza/geoserver 2.23.0
Priority: Medium Reporter: Samo Dadela (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3Ac5ea42fd-4c28-4c3e-afee-02bd7c5c8c5f
)
I'm trying to configure GeoServer to use COGs that are located on GCS (Google
Cloud Storage).
I'm using an ImageMosaic that was previously configure to use local files. I
moved all files to the a GCS bucket, set GOOGLE_APPLICATION_CREDENTIALS
(verified with /vsigis/).
I followed the tutorial for S3, modifying things for GS:
https://docs.geoserver.org/latest/en/user/community/cog/update.html
I added the following (both to the imagemosais.properties and to
indexer.properties):
{{Cog=true
SuggestedSPI=it.geosolutions.imageioimpl.plugins.cog.CogImageReaderSpi
CogRangeReader=it.geosolutions.imageioimpl.plugins.cog.GSRangeReader}}
The I changed the 'location' column as per instructions - though here I'm not
sure what to put... The documentation says that GS supports urls starting with
gs:// or https://storage.cloud.google.com. Then I read somewhere that they
should start with cog://. I tried all the possible combinations gs://,
cog://gs://, cog:// https://strorage.cloud.google.com.
I also tried to change the PathType parameter to ABSOLUTE, RELATIVE,URL with no
avail (btw latest documentation says that I should use AbsulutePath=true -
instead of PathType=ABSOLUTE).
The problem is I always get the same error... something like:
{{15-Jun-2023 18:28:24.667 WARNING [pool-2-thread-4]
it.geosolutions.imageioimpl.plugins.cog.CogSourceSPIProvider.createRangeReaderInstance
Unable to create a RangeReader of type
it.geosolutions.imageioimpl.plugins.cog.GSRangeReader on uri:
//bucket/dir/file.tif due to java.lang.reflect.InvocationTargetException
15 Jun 18:28:24 DEBUG [imagemosaic.catalog] - Creating new Granule Descriptor
for feature Id: orthophotos_ndvi/orthophotos_ndvi.596616
15 Jun 18:28:24 DEBUG [imagemosaic.catalog] - Skipping invalid granule
java.lang.IllegalArgumentException: Illegal argument:
"granuleLocation=cog://gs://bucket/dir/file.tif".
at
org.geotools.gce.imagemosaic.GranuleDescriptor.extractRasterGranule(GranuleDescriptor.java:964)
at
org.geotools.gce.imagemosaic.GranuleDescriptor.<init>(GranuleDescriptor.java:909)
at
org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.getGranuleDescriptor(CachingDataStoreGranuleCatalog.java:244)
at
org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.lambda$parallelGranuleVisit$1(CachingDataStoreGranuleCatalog.java:143)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
15 Jun 18:28:24 DEBUG [imagemosaic.catalog] - Parallel granule visit using
executor java.util.concurrent.ThreadPoolExecutor@181372df [Running, pool size =
5, active threads = 0, queued tasks = 0, completed tasks = 5114]
15 Jun 18:28:24 DEBUG [geotools.jdbc] - CLOSE CONNECTION}}
I'd expect that this
Unable to create a RangeReader of type
it.geosolutions.imageioimpl.plugins.cog.GSRangeReader on uri:
//bucket/dir/file.tif
should read:
Unable to create a RangeReader of type
it.geosolutions.imageioimpl.plugins.cog.GSRangeReader on uri:
gs://bucket/dir/file.tif
... but the path/uri is always 'cut' wrong.
I always reload the configuration after each change.
If you could provide an example of the settings needed and how the location
path should be correctly encoded, I'd be very grateful.
BTW: I also can't manage to setup a simple GeoTiff store with just one COG
image. I check the COG checkbox but I don't know what to type in the file/path
url - again tried cog://, cog://gs and various other combination to now avail.
(
https://osgeo-org.atlassian.net/browse/GEOS-11028#add-comment?atlOrigin=eyJpIjoiYmZhNWM1MGFkNDA4NDZkYzg1ZTgxODNmOTczY2VkZmMiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-11028#add-comment?atlOrigin=eyJpIjoiYmZhNWM1MGFkNDA4NDZkYzg1ZTgxODNmOTczY2VkZmMiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100226-
sha1:d46780b )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel