Hi Pierre,<div><br></div><div>I will check it out tomorrow and give some feedback.</div><div><br></div><div>Cheers,</div><div>Andreas<br><br><div class="gmail_quote">2011/3/14 Pierre Racine <span dir="ltr"><<a href="mailto:Pierre.Racine@sbf.ulaval.ca">Pierre.Racine@sbf.ulaval.ca</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I’m very aware of the problem. Will try to fix it the best we can. </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Why not testing ST_MapAlgebra and give us your feedback? It is still to document but the specifications are in this page:</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking02" target="_blank">http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking02</a></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Pierre</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </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">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a>] <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?</span></p></div></div><div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal">
Hi Pierre.</p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Yes. I think that would be an appropriate temporary fix.</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 :)</p>
</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Good luck.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Best,</p></div><div><p class="MsoNormal">Andreas</p><div><p class="MsoNormal">
 </p><div><p class="MsoNormal">2011/3/14 Pierre Racine <<a href="mailto:Pierre.Racine@sbf.ulaval.ca" target="_blank">Pierre.Racine@sbf.ulaval.ca</a>></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" target="_blank">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-" target="_blank">postgis-users-</a><br>
><a href="mailto:bounces@postgis.refractions.net" target="_blank">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?</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" target="_blank">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></p></div></div></div><p class="MsoNormal"> </p></div></div></div></div>
</div></div></div><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><br>
<br></blockquote></div><br></div>