<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all!<br>
    <br>
    I'm quite new to PostGIS but I think I'm learning rather quickly.
    Anyways, I have a question regarding the storage of raster data in
    PostGIS. First of all, I think the raster2psql utility is wondrous
    and works great but unfortunately some of the data I need to store
    as a raster comes to me in text format. Let's say I have the
    latitude/longitude values and then the value of the raster in that
    point which in this case, it'll be the swell.<br>
    <br>
    Thing is I've been loading this data to postGIS without any major
    complication and then publishing that same info through geoserver.
    Let me show you how I load the data to PostGIS:<br>
    <br>
    First,<br>
    <blockquote><small>create table <tableName> (rid SERIAL
        primary key, rast raster)</small><br>
      <br>
    </blockquote>
    Then, for every row of data, <br>
       <br>
    <blockquote><small>insert into <tableName> (rast) select
        ST_AddBand(ST_MakeEmptyRaster(1,1,<long>,
        <lat>,1,1,0,0,4326), 1, '32BF', %s, 0.0)</small><br>
    </blockquote>
    <big>And,<br>
    </big>
    <blockquote><small>CREATE INDEX myrasters_rast_st_convexhull_idx ON
        <tableName> USING gist( ST_ConvexHull(rast) );</small><br>
      <small>SELECT AddRasterConstraints('<tableName>'::name,
        'rast'::name);</small><br>
    </blockquote>
    <br>
    This is all done in a python script and stores the data (I think)
    correctly. I've got to admit that I still need to understand a
    little bit more some of the parameters that are passed to the
    AddBand and MakeEmptyRaster functions, but I can do it in my own,
    this is not why I'm writing to you. The reason in fact, is that even
    though GeoServer does show the data, it takes quite a lot to load,
    and I thought it might be because I have not defined any overviews.
    I've been trying to find how to do it, but all I see is references
    to the raster2psql utility, but since I'm also a little new with
    Python I don't know exactly what it does.<br>
    <br>
    So, after all this, my question would be how can I add overviews
    "manually" to this raster data I'm loading? I would even appreciate
    if you can tell me where in raster2psql.py I can find it, or if it
    is in any other file it's being used for that purpose.<br>
    <br>
    Thank you very much for reading and I hope I was clear enough about
    my issue :-)<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
--

Mikel Gonzalez Gainza,
Informatikari bekaduna CENER-en // Becario informático en CENER
<a class="moz-txt-link-abbreviated" href="http://www.cener.com">www.cener.com</a></pre>
  </body>
</html>