I have been reading again and again this:
“fill this new image extent with pixel values re-projected from the coverage’s
Native CRS to the output CRS in a way that, for each axis, the smallest
distance between any two reprojected grid points is used as offset”
I do believe now that “the smallest distance between any two reprojected grid
points” in your case with 5 m pixels in UTM really converts into 5.0020008 in
EPSG:31467. If you do not agree I would like to see your interpretation about
that sentence. Remember also the case of re-projection between projected and
geographic systems.
-Jukka-
Lähettäjä: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi]
Lähetetty: 11. elokuuta 2017 16:25
Vastaanottaja: anna-lena.h...@bkg.bund.de; andrea.a...@geo-solutions.it
Kopio: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] WCS returns wrong GeoTiffs
Hi,
The native pixel size in UTM32N is obviously 5.00 m. UTM projection is using a
scale factor of 0.9996 and if you convert a polygon of size 5x5 m (presenting
one pixel) into EPSG:31467 it will grow into 5.0020008x5.0020008 meters. That
process is converting each pixel as they are without any resampling. If exact
pixel size of 5 meters in EPSG:31467 is to be achieved the data must be
resampled. I would say that Geoserver is doing the right thing when it does
minimum amount of resampling and allows pixel size to change. BTW. for example
gdalwarp is doing the same thing and there are a bunch of questions about that
in gis.stackexchange.
Now if we consider that it is OK to have 5.0020008 pixel size in the output it
is impossible to keep extent as 3400000, 5660000 to 3420000, 5680000 because
you can’t fill such an area with 5.0020008x5.0020008 sized blocks.
So if we want to keep what I consider as the most native pixel size 5.0020008
we can’t get exactly 3400000, 5660000 to 3420000, 5680000 as extent. If we want
the extent to be exact we must generate 5 m sized pixels which means resampling
because of the difference in the projections (the 0.9996 scale factor).
I suppose it would be more clear is you re-projected data from UTM into
EPSG:4326 because then it would be self-evident that the pixels size of the
output is not 0.5 meters anymore because the unit is degrees.
By using scaling extension you can force resampling into 5 m output pixels and
with those you can fill your desired area 3400000, 5660000 to 3420000, 5680000.
-Jukka-
Lähettäjä: anna-lena.h...@bkg.bund.de<mailto:anna-lena.h...@bkg.bund.de>
[mailto:anna-lena.h...@bkg.bund.de]
Lähetetty: 11. elokuuta 2017 15:40
Vastaanottaja: andrea.a...@geo-solutions.it<mailto:andrea.a...@geo-solutions.it>
Kopio: Rahkonen Jukka (MML)
<jukka.rahko...@maanmittauslaitos.fi<mailto:jukka.rahko...@maanmittauslaitos.fi>>;
geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>
Aihe: AW: [Geoserver-users] WCS returns wrong GeoTiffs
Hello Andrea,
yes, I did. But I send it again:
I requested in GK3:
SUBSET=Y,http://www.opengis.net/def/crs/EPSG/0/31467(3400000,3420000)&SUBSET=X,http://www.opengis.net/def/crs/EPSG/0/31467(5660000,5680000)
AND set the crs to be the same:
&SUBSETTINGCRS=http://www.opengis.net/def/crs/EPSG/0/31467
&OUTPUTCRS=http://www.opengis.net/def/crs/EPSG/0/31467
Should be 3400000, 5660000 to 3420000, 5680000
But GeoServer returned:
3399999.6508074491284788,5659999.2086437549442053 :
3419997.6992640472017229,5680002.2594826966524124
I just don’t understand why the extent is wrong AND the pixel size and
dimension. I understand that there are different distortions depending on the
projection.
But how could I get the bounding box I requested?
@Jukka: Thanks for the hint with the Scaleextent – I give it a try… I just
wanted to avoid to clip the image again to the requested extend.
Von: andrea.a...@gmail.com<mailto:andrea.a...@gmail.com>
[mailto:andrea.a...@gmail.com] Im Auftrag von Andrea Aime
Gesendet: Freitag, 11. August 2017 14:04
An: Hock, Anna-Lena
<anna-lena.h...@bkg.bund.de<mailto:anna-lena.h...@bkg.bund.de>>
Cc: Rahkonen Jukka (MML)
<jukka.rahko...@maanmittauslaitos.fi<mailto:jukka.rahko...@maanmittauslaitos.fi>>;
GeoServer Mailing List List
<geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>>
Betreff: Re: [Geoserver-users] WCS returns wrong GeoTiffs
On Fri, Aug 11, 2017 at 1:45 PM,
<anna-lena.h...@bkg.bund.de<mailto:anna-lena.h...@bkg.bund.de>> wrote:
As far as I can interpret this, it means that in case we have OUTPUTCRS equals
SUBSETTINGCRS the extent of the image should be exactly the one requested in
SUBSET. The request coordinates aren’t transformed – the bounding box is
“fixed” and the image is filled in this extent. If you vary the dimension and
the size, then it should be possible to keep the requested extent. Am I missing
something here?
Hum... you did not provide the output bounding box, in your first mail you were
concerned about the resolution and pixel width/height only no?
What bounding box did GeoServer return?
During reprojection with no target resolution normally one can choose to
respect either the native resolution (it seems GeoServer did,
to the letter, taking into account the different scaling factor of the two
projections) or the target bounding box, but it's impossible in
general to do both.
Looking again at the specification extracts from Jukka I don't see a indication
that one should be preferred over the other, looks
like an implementation decision.
Cheers
Andrea
--
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
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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users