I did the J2W WorldFile, now i got this error :

> Could not list layers for this store, an error occurred retrieving them: null

[geoserver.web] - Getting list of coverages for saved store file:data/jp2/06-2017-1060-6305-LA93-0M20-E080.jp2 java.lang.RuntimeException: Could not list layers for this store, an error occurred retrieving them: null         at org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:170)         at org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:47)         at org.geoserver.web.wicket.GeoServerDataProvider.getFilteredItems(GeoServerDataProvider.java:202)

Le 23/05/2019 à 08:40, Andrea Aime a écrit :
Hi,
I'm not very familiar with the JP2K reader code, but it seems it's trying to fetch the raster
bounding box in a variety of ways and they all fail:

https://github.com/geotools/geotools/blob/a1e08cc358f38dc22bf4f896abdd2bc7569f6f7f/modules/plugin/jp2k/src/main/java/org/geotools/coverageio/jp2k/JP2KReader.java#L157

I'm guessing the raster is either missing the information, or provides it in a way that's not supported. You can probably make it work by adding a world file on the side, same file name as the jp2, but
extension either j2w or wld.

Also, if you can share the file, open a ticket on Jira with the stack trace you shared and
attach a sample file

Cheers
Andrea


On Thu, May 23, 2019 at 8:25 AM Gabriel Vatin <[email protected] <mailto:[email protected]>> wrote:

    I have the "JP2K (Direct)" option from the datastores, but from
    this page i cannot choose any file (no button to browse files) :

    When i type the URL file:data/... to any JP2 image, then Save, i
    have this error on the GeoServer interface :

    Could not list layers for this store, an error occurred retrieving
    them: Failed to create reader from
    file:data/jp2/06-2017-1060-6305-LA93-0M20-E080.jp2 and hints
    Hints: REPOSITORY =
    org.geoserver.catalog.CatalogRepository@46b1bca7 EXECUTOR_SERVICE
    = java.util.concurrent.ThreadPoolExecutor@3b4ede5e[Running, pool
    size = 0, active threads = 0, queued tasks = 0, completed tasks =
    0] System defaults: LENIENT_DATUM_SHIFT = true
    GRID_COVERAGE_FACTORY = GridCoverageFactory TILE_ENCODING = null
    FORCE_AXIS_ORDER_HONORING = http FORCE_LONGITUDE_FIRST_AXIS_ORDER
    = true STYLE_FACTORY = StyleFactoryImpl FEATURE_FACTORY =
    org.geotools.feature.LenientFeatureFactoryImpl@4c4748bf
    COMPARISON_TOLERANCE = 1.0E-8 FILTER_FACTORY = FilterFactoryImpl

    And this on the logs :

    WARN [coverageio.jp2k] - Unavailable envelope for this coverage
    org.geotools.data.DataSourceException: Unavailable envelope for
    this coverage
            at
    
org.geotools.coverageio.jp2k.JP2KReader.setCoverageProperties(JP2KReader.java:176)
            at
    org.geotools.coverageio.jp2k.JP2KReader.<init>(JP2KReader.java:710)
            at
    org.geotools.coverageio.jp2k.JP2KFormat.getReader(JP2KFormat.java:111)
            at
    
org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1490)
            at
    
org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1436)
            at
    
org.geoserver.catalog.impl.CoverageStoreInfoImpl.getGridCoverageReader(CoverageStoreInfoImpl.java:53)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at
    
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at
    
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at
    
org.geoserver.catalog.impl.ModificationProxy.invoke(ModificationProxy.java:127)
            at com.sun.proxy.$Proxy24.getGridCoverageReader(Unknown
    Source)
            at
    
org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:86)


    Le 23/05/2019 à 08:16, Andrea Aime a écrit :
    "Anyways, what if you try to open a single image with the
    JPEG2000 reader?"

    If you cannot publish a single file, there is no way that you'll
    be able to put together a mosaic

    Cheers
    Andrea

    On Thu, May 23, 2019 at 8:13 AM Gabriel Vatin
    <[email protected] <mailto:[email protected]>> wrote:

        Hi Andrea, i did a few improvements yesterday, but still with
        no success :

        - i changed to Geoserver 2.15.1
        - i installed the JP2K plugin, and i changed the .properties
        file with :

        
