Hi,

Here is a procedure for creating the issue:


Download 4 ortophotos:

http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422A.jp2

http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422B.jp2

http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422C.jp2

http://kartat.kapsi.fi/files/orto/etrs-tm35fin/mavi_v_25000_50/2015/L44/02m/1/L4422D.jp2


Convert JPEG2000 files into GeoTIFFs
gdal_translate -of GTiff -co tiled=yes L4422A.jp2 L4422A.tif
gdal_translate -of GTiff -co tiled=yes L4422B.jp2 L4422B.tif
gdal_translate -of GTiff -co tiled=yes L4422C.jp2 L4422C.tif
gdal_translate -of GTiff -co tiled=yes L4422D.jp2 L4422D.tif


Create store and publish the layer and send GetCoverage:

http://localhost:8080/geoserver/wcs?service=WCS&version=2.0.1&request=describecoverage&coverageid=topp__orto_nls


DescribeCoverage from this layer is attached. There are some odd things in the 
document:


1) The Envelope in boundedBy has coordinates in wrong order N-E though they 
should be E-N


<gml:boundedBy>

<gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/3067"; 
axisLabels="E N" uomLabels="m m" srsDimension="2">

<gml:lowerCorner>6750000.0 404000.0</gml:lowerCorner>

<gml:upperCorner>6762000.0 416000.0</gml:upperCorner>

</gml:Envelope>

</gml:boundedBy>


2) If may be correct to use the axisOrder rule +2 +1 but other WCS servers 
which I have tried do not use it (MapServer, Rasdaman)


<gml:GridFunction>

<gml:sequenceRule axisOrder="+2 +1">Linear</gml:sequenceRule>

<gml:startPoint>0 0</gml:startPoint>

</gml:GridFunction>


3) It is too difficult for me to follow it the mentioned GridFunction together 
with these origin and offsetVectors lead to a correct result or not


<gml:origin>

<gml:Point gml:id="p00_topp__orto_nls" 
srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>

<gml:pos>6761999.75 404000.25</gml:pos>

</gml:Point>

</gml:origin>

<gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>0.0 
0.5</gml:offsetVector>

<gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>-0.5 
0.0</gml:offsetVector>


