[OpenLayers-Dev] OL not suitable for raster layers?

bartvde at osgis.nl bartvde at osgis.nl
Thu Apr 15 05:39:05 EDT 2010


Hi Stefanie,

I am able to "reproduce" your problem using:

http://pastebin.com/pY5QzkPK

When I compare the urls generated by OpenLayers and gvSIG, it shows that
OpenLayers uses square pixels (so the ratio of bbox and width and height
are equal), however gvSIG generates requests that puts Mapserver into non
square pixel mode (different ratio in x and y direction). What version of
Mapserver are you using? You might also want to check on the Mapserver
list since this does not seem an OpenLayers problem to me to be honest.

OpenLayers:
http://156.35.53.53/cgi-bin/wmsSATELITE?LAYERS=clorofila&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-3.4635145165362,42.439550316416,-0.46351451653621,45.052074778256&WIDTH=511&HEIGHT=445

gvSIG:
http://156.35.53.53/cgi-bin/wmsSATELITE?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=clorofila&SRS=EPSG:4326&BBOX=-3.4635145165362284,42.44287137086593,-0.46351451653622844,45.04875372380711&WIDTH=511&HEIGHT=445&FORMAT=image/gif&STYLES=default&TRANSPARENT=TRUE%27

OpenLayers

minx	-3,463514516536
maxx	-0,463514516536
miny	42,439550316416
maxy	45,052074778256

realwidth	3,000000000000
realheight	2,612524461840
ratio	1,148314606741

width	511,000000000000
height	445,000000000000
ratio	1,148314606742

gvSIG

minx	-3,463514516536
maxx	-0,463514516536
miny	42,442871370866
maxy	45,048753723807

realwidth	3,000000000000
realheight	2,605882352941
ratio	1,151241534989

width	511,000000000000
height	445,000000000000
ratio	1,148314606742

Best regards,
Bart

> Thanks for your quick response, Bart.
> I am not sure if I understand your questions right. The WMS product we
> are using is version 1.1.1 (generated by MapServer).
> Both layers are served under the following URL:
> http://idebos.bio.uniovi.es/cgi-bin/wmsSATELITE
> As for you question nº1 - if you refer to the display - yes, the results
> are different (testing with DEMIS world map and our layers). If you
> refer to the request string - I haven't payed much attention to the
> strings but anyway, here are the strings from gvSIG:
> 'http://www2.demis.nl/WMS/wms.ashx?wms=WorldMap&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=Topography,Hillshading,Streams&SRS=EPSG:4326&BBOX=-3.4635145165362284,42.44287137086593,-0.46351451653622844,45.04875372380711&WIDTH=511&HEIGHT=445&FORMAT=image/jpeg&STYLES=,,'
>
> 'http://156.35.53.53/cgi-bin/wmsSATELITE?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=clorofila&SRS=EPSG:4326&BBOX=-3.4635145165362284,42.44287137086593,-0.46351451653622844,45.04875372380711&WIDTH=511&HEIGHT=445&FORMAT=image/gif&STYLES=default&TRANSPARENT=TRUE'
> You may also wish to see the complete geoportal web page:
> http://idebos.bio.uniovi.es/GeoPortal/
> Here, tiling of the raster layers is currently default (singleTile false).
> Viewing the test code I send a couple of weeks ago you can see both,
> tiled and untiled.
> The place tested with gvSIG is actually further east but provided us
> with pixels more suitable to query and compare.
>
> Let me know if you need more details.
> Stefanie
>
>
>
>
> bartvde at osgis.nl escribió:
>> Hi Stefanie,
>>
>> I am trying your test page from March, but I can't really see what's
>> wrong, probably because I don't know your dataset well.
>>
>> A few questions:
>> 1) have you compared the URLs from gvSIG with OpenLayers singleTile
>> requests?
>> 2) which WMS product are you using?
>>
>> Can you provide me with 2 urls, one from gvSIG which is correct, and one
>> generated by OpenLayers (singleTile) which is supposed to be wrong.
>>
>> TIA.
>>
>> Best regards,
>> Bart
>>
>>
>>> Hi all,
>>> This might be the wrong moment and everybody seems to be busy with the
>>> new release candidate. But we need to come to a conclusion whether OL
>>> suits our needs or not

>>>
>>> I posted several messages (on 26.3. and 8.4.) reporting a layer
>>> displacement which seem to effect raster layers only. The pixel size of
>>> our raster maps is big and the displacement is obvious.
>>> Tests with another client software show that the maps are correctly
>>> displayed, so this must be a matter of OL.
>>> GetFeatureInfo is not effected (values of the expected pixel are
>>> returned although the visible pixel is not the right one).
>>> Configuring the layer as tiled or untiled (singleTile false or true)
>>> does have an effect: none of them is in the right place but both
>>> results
>>> show different displacements.
>>>
>>> More information and test code in my message posted on 26.3.
>>>
>>> Regards and thanks for your opinions,
>>> Stefanie
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at openlayers.org
>>> http://openlayers.org/mailman/listinfo/dev
>>>
>>>
>>
>>
>>
>>
>
>





More information about the Dev mailing list