SuggestedSPI=it.geosolutions.imageio.plugins.jp2k.JP2KKakaduImageReaderSpi
        (instead of default Tiff)
        ExpandToRGB=true (i don't really know what it should be used for)

        Is there any exhaustive list of the possible values for
        SuggestedSPI ?

        The extent is well recognized, when i try with OpenLayers
        preview, but i have Java errors starting with :


        2019-05-23 08:09:42,742 WARN [coverageio.jp2k] - Unavailable
        envelope for this coverage
        org.geotools.data.DataSourceException: Unavailable envelope
        for this coverage
            at
        
org.geotools.coverageio.jp2k.JP2KReader.setCoverageProperties(JP2KReader.java:176)
            at
        org.geotools.coverageio.jp2k.JP2KReader.<init>(JP2KReader.java:710)
            at
        org.geotools.coverageio.jp2k.JP2KFormat.getReader(JP2KFormat.java:111)
            at
        
org.geotools.gce.imagemosaic.GranuleDescriptor.init(GranuleDescriptor.java:385)
            at
        
org.geotools.gce.imagemosaic.GranuleDescriptor.<init>(GranuleDescriptor.java:913)
            at
        
org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.getGranuleDescriptors(CachingDataStoreGranuleCatalog.java:166)
            at
        
org.geotools.gce.imagemosaic.catalog.LockingGranuleCatalog.lambda$getGranuleDescriptors$6(LockingGranuleCatalog.java:180)
            at
        
org.geotools.gce.imagemosaic.catalog.LockingGranuleCatalog.guardIO(LockingGranuleCatalog.java:93)
            at
        
org.geotools.gce.imagemosaic.catalog.LockingGranuleCatalog.getGranuleDescriptors(LockingGranuleCatalog.java:180)
            at
        
org.geotools.gce.imagemosaic.RasterManager.getGranuleDescriptors(RasterManager.java:1335)
            at
        
org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:668)
            at
        
org.geotools.gce.imagemosaic.RasterLayerResponse.processRequest(RasterLayerResponse.java:603)
            at
        
org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:571)
            at
        org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:1326)
            at
        
org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:946)
            at
        
org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:923)
            at
        
org.geoserver.catalog.SingleGridCoverage2DReader.read(SingleGridCoverage2DReader.java:152)
            at
        
org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:241)
            at
        
org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:229)
            at
        
org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readSingleCoverage(GridCoverageReaderHelper.java:638)
            at
        
org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readCoverageInEnvelope(GridCoverageReaderHelper.java:383)
            at
        
org.geotools.renderer.lite.gridcoverage2d.GridCoverageReaderHelper.readCoverages(GridCoverageReaderHelper.java:254)
            at
        
org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:880)
            at
        
org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:829)
            at
        
org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:1036)
            at
        
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:349)
            at
        
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:265)
            at
        
org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:132)
            at org.geoserver.wms.GetMap.executeInternal(GetMap.java:707)
            at org.geoserver.wms.GetMap.run(GetMap.java:287)
            at org.geoserver.wms.GetMap.run(GetMap.java:110)
           ......


        Le 22/05/2019 à 19:33, Andrea Aime a écrit :
        Gabriel,
        GeoServer 2.11 is not supported, you should give 2.15.x a
        spin instead.
        Anyways, what if you try to open a single image with the
        JPEG2000 reader?
        If it's not in the list of readers, then the GDAL extension
        needed to read it, is not installed or its native libs not
        properly linked.
        And oh, the native libs that can read JPEG2000 fast (Kakadu)
        are commercial and not cheap, not sure if you accounted for
        that. If you cannot afford them, a one time translation to
        GeoTIFF might be a better fit.

        Cheers
        Andrea

        On Fri, May 17, 2019 at 11:41 AM Gabriel Vatin
        <[email protected] <mailto:[email protected]>>
        wrote:

            Hello all,

            I have problems using ImageMosaic with JPEG2000 data, on
            GeoServer 2.11.
            I have no image displayed at all in full extent of my
            images. Here is my
            configuration :

            * 226 images in .jp2 (JPEG2000) on a folder, which are
            in 2154
            projection (french proj, in meters) and resolution 0.2 meter
            * mosaic_index.shp created by gdal, same folder, same
            projection system
            * mosaic_index.properties file like this :

            Levels=0.2,0.2
            Name=mosaic_index
            TypeName=mosaic_index
            LocationAttribute=location
            
