queryByFeatures raster

Burgholzer,Robert rwburgholzer at DEQ.VIRGINIA.GOV
Tue Jun 12 14:19:55 EDT 2007


Frank,
Thanks much for your reply. I was in fact querying a raster that was
re-projected by mapserver, therefore, causing a problem (I guess it
won't do the reprojection, then the query).  Anyhow, one solution begets
another challenge sometimes, as my next post regarding the death of
CGI/FastCGI... any insights would be most wonderful!

r.b.

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Tuesday, June 12, 2007 2:24 PM
To: Burgholzer,Robert
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] queryByFeatures raster

Burgholzer,Robert wrote:
> Is it possible to do a queryByFeatures on a raster?  That is, I want
to 
> select a shape feature, then have that used as a query shape to 
> summarize info in my overlapping raster.
> 
>  
> 
> I am trying this:
> 
>  
> 
>    $rastermap = $amap->map->getLayerByName('depart30');
> 
>    $shapemap = $amap->map->getLayerByName('selectedsegs');
> 
>    $rastermap->queryByShape($shapemap->index);
> 
>  
> 
> But cannot seem to retrieve any data (even though the raster is 
> definitely overlapping). 
> 
>  
> 
> My raster layer is a geoTiff (also tried as Gif, same result), with a 
> manually specified world file. The images display overlapping in the
map 
> view window.

Robert,

I have reviewed maprasterquery.c, and confirmed that query by shape is
intended to work and the msautotest/mspython/rqtest.py script utilizes
this capability.  You might want to first try querybyrect and verify
that
is working ok.  If not, then the issue is not specific to shapes.  If
that
works but shapes don't then check things like "is your shape in the
right
coordinate system".

If you are convinced there is a bug and can demonstrate it with a simple
example then file a bug and assign it to me.

Best regards,
-- 
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org



More information about the mapserver-users mailing list