Re: [mapserver-users] raster query strategy
On 08/18/10 00:46, Richard Greenwood wrote: On Tue, Aug 17, 2010 at 2:57 PM, Frank Warmerdamwarmer...@pobox.com wrote: Jan Hartmann wrote: Is this a bug? Shouldn't MapServer use the gdaladdo overviews at the appropriate scales? Rich / Jan, No, generally I treat raster query as an exact operation done against the full resolution data. The overviews are only used to satisfy downsampled RasterIO requests such as drawing a reduced resolution map. I wouldn't classify it as a bug, but it is an interesting question. Displaying a map at 1:1,000,000 the user clicks and gets 30,000 cells from my 10m grid. Which one is right, or exact? Right now I'm averaging them, which is pretty much what gdaladdo has already done. If you click on a raster map and want to know the value of the area under that click, shouldn't that be the value of the pixel in the original resolution, just as Frank implemented it in GDAL? What you are doing now is essentially querying a square, with an area varying according to scale, and there is no other way to do that than by generalizing. Nothing wrong with that, of course, but is that really what you intend? And if MapServer's query function forces you to use that option, isn't *that* a bug? Jan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] raster query strategy
Is this a bug? Shouldn't MapServer use the gdaladdo overviews at the appropriate scales? Jan On 08/17/10 16:09, Richard Greenwood wrote: I am working with a single band raster of 10mX10m cells. I have added overlays with gdaladdo and it displays nicely. When I query the layer I am using MODE=nquery, not MODE=query. The reason that I am using nquery is unrelated to the raster layer, but I'm pretty much restricted to using that mode. At large scales this returns at least 2 cells, which I can average easily with JavaScript in the browser. However at small scales I'm getting 10s of 1000s of cells which are really slowing things down. It does not appear that query or nquery mode is using the overlays. Anyone disagree with that assumption? So the only solution that I've come up with thus far is to resample the raster to larger cell sizes and use the min/max scale denominator to select a layer with cell size appropriate to the scale. Anybody have other ideas? Thanks, Rich ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] raster query strategy
Jan Hartmann wrote: Is this a bug? Shouldn't MapServer use the gdaladdo overviews at the appropriate scales? Rich / Jan, No, generally I treat raster query as an exact operation done against the full resolution data. The overviews are only used to satisfy downsampled RasterIO requests such as drawing a reduced resolution map. Best regards, On 08/17/10 16:09, Richard Greenwood wrote: I am working with a single band raster of 10mX10m cells. I have added overlays with gdaladdo and it displays nicely. When I query the layer I am using MODE=nquery, not MODE=query. The reason that I am using nquery is unrelated to the raster layer, but I'm pretty much restricted to using that mode. At large scales this returns at least 2 cells, which I can average easily with JavaScript in the browser. However at small scales I'm getting 10s of 1000s of cells which are really slowing things down. It does not appear that query or nquery mode is using the overlays. Anyone disagree with that assumption? So the only solution that I've come up with thus far is to resample the raster to larger cell sizes and use the min/max scale denominator to select a layer with cell size appropriate to the scale. Anybody have other ideas? Thanks, Rich ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] raster query strategy
On Tue, Aug 17, 2010 at 2:57 PM, Frank Warmerdam warmer...@pobox.com wrote: Jan Hartmann wrote: Is this a bug? Shouldn't MapServer use the gdaladdo overviews at the appropriate scales? Rich / Jan, No, generally I treat raster query as an exact operation done against the full resolution data. The overviews are only used to satisfy downsampled RasterIO requests such as drawing a reduced resolution map. I wouldn't classify it as a bug, but it is an interesting question. Displaying a map at 1:1,000,000 the user clicks and gets 30,000 cells from my 10m grid. Which one is right, or exact? Right now I'm averaging them, which is pretty much what gdaladdo has already done. -- Richard Greenwood richard.greenw...@gmail.com www.greenwoodmap.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users