bug in mapogcfilter.c
Bart van den Eijnden (OSGIS)
bartvde at OSGIS.NL
Fri Apr 13 10:08:21 EDT 2007
Okay, tracked no. 3 down to mapwms.c. Somehow in my use case it doesn't get
to the code where the map gets reprojected.
There is a comment in the code that the reprojection code used to be at a
higher level, if I uncomment that part (and change buffer into srsbuffer)
all is fine:
else if (strcasecmp(names[i], "SRS") == 0) {
/* SRS is in format "EPSG:epsg_id" or "AUTO:proj_id,unit_id,lon0,lat0"
*/
if (strncasecmp(values[i], "EPSG:", 5) == 0)
{
/* SRS=EPSG:xxxx */
sprintf(srsbuffer, "init=epsg:%.20s", values[i]+5);
sprintf(epsgbuf, "EPSG:%.20s",values[i]+5);
/* we need to wait until all params are read before */
/* loding the projection into the map. This will help */
/* insure that the passes srs is valid for all layers. */
if (msLoadProjectionString(&(map->projection), srsbuffer) != 0)
return msWMSException(map, nVersion, NULL);
iUnits = GetMapserverUnitUsingProj(&(map->projection));
if (iUnits != -1)
map->units = iUnits;
}
Any ideas from the mapwms.c cracks?
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
--------- Oorspronkelijk bericht --------
Van: Bart van den Eijnden OSGIS <bartvde at OSGIS.NL>
Naar: MAPSERVER-DEV at LISTS.UMN.EDU <MAPSERVER-DEV at LISTS.UMN.EDU>
Onderwerp: Re: [UMN_MAPSERVER-DEV] bug in mapogcfilter.c
Datum: 13/04/07 10:44
> This fixes the reprojection issue mentioned for:
>
> 1) WFS requests
> 2) SLD WMS requests with &SRS=[the data's native SRS]
>
> but not for:
>
> 3) SLD WMS requests with reprojection
>
> Does anybody have an idea what other fix might be needed for 3) ?
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
> --------- Oorspronkelijk bericht --------
> Van: Bart van den Eijnden OSGIS <bartvde at OSGIS.NL>
> Naar: MAPSERVER-DEV at LISTS.UMN.EDU <MAPSERVER-DEV at LISTS.UMN.EDU>
> Onderwerp: [UMN_MAPSERVER-DEV] bug in mapogcfilter.c
> Datum: 13/04/07 08:56
>
> > Hi list,
> >
> > I've been trying to debug why BBOX filters in other SRS's (different
than
> > the map's SRS) currently don't work in Mapserver.
> >
> > In mapogcfilter.c, the box received (in the WFS or SLD WMS request)
will
> be
> > projected if the projection differs, but the msProjectRect function
call
> > currently is:
> >
> > msProjectRect(&amp;map-&gt;projection, &amp;sProjTmp,
&amp;sQueryRect);
> >
> > it should however be:
> >
> > msProjectRect(&amp;sProjTmp, &amp;map-&gt;projection,
&amp;sQueryRect);
> >
> > so the arguments are passed in in the wrong sequence.
> >
> > Since bugzilla seems to be down I can't open a bug for this.
> >
> > Best regards,
> > Bart
> >
> > --
> > Bart van den Eijnden
> > OSGIS, Open Source GIS
> > http://www.osgis.nl
> >
> >
>
>
More information about the mapserver-dev
mailing list