Re: [mapserver-users] Re: logging GDAL queries

Ivan Lucena ivan.lucena at pmldnet.com
Fri Aug 13 09:20:12 EDT 2010


Interesting.

Why does it need to perform two requires for the same level?

I believe that mapserver is doing that. It is running GDALOpen() twice on the same raster/level.

In fact it should run that query just once, at the first GDALOpen(), like QuantumGIS does. So for each zoom level it goes through the "cursor" (array of BLOB) built by that query. But don't be scary of that. It is not loading any raster block in memory at that time.

But I understand that by the nature of Mapserver and that GDAL expectation is file reader, that is how it works. It opens and close files several times. 

Good thing is that at least while GDAL is in memory we can reuse the database connection. It might be part of the solution.

Regards,

Ivan



>  -------Original Message-------
>  From: Sebastian E. Ovide <sebastian.ovide at gmail.com>
>  To: Sumit Sharma <sumit321 at hotmail.com>
>  Cc: mapserver-users at lists.osgeo.org
>  Subject: Re: [mapserver-users] Re: logging GDAL queries
>  Sent: Aug 13 '10 07:58
>  
>  Sumit,
>  
>  The size of the pyramid image at each level is determined by the  original
>  image size and the pyramid level, according to the following  formulas:
>  
>  r(n) = (int)(r(0) / 2^n)
>  c(n) = (int)(c(0) / 2^n)
>  
>  
>  there are strange queries been executed....
>  
>  for example, at ANY zoom level I can see this one: (see level 3 !)
>  
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] GDAL:
>  GDALOpen(georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1,
>  this=0x2986210) succeeds as GeoRaster.
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PL/SQL:
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] SELECT RASTERBLOCK
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] FROM  
>  RDT_FLUVD04Q200PJ
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] WHERE  RASTERID = :1
>  AND
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  PYRAMIDLEVEL = :3
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ORDER BY
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  BANDBLOCKNUMBER ASC,
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  ROWBLOCKNUMBER ASC,
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  COLUMNBLOCKNUMBER ASC
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] GDAL:
>  GDALOpen(georaster:geoserver,geoserver,MFPRODUK_11G,fluvd04q200pj,georaster,id=1,
>  this=0x18be210) succeeds as GeoRaster.
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] PL/SQL:
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] SELECT RASTERBLOCK
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] FROM  
>  RDT_FLUVD04Q200PJ
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] WHERE  RASTERID = :1
>  AND
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  PYRAMIDLEVEL = :3
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40] ORDER BY
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  BANDBLOCKNUMBER ASC,
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  ROWBLOCKNUMBER ASC,
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]       
>  COLUMNBLOCKNUMBER ASC
>  [Fri Aug 13 13:53:00 2010] [error] [client 10.0.1.40]
>  
>  
>  why ?
>  
>  
>  On Fri, Aug 13, 2010 at 12:56 PM, Sumit Sharma <[LINK:
>  mailto:sumit321 at hotmail.com] sumit321 at hotmail.com> wrote:
>  
>  I think there are 11 pyramid levels. could that be a problem? I am not an
>  expert in GeoRaster, is it possible to create internal tiles in GeoRaster?
>  if yes then, it may help you enhancing the performance
>  --
>  View this message in context: [LINK:
>  http://osgeo-org.1803224.n2.nabble.com/logging-GDAL-queries-tp5419225p5419742.html]
>  http://osgeo-org.1803224.n2.nabble.com/logging-GDAL-queries-tp5419225p5419742.html
>  Sent from the Mapserver - User mailing list archive at Nabble.com.
>  
>  _______________________________________________
>  mapserver-users mailing list
>  [LINK: mailto:mapserver-users at lists.osgeo.org]
>  mapserver-users at lists.osgeo.org
>  
>  
>  [LINK: http://lists.osgeo.org/mailman/listinfo/mapserver-users]
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>  
>  
>  --
>  Sebastian E. Ovide
>  
>  
>  --------------------
>  _______________________________________________
>  mapserver-users mailing list
>  [LINK: compose.php?to=mapserver-users at lists.osgeo.org]
>  mapserver-users at lists.osgeo.org
>  [LINK: http://lists.osgeo.org/mailman/listinfo/mapserver-users]
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list