[mapserver-users] MapScript resultsGetShape confusion [solved!]
Alan Boudreault
aboudreault at mapgears.com
Wed Jun 2 08:24:53 PDT 2010
Not sure why it is required with a PostGIS layer, but it shouldn't. In PHP, -1
is passe when the tileindex is not specified. Please fill a bug and assign it
to "aboudreault", I'm going to take a look.
Thanks,
Alan
On June 2, 2010 11:17:30 am Christian Jauvin wrote:
> Ok.. so with a lot of fiddling around (and with inspiration from a
> Frank Warmerdam's testing script) I've been able to find the cause of
> the problem, as well as its solution: with a PostGIS connected layer,
> a call to resultsGetShape *has* to include the third parameter,
> "tileindex":
>
> resultsGetShape(shp, res.shapeindex) --> hangs MS 5.6.3
> resultsGetShape(shp, res.shapeindex, res.tileindex) --> works great!
>
> I don't know if it's really a bug, but it contradicts the
> documentation, in which the tileindex argument is optional, and it
> wasn't behaving like that (to my knowledge) with MS in [5.6.0, 5.6.2].
>
> By the way, an initial observation I made was wrong: it also affects
> the PHP version, and the workaround is the same.
>
> Best regards,
>
> Christian
>
>
> On Tue, Jun 1, 2010 at 5:02 PM, Daniel Morissette
>
> <dmorissette at mapgears.com> wrote:
> > Christian Jauvin wrote:
> >> I did what you suggested, and added:
> >>
> >> CONFIG "MS_ERRORFILE" "<error file>"
> >> CONFIG "CPL_DEBUG" "ON"
> >> DEBUG 5
> >
> > Did you also include DEBUG 5 inside the POSTGIS layer itself?
> >
> >> to my mapfile, and performed my query again. It generated a very long
> >> file (200K+ lines!) with only two types of line:
> >>
> >> [Tue Jun 1 14:36:01 2010].765230 getSymbol(): Symbol definition
> >> error. Parsing error near (null):(line 208)
> >> [...]
> >> [Tue Jun 1 14:36:01 2010].777963 msPostGISLayerResultsGetShape called
> >> for record = 338
> >> [...]
> >
> > 200k times the same message sounds like an infinite loop of some sort.
> >
> > Perhaps look at the first few lines of debug/error messages. There may be
> > a different message that would have been output *before* entering the
> > infinite loop and that could give a hint about what is happening. Just a
> > guess... can't do much more from here.
> >
> > What is the last version that worked fine? 5.6.2?
> >
> > Daniel
> > --
> > Daniel Morissette
> > http://www.mapgears.com/
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
--
Alan Boudreault
Mapgears
http://www.mapgears.com
More information about the MapServer-users
mailing list