QueryByRect Problems on shp point

Lowell Filak lfilak at MEDINACO.ORG
Thu Jan 20 00:06:13 EST 2005


The following message was sent by Francesco Sozzi <fsozzi at INTERCAD.CH>
on Wed, 19 Jan 2005 19:05:56 +0100.

> Hi Lowell,
>
> no, I think coordinates are correct.
> I create rectangle by:
>
> $newExtentScreenCoordStr = explode(" ",$hiddenMapImageBox);
> $newExtentScreenCoord = ms_newrectObj();
> $newExtentScreenCoord->setextent($newExtentScreenCoordStr[0],
>    $newExtentScreenCoordStr[1],
>    $newExtentScreenCoordStr[2],
>    $newExtentScreenCoordStr[3]);
>
> Where $hiddenMapImageBox is a box created by jBox.
>
> Please also note that the same rectangle works properly for lines and
> polygons and that it works properly for point on Oracle.
>
> Best regards
>
> Francesco
>
> ----- Original Message -----
> From: "Lowell Filak" <lfilak at medinaco.org>
> To: "Francesco Sozzi" <fsozzi at intercad.ch>; "Lowell Filak"
> <lfilak at MEDINACO.ORG>; <MAPSERVER-USERS at LISTS.UMN.EDU>
> Sent: Wednesday, January 19, 2005 2:29 PM
> Subject: Re: [UMN_MAPSERVER-USERS] QueryByRect Problems on shp point
>
>
> > Strange.
> > Is there any chance the points don't form a rectangle but rather a
> > parallelogram, quadrilateral, ...?
> > What if you draw the shapeobj on the map?
> >
> > Lowell
> >
> > The following message was sent by "Francesco Sozzi" <fsozzi at intercad.ch>
> > on Wed, 19 Jan 2005 10:07:52 +0100.
> >
> > > Hi Lowell,
> > >
> > > No I haven't any logging.
> > > At the moment I solved the problem by converting rectangle into a
shape
> > > object and issuing a QueryByShape: in this way it works.
> > > Strange...
> > >
> > > Francesco
> > >
> > > ----- Original Message -----
> > > From: "Lowell Filak" <lfilak at MEDINACO.ORG>
> > > To: <MAPSERVER-USERS at LISTS.UMN.EDU>
> > > Sent: Tuesday, January 18, 2005 6:13 PM
> > > Subject: Re: [UMN_MAPSERVER-USERS] QueryByRect Problems on shp point
> > >
> > >
> > > > The following message was sent by Francesco Sozzi
<fsozzi at INTERCAD.CH>
> > > > on Mon, 17 Jan 2005 11:55:02 +0100.
> > > >
> > > > > Hi all,
> > > > >
> > > > > I am having problems on querying a shapfile layer of type point.
> > > > >
> > > > > The code I use is:
> > > > > $qresult = $layer->queryByRect($rectDrawnedMapCoord);
> > > > > where $rectDrawnedMapCoord is a rectangle with map coordinates
that
> > > > contains
> > > > > several points.
> > > > >
> > > > > The problem is that I get an empty result.
> > > > >
> > > > > Here you are some notes:
> > > > > - I have problems only on shapefile layers of type point;
> queryByRect
> > > > works
> > > > > properly on shapefile polygon and line
> > > > > - I an Oracle Spatial copy (exatly the same point objects and
data)
> an
> > > it
> > > > > works: I get right resul on queryByRect
> > > > >
> > > > > Anybody have any suggestions?
> > > >
> > > > Francesco,
> > > >
> > > > Do you have any logging turned on that could point to a problem
> possibly
> > > > accessing the shapefile?
> > > >
> > > > Lowell

Francesco,

There are a lot of php users out there that don't seem to have seen this
before. I also don't see anything in bugzilla. If you find the problem
to be reproducible you should probably file a new bug.

Lowell



More information about the mapserver-users mailing list