Opened 19 years ago
Last modified 13 years ago
#1627 new defect
[WMS] ] SLD / stretch images when using FE !
Reported by: | assefa | Owned by: | assefa |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | WMS Server | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: | fx.prunayre@… |
Description
Hello list, one question about SLD & Mapserver A simple GetMap request on a LAYER http://services.sandre.eaufrance.fr/geos/zonage? SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA& return a correct image. A GetMap on the same layer using SLD and filter <PropertyIsEqualTo> http://services.sandre.eaufrance.fr/geos/zonage? SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&SLD=http://sandre.eaufranc e.fr/geo/sld/cibaExp.sld return a correct image. (SLD used : http://sandre.eaufrance.fr/geo/sld/cibaExp.sld) A GetMap on the same layer using SLD and filter <Intersects> http://services.sandre.eaufrance.fr/geos/zonage? SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&SLD=http://sandre.eaufranc e.fr/geo/sld/cibaInBourgogne.sld return an image which contains the object corresponding to the intersect query but the image is stretched (on the y axis) ... (SLD used : http://sandre.eaufrance.fr/geo/sld/cibaInBourgogne.sld) Any ideas ? Layers are in Oracle Spatial.
Attachments (4)
Change History (19)
comment:2 by , 19 years ago
Cc: | added |
---|
e-mail from Julien on the problem : Requete mapserver standard: http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&mode=map&LAYERS=prov_bound Requete WMS standard: http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&service=WMS&request=GetMap&version=1.1.1&LAYERS=prov_bound Requete WMS avec un Filtre de type BBox: http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&service=WMS&request=GetMap&version=1.1.1&LAYERS=prov_bound&SLD=http://127.0.0.1:8080/sandre/sld_bbox.xml Requete WMS avec un filtre de type Intersect: http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&service=WMS&request=GetMap&version=1.1.1&LAYERS=prov_bound&SLD=http://127.0.0.1:8080/sandre/sld_inter.xml Commes-tu peux voir il y a des differences dans le rendu des cartes.
comment:3 by , 19 years ago
Julien, I have check this using the data and here is what I think : There is currently a diffrence on the image between a GetMap request (without and extents or width/heigh seeting) and a simple cgi mode=map request. The reason being is the the mode=map adjusts the extsnts set in the map file to fit the width/height. In the case of the wms, the original extents set in the map file are the one used and we end up doing non square pixel. I think that the wms should adjust the extents before loading the parameters of the request. The width/height/extents can be set in the request (which by he way are required parameters of the wms although not tested as such in Mapserver). The original issue that you see with the sld using a FE is related to this : when using a FE, there is query which is done and during the query the map extents and adjusted using the width/heigh set. So by adjusting the extents beofre loading the wms requests, It solves the problem. I was thinking that maybe this would prevent a person from intentionnaly distorting his map, but since width/heigh/bbox are required parameters, It does kind of prevent that already. What do you think ? If there is no objection I will make the changes.
comment:4 by , 19 years ago
Is there a reason the WMS request do not modify the extent before drawing? Without knowing what's under the hood, I was thinking that it was to always return exactly what was asked by the client. If it's not the case, then I agree that WMS request should behave exactly lilke GetMap request.
comment:5 by , 19 years ago
Cc: | added |
---|
I updated my mapserver with the latest CVS http://services.sandre.eaufrance.fr/geos/zonage? <!-- MapServer version 4.9 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT=EPPL7 INPUT=ORACLESPATIAL INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE --> and still the same problem. Francois
comment:6 by , 19 years ago
Julien, Francois I added the code to adjust the extents using current width and height before loading parameters. Please give it a try. I tried it with Julien's data and It works.
comment:7 by , 19 years ago
Results are coherent when setting no parameters BBOX, WIDTH and HEIGHT in URL http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&SRS=EPSG:4326&SLD=http://sandre.eaufrance.fr/geo/sld/cibaExp.sld http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&SRS=EPSG:4326&SLD=http://sandre.eaufrance.fr/geo/sld/cibaInBourgogne.sld http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&SRS=EPSG:4326& ... but images are not if using BBOX, WIDTH and HEIGHT parameters. Examples with 2 different projections : http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=-5,40,12,52&SRS=EPSG:4326&SLD=http://sandre.eaufrance.fr/geo/sld/cibaExp.sld http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=-5,40,12,52&SRS=EPSG:4326&SLD=http://sandre.eaufrance.fr/geo/sld/cibaInBourgogne.sld http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=-5,40,12,52&SRS=EPSG:4326& http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=0,1600000,1400000,2800000&SRS=EPSG:27582&SLD=http://sandre.eaufrance.fr/geo/sld/cibaExp.sld http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=0,1600000,1400000,2800000&SRS=EPSG:27582&SLD=http://sandre.eaufrance.fr/geo/sld/cibaInBourgogne.sld http://services.sandre.eaufrance.fr/geos/zonage?SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=0,1600000,1400000,2800000&SRS=EPSG:27582& Almost ok. Thanks.
comment:8 by , 19 years ago
Cc: | added |
---|
adding myself to the cc: list since this change has affected some of the msautotest/wxs results. I will need to update the test suite once things are settled down.
comment:9 by , 19 years ago
Assefa, Your fix is correct. Any chance to see it in 4.8? Like Francois said however, when using the 3 parameters BBox, width and height together, the bug shows again. Check URL for the attached test case: Working request with Intersect: http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&service=WMS&request=GetMap&version=1.1.1&LAYERS=prov_bound&SLD=http://127.0.0.1:8080/sandre/sld_inter.xml Not-working request with Intersect and bbox and height and width: http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&service=WMS&request=GetMap&version=1.1.1&LAYERS=prov_bound&SLD=http://127.0.0.1:8080/sandre/sld_bbox.xml&width=400&height=300&BBox=-2200000,-712631,3072800,3840000
comment:10 by , 19 years ago
Julien, looking at your last tests, the results are consistent : * in the first case (no width, height given), the image returned is adjusted (extents are adjusted using the width height and this produces an image equally proportinal in x and y) * in the 2nd case, we end up having a streched image (based on the extents and the width/height given, we end up having non square pixels). Does this make sense ? I am not sure, if It should be added to 4.8. The changes are minimal in code but It changed the behaviour. Daniel, can you comment on this if possible ? Julien, Francois, Is Francois case the same as the one Julien preseneted ? If not could I have Francois's data to test it locally ? Thanks
comment:11 by , 18 years ago
Problem is that when using Width, height and Bbox images are different if using no filter, <PropertyIsEqualTo> and <Intersects>. When no filter and <PropertyIsEqualTo> images are consistent, but not with intersects which is stretched. Francois
comment:12 by , 18 years ago
Francois, Are you using latest CVS version? If I compare a request with Intersect and a request with no filter, I get the exact same result. Let us know if you still reproduce the problem with your data. URLs for attached test case: http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&service=WMS&request=GetMap&version=1.1.1&LAYERS=prov_bound&SLD=http://127.0.0.1:8080/sandre/sld_bbox.xml&width=400&height=300&BBox=-2200000,-712631,3072800,3840000 http://127.0.0.1:8080/cgi-bin/mapserv?map=/home/julien/proj/fgs-dev/src/mapserver/bugs/bug1627/bug1627.map&service=WMS&request=GetMap&version=1.1.1&LAYERS=prov_bound&width=400&height=300&BBox=-2200000,-712631,3072800,3840000
comment:13 by , 18 years ago
Hi - still testing bug 1627 -, I tried to convert to shapefile. But it is the same. CVS version is ok for BBOX and was not in the previous one. But I still have the problem with INTERSECTS. http://services.sandre.eaufrance.fr/geos/mapservercvs?map=/home/www/data/bug1627/bug1627ciba.map&SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=0,1600000,1400000,2800000&SRS=EPSG:27582& BBOX filter return a consistent image : - CVS version : http://services.sandre.eaufrance.fr/geos/mapservercvs?map=/home/www/data/bug1627/bug1627ciba.map&SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=0,1600000,1400000,2800000&SRS=EPSG:27582&SLD=http://sandre.eaufrance.fr/geo/sld/cibaInFrance.sld - Old version (4.8b2): http://services.sandre.eaufrance.fr/geos/mapserv48b2?map=/home/www/data/bug1627/bug1627ciba.map&SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=0,1600000,1400000,2800000&SRS=EPSG:27582&SLD=http://sandre.eaufrance.fr/geo/sld/cibaInFrance.sld but INTERSECTS doesn't http://services.sandre.eaufrance.fr/geos/mapservercvs?map=/home/www/data/bug1627/bug1627ciba.map&SERVICE=WMS&VERSION=1.1.1&Request=GetMap&LAYERS=CIBA&WIDTH=300&HEIGHT=300&BBOX=0,1600000,1400000,2800000&SRS=EPSG:27582&SLD=http://sandre.eaufrance.fr/geo/sld/cibaInBourgogne2.sld In both case geometry in filter is in WGS84. Hope this could help.
comment:15 by , 13 years ago
Owner: | changed from | to
---|
Note:
See TracTickets
for help on using tickets.