<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’m very aware of the problem. Will try to fix it the best we can. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Why not testing ST_MapAlgebra and give us your feedback? It is still to document but the specifications are in this page:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking02">http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking02</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Pierre<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> postgis-users-bounces@postgis.refractions.net [mailto:postgis-users-bounces@postgis.refractions.net] <b>On Behalf Of </b>Andreas Forø Tollefsen<br><b>Sent:</b> 14 mars 2011 11:24<br><b>To:</b> PostGIS Users Discussion<br><b>Subject:</b> Re: [postgis-users] PostGIS Raster Decimal?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi Pierre.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Yes. I think that would be an appropriate temporary fix.<o:p></o:p></p></div><div><p class=MsoNormal>Still, a bit problematic when working with climate data which very often include decimal digits and often have weekly and monthly rasters for 100's of years :)<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Good luck.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Best,<o:p></o:p></p></div><div><p class=MsoNormal>Andreas<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>2011/3/14 Pierre Racine <<a href="mailto:Pierre.Racine@sbf.ulaval.ca">Pierre.Racine@sbf.ulaval.ca</a>><o:p></o:p></p><p class=MsoNormal>Andreas,<br><br>This is a well known problem. See ticket <a href="http://trac.osgeo.org/postgis/ticket/650" target="_blank">http://trac.osgeo.org/postgis/ticket/650</a><br><br>I will discuss this problem with Frank this week at the code sprint in Montreal.<br><br>For now you can use some GIS with map algebra capability to multiply your raster by 10 before importing or test our brand new ST_MapAlgebra function (still to debug).<br><br>Pierre<br><br>>-----Original Message-----<br>>From: Pierre Racine<br>>Sent: 14 mars 2011 10:55<br>>To: Pierre Racine<br>>Subject: FW: [postgis-users] PostGIS Raster Decimal?<br>><br>><br>><br>>From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>><a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Andreas Forø Tollefsen<br>>Sent: 14 mars 2011 10:53<br>>To: PostGIS Users Discussion<br>>Subject: [postgis-users] PostGIS Raster Decimal?<o:p></o:p></p><div><div><p class=MsoNormal>><br>>Hi. Again.<br>><br>>I have been working on some raster data in PostGIS lately.<br>>However, i have some issues with the raster values become integer after importing the sql to postgis.<br>>For instance this procedure:<br>><br>>C:\prio_grid\source\gpw>c:\python26\python c:\prio_grid\script\raster2pgsql.py -<br>>r c:\prio_grid\source\gpw\lrc30p90\glp90ag30\w001001.adf -t gpw90 -s 4326 -o gpw<br>>90.sql -I -M<br>><br>>Then to database:<br>>C:\prio_grid\source\gpw>psql -h 192.168.1.55 -d priogrid -f gpw90.sql<br>><br>>Querying this data:<br>>SELECT gpw90.gid, ((gpw90.gpw90val).val) AS gpw90<br>>INTO popgrid<br>>FROM (SELECT priogrid_land.gid, ST_Intersection(gpw90.rast, priogrid_land.centroid) AS gpw90val FROM<br>>gpw90, priogrid_land WHERE ST_Intersects(priogrid_land.centroid, gpw90.rast)) AS gpw90<br>>WHERE gpw90.gid = 139303<br>>GROUP BY gid,((gpw90.gpw90val))<br>>;<br>><br>>Gives:<br>>gid; gpw90<br>>139303;39849<br>><br>>The value in the original raster is:<br>>39849.2<br>><br>>Question is then. How can i ensure that raster remain decimal and not integer after this import and<br>>query process?<br>><br>>Thanks.<br>>Andreas<br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></body></html>