<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV><FONT color=#000000>Thanks Saber, Micha and Carlos for your 
responses,</FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000>I tried the <FONT 
style="FONT-SIZE: 11pt">v.to.rast.attribute route (and also v.rast.value), but 
couldn’t get those tool to work with my data set (and I’m still exploring this 
issue and trying to work out what’s going on as they look like useful tools to 
be able to use).</FONT></FONT></DIV>
<DIV><FONT style="FONT-SIZE: 11pt" color=#000000></FONT> </DIV>
<DIV><FONT style="FONT-SIZE: 11pt"><FONT color=#000000>However, returning to the 
original Rasterize tool, I examined the raster data layer which was created in 
more detail and found that while the histogram was saying that the maximum value 
was <FONT style="FONT-SIZE: 12pt">0.995968, when I interrogated the individual 
grid cells with the Interrogate Features tool, the values were indeed one where 
they should be. Thus, my problem was not that the Rasterize tool was not 
working, but rather that it wasn’t being displayed correctly in QGIS. 
</FONT></FONT></FONT></DIV>
<DIV><FONT style="FONT-SIZE: 11pt"><FONT style="FONT-SIZE: 12pt" 
color=#000000></FONT></FONT> </DIV>
<DIV><FONT style="FONT-SIZE: 11pt"><FONT color=#000000><FONT 
style="FONT-SIZE: 12pt">To deal with this, I went into the Layer Properties and 
under the Style tab, I changed the maximum value from 0.995968 to 1</FONT>. This 
made the legend in the Table Of Contents window look a little odd, but the layer 
displayed correctly, has the right value in it, and does the correct 
calculations when using the raster calculator tool. </FONT></FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000>I’m not too sure why the layer is not being displayed 
correctly in the Table Of Contents window in the first place. Similarly, if I 
remove the raster data layer from the my project and add it back in again, it 
reverts to saying the maximum value is 0.995968 rather than 1 in the legend in 
the Table Of Contents window and in the histogram for the data layer. Thus, each 
time I use it in a new project, I have to manually change the maximum number to 
1. </FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000>I don’t know if this is a bug as such, or if this 
happens with other data sets (it happened with both of mine – one point and one 
line data layer), but it is certainly a potential pitfall for the novice user 
when it occurs.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000>All the best,</FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000>Colin</FONT></DIV>
<DIV> </DIV>
<DIV 
style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">==================================================================================<BR>GIS 
IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In 
Ecology<BR><BR>Web: www.GISinEcology.com Email: 
info@GISinEcology.com<BR><BR>Need to ask a question about using GIS? Try the GIS 
In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm<BR><BR>Books 
>From GIS In Ecology Staff:<BR><BR>An Introduction To Using GIS In Marine 
Biology; RRP: £44.99<BR>An Introduction To Using GIS In Marine Biology: 
Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 
<BR>An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - 
Working With Raster Data Layers; RRP: £19.99 <BR><BR>If you wish to purchase 
these books, visit: http://www.gisinecology.com/Book_Shop.htm<BR><BR>To help the 
environment, please do not print out this email unless it is 
unavoidable.<BR>==================================================================================</DIV>
<DIV 
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=sig.upagu@gmail.com 
href="mailto:sig.upagu@gmail.com">Carlos Cerdán</A> </DIV>
<DIV><B>Sent:</B> Thursday, April 10, 2014 9:23 PM</DIV>
<DIV><B>To:</B> <A title=qgis-user@lists.osgeo.org 
href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Qgis-user] Problem with Rasterize (Vector to raster) 
tool</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV 
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV dir=ltr>
<DIV>
<DIV>Perhaps raster calculator can also help 
you<BR><BR>Expression:<BR><BR>(layer>0 and layer <= 1)<BR><BR>Gives us 1 
when sentence is true and 0 for false, for each cell in 
"layer".<BR><BR></DIV>Good luck<BR><BR></DIV>Carlos<BR>
<DIV>
<DIV><BR><BR></DIV></DIV></DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>2014-04-10 9:29 GMT-05:00 Micha Silver <SPAN 
dir=ltr><<A href="mailto:micha@arava.co.il" 
target=_blank>micha@arava.co.il</A>></SPAN>:<BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
class=gmail_quote>
  <DIV style="DIRECTION: ltr" text="#000000" bgcolor="#FFFFFF">
  <DIV>Using GRASS there are two modules you can consider. First :<BR>v.to.rast 
  in=... out=... type=point use=val value=1<BR>will convert points into raster 
  cells (at the current region settings), where any cell that contains at least 
  one point will be given value 1.<BR><BR>Next:<BR>r.in.xyz in=... out=... 
  method=sum <BR>will create a raster (at the current region settings) where 
  each cell will have a value = the count of points in that 
  cell.<BR><BR>HTH,<BR>Micha 
  <DIV>
  <DIV class=h5><BR>On 04/10/2014 04:20 PM, Colin D. MacLeod 
  wrote:<BR></DIV></DIV></DIV>
  <BLOCKQUOTE type="cite">
    <DIV>
    <DIV class=h5>
    <DIV dir=ltr>
    <DIV style="FONT-FAMILY: 'Calibri'; FONT-SIZE: 12pt">
    <DIV>Hi All,</DIV>
    <DIV> </DIV>
    <DIV>I’m a fairly experienced GIS user, but I’m new to QGIS. I’m using 
    version 2.2, and I’m trying to convert a point data layer into a raster data 
    layer using the Rasterize tool. The point data layer has an integer field 
    with a value of 1 for all records, and I want to make a raster data layer 
    which has a value of one for each cell which has at least one point in it 
    (some cells have more than one point in them). When I use the Rasterize 
    tool, it creates the raster data layer fine, but all cells with have points 
    in them appear to have a value of 0.995968. I’ve tried editing the gdal code 
    (even making the resulting raster data layer an integer layer), but I still 
    cannot get it to produce a raster with a value of 1 rather than just a 
    number very close to one. </DIV>
    <DIV> </DIV>
    <DIV>Does anyone have any suggestions of where I might be going wrong and/or 
    how to solve this issue?</DIV>
    <DIV> </DIV>
    <DIV>On a related note, is it possible to use the Rasterize tool to work out 
    the average or total values for all the points which fall in each grid cell? 
    If so, how (I can’t find anything in the gdal instructions themselves which 
    would suggest this is possible, but I might be missing something). If this 
    isn’t possible to do with the Rasterize tool, are there other tools in QGIS 
    which can do this?</DIV>
    <DIV> </DIV>
    <DIV>Thanks for any help anyone can give on this.</DIV>
    <DIV> </DIV>
    <DIV>All the best,</DIV>
    <DIV> </DIV>
    <DIV>Colin</DIV>
    <DIV> </DIV>
    <DIV 
    style="FONT-FAMILY: 'Calibri'; FONT-SIZE: 12pt">==================================================================================<BR>GIS 
    IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In 
    Ecology<BR><BR>Web: <A href="http://www.GISinEcology.com" 
    target=_blank>www.GISinEcology.com</A> Email: <A 
    href="mailto:info@GISinEcology.com" 
    target=_blank>info@GISinEcology.com</A><BR><BR>Need to ask a question about 
    using GIS? Try the GIS In Ecology Forum: <A 
    href="http://www.GISinEcology.com/GIS_in_Ecology_forum.htm" 
    target=_blank>www.GISinEcology.com/GIS_in_Ecology_forum.htm</A><BR><BR>Books 
    From GIS In Ecology Staff:<BR><BR>An Introduction To Using GIS In Marine 
    Biology; RRP: £44.99<BR>An Introduction To Using GIS In Marine Biology: 
    Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: 
    £19:99 <BR>An Introduction To Using GIS In Marine Biology: Supplementary 
    Workbook Two - Working With Raster Data Layers; RRP: £19.99 <BR><BR>If you 
    wish to purchase these books, visit: <A 
    href="http://www.gisinecology.com/Book_Shop.htm" 
    target=_blank>http://www.gisinecology.com/Book_Shop.htm</A><BR><BR>To help 
    the environment, please do not print out this email unless it is 
    unavoidable.<BR>==================================================================================</DIV></DIV></DIV><BR><BR></DIV></DIV>This 
    mail was received via Mail-SeCure System.<BR><BR>
    <FIELDSET></FIELDSET> <BR><PRE>_______________________________________________
Qgis-user mailing list
<A href="mailto:Qgis-user@lists.osgeo.org" target=_blank>Qgis-user@lists.osgeo.org</A>
<A href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target=_blank>http://lists.osgeo.org/mailman/listinfo/qgis-user</A>
This mail was received via Mail-SeCure System.


</PRE></BLOCKQUOTE><BR></DIV><BR>_______________________________________________<BR>Qgis-user 
  mailing list<BR><A 
  href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</A><BR><A 
  href="http://lists.osgeo.org/mailman/listinfo/qgis-user" 
  target=_blank>http://lists.osgeo.org/mailman/listinfo/qgis-user</A><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV>
<P>
<HR>
_______________________________________________<BR>Qgis-user mailing 
list<BR>Qgis-user@lists.osgeo.org<BR>http://lists.osgeo.org/mailman/listinfo/qgis-user</DIV></DIV></DIV></BODY></HTML>