Zooming to shapes found by queryByAttributes
Umberto Nicoletti
umberto.nicoletti at GMAIL.COM
Mon Jun 12 06:28:22 PDT 2006
REMEMBER to cc the list.
PHP mapscript is ok, it was not afffected. Probably you are not using
the correct order for minx, miny, etc.
Umberto
On 6/12/06, Volkan Ulukut <vulukut at tescilturk.com> wrote:
> I'm using mapserver 4.8.3. mapscript was compiled with it. What was wrong
> with zoomRectangle?
>
> -----Original Message-----
> From: tesciltu at host.tescilturk.com [mailto:tesciltu at host.tescilturk.com] On
> Behalf Of Umberto Nicoletti
> Sent: Monday, June 12, 2006 4:06 PM
> To: Volkan Ulukut
> Subject: Re: [UMN_MAPSERVER-USERS] Zooming to shapes found by
> queryByAttributes
>
> On 6/12/06, Volkan Ulukut <vulukut at tescilturk.com> wrote:
> >
> > void zoomrectangle(rectObj oPixelExt, int nImageWidth, int nImageHeight,
> > rectObj oGeorefExt)
> > Parmeters are :
> > - oPixelExt (rect object) : Pixel Extents, with (0,0) at the top-left
> > The rectangle contains the coordinates of the LL and UR
> > coordinates in pixel.
> >
> > Shape's bounds are georef coordinates. Zoomrectangle takes pixel extents
> as
> > parameter.
> > When i try to use shape's bounds anyway here's the result:
> > Fatal error: [MapServer Error]: msCalculateScale(): Invalid image extent,
> > minx=-31.418490, miny=75.002064, maxx=-31.418490, maxy=75.002064.
>
> There is a bug in the zoomRectangle code which was fixed last week in
> cvs versions of mapserver. What mapscript are you using?
>
> Umberto
>
> > -----Original Message-----
> > From: tesciltu at host.tescilturk.com [mailto:tesciltu at host.tescilturk.com]
> On
> > Behalf Of Umberto Nicoletti
> > Sent: Monday, June 12, 2006 3:45 PM
> > To: Volkan Ulukut
> > Cc: MAPSERVER-USERS at lists.umn.edu
> > Subject: Re: [UMN_MAPSERVER-USERS] Zooming to shapes found by
> > queryByAttributes
> >
> > Try to zoomRectangle using the shape's bounds.
> >
> > HTH,
> > Umberto
> >
> > On 6/12/06, Volkan Ulukut <vulukut at tescilturk.com> wrote:
> > >
> > >
> > >
> > >
> > > Hey list;
> > >
> > > I'm having trouble zooming to the exact location of the shape after
> doing
> > a
> > > search with queryByAttributes. I'm trying to use zoomrectangle and
> > zoomscale
> > > but they both need pixel position. So i try to convert my georef
> > coordinates
> > > to pixel coordinates. I believe that was successful too, but the problem
> > is
> > > that the shape is too small (a street in the worldmap) and the pixel i
> > > calculate is not an integer value. The zoom actually happens but not
> > exactly
> > > on the shape just a bit miles west and north. I tried to workaround this
> > by
> > > zooming step by step. By that i mean zooming to that location a little
> > then
> > > zooming to the centre till i get to the shape. But that won't give the
> > same
> > > result on every search as you may guess. I'm stuck now cause i can't
> zoom
> > to
> > > the right place with pixel coordinates. Is there any way that i can zoom
> > > with georef coordinates(lat/long)?
> >
> >
> >
>
>
>
More information about the MapServer-users
mailing list