So, first vector is increasing 404000.25 (which is Easting) in 0.5 m steps, the 
other is decreasing 6761999.75 (which is Northing in 0.5 m steps and at some 
moment the whole coverage is turned around with the GridFunction.


I attach also WCS 2.0.1 GetCoverage from Mapserver 7.0 so it is possible to 
compare how it is expressing boundedBy, origin, and offSet vectors. At least 
for me this GML without GridFunction is easier to understand. Rasdaman is 
creating GML pretty much alike MapServer.


There seems to be once again half a pixel shifts in the origins from Geoserver 
vs. Mapserver.


-Jukka Rahkonen-






________________________________
Rahkonen Jukka (MML) wrote:

Hi,

I had removed that old installation so I made a new test with Geoserver 
2.8-beta and most probably with different ortophotos as well.  Fortunately (?) 
I could repeat the error.  The four GeoTIFFs I have are located side by side 
and the gross BBOX is a rectangle of 12 km by 12 km. The coverage works 
perfectly in the layer preview.  The reason for the NPE with GetCoverage is 
almost identical. Obviously there has been some small code change in 
GetCoverage.java.

        at org.geoserver.wcs2_0.GetCoverage.readCoverage(GetCoverage.java:761)
        at org.geoserver.wcs2_0.GetCoverage.setupCoverage(GetCoverage.java:335) 
 #was line 338
        at org.geoserver.wcs2_0.GetCoverage.run(GetCoverage.java:286)           
          #was line 289

I must try to make a new test either with images which can be downloaded from 
the web or by decreasing the size of my test images because now they are 420 MB 
each.

-Jukka-

Andrea Aime wrote:

On Fri, Sep 25, 2015 at 10:05 AM, Andrea Aime 
<[email protected]<mailto:[email protected]>> wrote:
Hi Jukka,
indeed it seems the read for the coverage failed and returned null (no data in 
the requested area).
Do you have some sample data for your case that I can try out?

Btw, looking at the code, it could also be this case:
https://osgeo-org.atlassian.net/browse/GEOS-7211

Cheers
Andrea

--
==
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 Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di 
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for the 
attention and use of the named addressee(s) and may be confidential or 
proprietary in nature or covered by the provisions of privacy act (Legislative 
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in 
accord with its purpose, any disclosure, reproduction, copying, distribution, 
or either dissemination, either whole or partial, is strictly forbidden except 
previous formal approval of the named addressee(s). If you are not the intended 
recipient, please contact immediately the sender by telephone, fax or e-mail 
and delete the information in this message that has been received in error. The 
sender does not give any warranty or accept liability as the content, accuracy 
or completeness of sent messages and accepts no responsibility  for changes 
made after they were sent or for other risks which arise as a result of e-mail 
transmission, viruses, etc.

-------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><wcs:CoverageDescriptions 
xmlns:wcs="http://www.opengis.net/wcs/2.0"; 
xmlns:ows="http://www.opengis.net/ows/2.0"; 
xmlns:gml="http://www.opengis.net/gml/3.2"; 
xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:swe="http://www.opengis.net/swe/2.0"; 
xmlns:wcsgs="http://www.geoserver.org/wcsgs/2.0"; xsi:schemaLocation=" 
http://www.opengis.net/wcs/2.0 
http://schemas.opengis.net/wcs/2.0/wcsDescribeCoverage.xsd";>
  <wcs:CoverageDescription gml:id="topp__orto_nls">
    <gml:boundedBy>
      <gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/3067"; 
axisLabels="E N" uomLabels="m m" srsDimension="2">
        <gml:lowerCorner>6750000.0 404000.0</gml:lowerCorner>
        <gml:upperCorner>6762000.0 416000.0</gml:upperCorner>
      </gml:Envelope>
    </gml:boundedBy>
    <wcs:CoverageId>topp__orto_nls</wcs:CoverageId>
    <gml:coverageFunction>
      <gml:GridFunction>
        <gml:sequenceRule axisOrder="+2 +1">Linear</gml:sequenceRule>
        <gml:startPoint>0 0</gml:startPoint>
      </gml:GridFunction>
    </gml:coverageFunction>
    <gmlcov:metadata>
      <gmlcov:Extension/>
    </gmlcov:metadata>
    <gml:domainSet>
      <gml:RectifiedGrid gml:id="grid00__topp__orto_nls" dimension="2">
        <gml:limits>
          <gml:GridEnvelope>
            <gml:low>0 0</gml:low>
            <gml:high>23999 23999</gml:high>
          </gml:GridEnvelope>
        </gml:limits>
        <gml:axisLabels>i j</gml:axisLabels>
        <gml:origin>
          <gml:Point gml:id="p00_topp__orto_nls" 
srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>
            <gml:pos>6761999.75 404000.25</gml:pos>
          </gml:Point>
        </gml:origin>
        <gml:offsetVector 
srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>0.0 0.5</gml:offsetVector>
        <gml:offsetVector 
srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>-0.5 0.0</gml:offsetVector>
      </gml:RectifiedGrid>
    </gml:domainSet>
    <gmlcov:rangeType>
      <swe:DataRecord>
        <swe:field name="RED_BAND">
          <swe:Quantity>
            <swe:description>RED_BAND</swe:description>
            <swe:nilValues>
              <swe:NilValues>
                <swe:nilValue 
reason="http://www.opengis.net/def/nil/OGC/0/unknown";>0.0</swe:nilValue>
              </swe:NilValues>
            </swe:nilValues>
            <swe:uom code="W.m-2.Sr-1"/>
            <swe:constraint>
              <swe:AllowedValues>
                <swe:interval>0.0 0.0</swe:interval>
              </swe:AllowedValues>
            </swe:constraint>
          </swe:Quantity>
        </swe:field>
        <swe:field name="GREEN_BAND">
          <swe:Quantity>
            <swe:description>GREEN_BAND</swe:description>
            <swe:nilValues>
              <swe:NilValues>
                <swe:nilValue 
reason="http://www.opengis.net/def/nil/OGC/0/unknown";>0.0</swe:nilValue>
              </swe:NilValues>
            </swe:nilValues>
            <swe:uom code="W.m-2.Sr-1"/>
            <swe:constraint>
              <swe:AllowedValues>
                <swe:interval>0.0 0.0</swe:interval>
              </swe:AllowedValues>
            </swe:constraint>
          </swe:Quantity>
        </swe:field>
        <swe:field name="BLUE_BAND">
          <swe:Quantity>
            <swe:description>BLUE_BAND</swe:description>
            <swe:nilValues>
              <swe:NilValues>
                <swe:nilValue 
reason="http://www.opengis.net/def/nil/OGC/0/unknown";>0.0</swe:nilValue>
              </swe:NilValues>
            </swe:nilValues>
            <swe:uom code="W.m-2.Sr-1"/>
            <swe:constraint>
              <swe:AllowedValues>
                <swe:interval>0.0 0.0</swe:interval>
              </swe:AllowedValues>
            </swe:constraint>
          </swe:Quantity>
        </swe:field>
      </swe:DataRecord>
    </gmlcov:rangeType>
    <wcs:ServiceParameters>
      <wcs:CoverageSubtype>RectifiedGridCoverage</wcs:CoverageSubtype>
      <wcs:nativeFormat>image/tiff</wcs:nativeFormat>
    </wcs:ServiceParameters>
  </wcs:CoverageDescription>
</wcs:CoverageDescriptions>
<?xml version="1.0" encoding="UTF-8"?>
<wcs:CoverageDescriptions xmlns:wcs="http://www.opengis.net/wcs/2.0"; 
xmlns:ows="http://www.opengis.net/ows/2.0"; 
xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:gml="http://www.opengis.net/gml/3.2"; 
xmlns:gmlcov="http://www.opengis.net/gmlcov/1.0"; 
xmlns:swe="http://www.opengis.net/swe/2.0"; 
xsi:schemaLocation="http://www.opengis.net/wcs/2.0 
http://schemas.opengis.net/wcs/2.0/wcsAll.xsd ">
  <wcs:CoverageDescription gml:id="orto">
    <gml:boundedBy>
      <gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/3067"; 
axisLabels="x y" uomLabels="m m" srsDimension="2">
        <gml:lowerCorner>458000 6696000</gml:lowerCorner>
        <gml:upperCorner>464000 6702000</gml:upperCorner>
      </gml:Envelope>
    </gml:boundedBy>
    <wcs:CoverageId>orto</wcs:CoverageId>
    <gml:domainSet>
      <gml:RectifiedGrid dimension="2" gml:id="grid_orto">
        <gml:limits>
          <gml:GridEnvelope>
            <gml:low>0 0</gml:low>
            <gml:high>11999 11999</gml:high>
          </gml:GridEnvelope>
        </gml:limits>
        <gml:axisLabels>x y</gml:axisLabels>
        <gml:origin>
          <gml:Point gml:id="grid_origin_orto" 
srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>
            <gml:pos>458000.000000 6702000.000000</gml:pos>
          </gml:Point>
        </gml:origin>
        <gml:offsetVector 
srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>0.500000 
0</gml:offsetVector>
        <gml:offsetVector 
srsName="http://www.opengis.net/def/crs/EPSG/0/3067";>0 
-0.500000</gml:offsetVector>
      </gml:RectifiedGrid>
    </gml:domainSet>
    <gmlcov:rangeType>
      <swe:DataRecord>
        <swe:field name="band1">
          <swe:Quantity>
            <swe:nilValues/>
            <swe:uom code="W.m-2.Sr-1"/>
            <swe:constraint>
              <swe:AllowedValues>
                <swe:interval>0 255</swe:interval>
                <swe:significantFigures>3</swe:significantFigures>
              </swe:AllowedValues>
            </swe:constraint>
          </swe:Quantity>
        </swe:field>
        <swe:field name="band2">
          <swe:Quantity>
            <swe:nilValues/>
            <swe:uom code="W.m-2.Sr-1"/>
            <swe:constraint>
              <swe:AllowedValues>
                <swe:interval>0 255</swe:interval>
                <swe:significantFigures>3</swe:significantFigures>
              </swe:AllowedValues>
            </swe:constraint>
          </swe:Quantity>
        </swe:field>
        <swe:field name="band3">
          <swe:Quantity>
            <swe:nilValues/>
            <swe:uom code="W.m-2.Sr-1"/>
            <swe:constraint>
              <swe:AllowedValues>
                <swe:interval>0 255</swe:interval>
                <swe:significantFigures>3</swe:significantFigures>
              </swe:AllowedValues>
            </swe:constraint>
          </swe:Quantity>
        </swe:field>
      </swe:DataRecord>
    </gmlcov:rangeType>
    <wcs:ServiceParameters>
      <wcs:CoverageSubtype>RectifiedGridCoverage</wcs:CoverageSubtype>
      <wcs:nativeFormat>image/tiff</wcs:nativeFormat>
    </wcs:ServiceParameters>
  </wcs:CoverageDescription>
</wcs:CoverageDescriptions>
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to