On Fri, Jun 29, 2012 at 1:52 PM, Casper Børgesen (CABO) <[email protected]>wrote:

>  I have some problems with my WMS layer (UTMZ32N, EPSG:25832) hosted
> using either GeoServer 2.1.4 or 2.2b2. When I overlay my WMS layer with a
> tile from the same dataset, there is a slight offset between them
> (0-2pixels I estimate). The direction of the offset seems to vary –
> probably depending on the extent (see image 1 from QGIS).****
>
> ** **
>
> I visualized the same area in OpenJump and inserted a couple of points in
> a separate vector layer (for georeference) seen in image 2. The pixel
> border should be going through the two left most visible crosses but they
> aren’t.****
>
> ** **
>
> I created a direct request to GeoServer base on image 2 and the displayed
> coordinates from OpenJump (captured by hovering over the corners if the map
> – which at least gives me millimeter accuracy):****
>
> ** **
>
>
> http://myserver:8080/geoserver/ows?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=530999.95,6154999.8404,531000.1592,6155000.0001&CRS=EPSG:25832&WIDTH=619&HEIGHT=473&LAYERS=niras:ddo2010_rgb&STYLES=&FORMAT=image/jpeg
> ****
>
> ** **
>
> The result from the request in seen in image 3, where the pixel
> intersection clearly is off especially on the northing axis (since top is
> 6155000.0001 and the intersection should be at 6155000.0000).****
>
> ** **
>
> Why is there an offset and where does it come from? ****
>
> ** **
>
> Is it because I expect too much from GeoServer with regards to accuracy
> and machine accuracy (rounding errors)? Though I don’t know if it explains
> the 0-2pixels offset I experience on a normal zoom level.
>

The raster and vector code paths are very different, so it is to be
expected that reprojection of the two can be different.
GeoServer also uses an approximate reprojection code to speed up raster
reprojection (which ends up being replaced by a local affine
transform as opposed to using the full formula).
If you are ok with taking a performance hit of two or more times you can
disable the approximation setting the following system variable
in the Java Virtual machine running GeoServer:

-Dorg.geotools.referencing.resampleTolerance=0

(or reducing it from its default value, which is 0.333)

Cheers
Andrea


-- 
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to