SuggestedSPI=com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReaderSpi
            LevelsNum=1
            OutputTransparentColor=#000000

            When i try the OpenLayers preview of GeoServer, there is
            no image at all
            in the display...

            I'm not sure i really get the "Levels" params : is it
            the resolution of
            image ? The resolution of display ? If so, which scale
            of resolution
            should i used, the one from the Tiling configs ?

            Thanks a lot !


            Gabriel



            _______________________________________________
            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


            [email protected]
            <mailto:[email protected]>
            https://lists.sourceforge.net/lists/listinfo/geoserver-users



--
        Regards, Andrea Aime == GeoServer Professional Services from
        the experts! Visit http://goo.gl/it488V for more
        information. == Ing. Andrea Aime @geowolf Technical Lead
        GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa
        (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39
        339 8844549 http://www.geo-solutions.it
        http://twitter.com/geosolutions_it
        ------------------------------------------------------- /Con
        riferimento alla normativa sul trattamento dei dati
        personali (Reg. UE 2016/679 - Regolamento generale sulla
        protezione dei dati “GDPR”), si precisa che ogni circostanza
        inerente alla presente email (il suo contenuto, gli
        eventuali allegati, etc.) è un dato la cui conoscenza è
        riservata al/i solo/i destinatario/i indicati dallo
        scrivente. Se il messaggio Le è giunto per errore, è
        tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
        sarei comunque grato se potesse darmene notizia. This email
        is intended only for the person or entity to which it is
        addressed and may contain information that is privileged,
        confidential or otherwise protected from disclosure. We
        remind that - as provided by European Regulation 2016/679
        “GDPR” - copying, dissemination or use of this e-mail or the
        information herein by anyone other than the intended
        recipient is prohibited. If you have received this email by
        mistake, please notify us immediately by telephone or e-mail./

-- Kinaxia
        Gabriel VATIN
        Docteur en Géomatique
        Ingénieur de recherche
        Tél : 06.63.92.94.42
        Email : [email protected]
        <mailto:[email protected]>
        http://www.kinaxia.fr



--
    Regards, Andrea Aime == GeoServer Professional Services from the
    experts! Visit http://goo.gl/it488V for more information. == Ing.
    Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di
    Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax:
    +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it
    http://twitter.com/geosolutions_it
    ------------------------------------------------------- /Con
    riferimento alla normativa sul trattamento dei dati personali
    (Reg. UE 2016/679 - Regolamento generale sulla protezione dei
    dati “GDPR”), si precisa che ogni circostanza inerente alla
    presente email (il suo contenuto, gli eventuali allegati, etc.) è
    un dato la cui conoscenza è riservata al/i solo/i destinatario/i
    indicati dallo scrivente. Se il messaggio Le è giunto per errore,
    è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
    sarei comunque grato se potesse darmene notizia. This email is
    intended only for the person or entity to which it is addressed
    and may contain information that is privileged, confidential or
    otherwise protected from disclosure. We remind that - as provided
    by European Regulation 2016/679 “GDPR” - copying, dissemination
    or use of this e-mail or the information herein by anyone other
    than the intended recipient is prohibited. If you have received
    this email by mistake, please notify us immediately by telephone
    or e-mail./

-- Kinaxia
    Gabriel VATIN
    Docteur en Géomatique
    Ingénieur de recherche
    Tél : 06.63.92.94.42
    Email : [email protected] <mailto:[email protected]>
    http://www.kinaxia.fr



--

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- /Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail./

--
Kinaxia         
Gabriel VATIN
Docteur en Géomatique
Ingénieur de recherche
Tél : 06.63.92.94.42
Email : [email protected] <mailto:[email protected]>
http://www.kinaxia.fr

_______________________________________________
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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to