Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool
Thanks Saber, Micha and Carlos for your responses, I tried the 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). 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 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. 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. 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. 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. 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. All the best, Colin == GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology Web: www.GISinEcology.com Email: i...@gisinecology.com Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm Books From GIS In Ecology Staff: An Introduction To Using GIS In Marine Biology; RRP: £44.99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: £19.99 If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm To help the environment, please do not print out this email unless it is unavoidable. == From: Carlos Cerdán Sent: Thursday, April 10, 2014 9:23 PM To: qgis-user@lists.osgeo.org Subject: Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool Perhaps raster calculator can also help you Expression: (layer0 and layer = 1) Gives us 1 when sentence is true and 0 for false, for each cell in layer. Good luck Carlos 2014-04-10 9:29 GMT-05:00 Micha Silver mi...@arava.co.il: Using GRASS there are two modules you can consider. First : v.to.rast in=... out=... type=point use=val value=1 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. Next: r.in.xyz in=... out=... method=sum will create a raster (at the current region settings) where each cell will have a value = the count of points in that cell. HTH, Micha On 04/10/2014 04:20 PM, Colin D. MacLeod wrote: Hi All, 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. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? 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? Thanks for any
Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool
Hi, i'm using raster to vector (QGIS) and its taking a very very long time to process. i have converted the values of raster 0,1. can anyone suggest what is the issue or does it take really long to process Nishant On Fri, Apr 11, 2014 at 3:36 PM, Colin D. MacLeod cdmacl...@gisinecology.com wrote: Thanks Saber, Micha and Carlos for your responses, I tried the 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). 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 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. 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. 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. 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. 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. All the best, Colin == GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology Web: www.GISinEcology.com Email: i...@gisinecology.com Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm Books From GIS In Ecology Staff: An Introduction To Using GIS In Marine Biology; RRP: £44.99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: £19.99 If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm To help the environment, please do not print out this email unless it is unavoidable. == *From:* Carlos Cerdán sig.up...@gmail.com *Sent:* Thursday, April 10, 2014 9:23 PM *To:* qgis-user@lists.osgeo.org *Subject:* Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool Perhaps raster calculator can also help you Expression: (layer0 and layer = 1) Gives us 1 when sentence is true and 0 for false, for each cell in layer. Good luck Carlos 2014-04-10 9:29 GMT-05:00 Micha Silver mi...@arava.co.il: Using GRASS there are two modules you can consider. First : v.to.rast in=... out=... type=point use=val value=1 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. Next: r.in.xyz in=... out=... method=sum will create a raster (at the current region settings) where each cell will have a value = the count of points in that cell. HTH, Micha On 04/10/2014 04:20 PM, Colin D. MacLeod wrote: Hi All, 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. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? On a related note, is it possible to use the Rasterize tool to work out the average
Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool
That's probably because the option for min/max limits is cumulative pixel count. You can change that in Settings-Rendering-Rasters or in the individual raster properties On Fri, Apr 11, 2014 at 7:06 AM, Colin D. MacLeod cdmacl...@gisinecology.com wrote: Thanks Saber, Micha and Carlos for your responses, I tried the 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). 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 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. 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. 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. 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. 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. All the best, Colin == GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology Web: www.GISinEcology.com Email: i...@gisinecology.com Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm Books From GIS In Ecology Staff: An Introduction To Using GIS In Marine Biology; RRP: £44.99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: £19.99 If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm To help the environment, please do not print out this email unless it is unavoidable. == *From:* Carlos Cerdán sig.up...@gmail.com *Sent:* Thursday, April 10, 2014 9:23 PM *To:* qgis-user@lists.osgeo.org *Subject:* Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool Perhaps raster calculator can also help you Expression: (layer0 and layer = 1) Gives us 1 when sentence is true and 0 for false, for each cell in layer. Good luck Carlos 2014-04-10 9:29 GMT-05:00 Micha Silver mi...@arava.co.il: Using GRASS there are two modules you can consider. First : v.to.rast in=... out=... type=point use=val value=1 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. Next: r.in.xyz in=... out=... method=sum will create a raster (at the current region settings) where each cell will have a value = the count of points in that cell. HTH, Micha On 04/10/2014 04:20 PM, Colin D. MacLeod wrote: Hi All, 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. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? 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
[Qgis-user] Problem with Rasterize (Vector to raster) tool
Hi All, 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. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? 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? Thanks for any help anyone can give on this. All the best, Colin == GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology Web: www.GISinEcology.com Email: i...@gisinecology.com Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm Books From GIS In Ecology Staff: An Introduction To Using GIS In Marine Biology; RRP: £44.99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: £19.99 If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm To help the environment, please do not print out this email unless it is unavoidable. ==___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool
In QGIS, ensure Processing plugin is enabled. From Processing interface, change the interface to Advanced (bottom of the toolbar) Within the module search, type v.to.rast From the module list, select v.to.rast.attribute Fill in appropriate boxes and hit Run. Cheers, Saber Saber Razmjooei Lutra Consulting http://www.lutraconsulting.co.uk/ www.lutraconsulting.co.uk From: qgis-user-boun...@lists.osgeo.org [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of Colin D. MacLeod Sent: 10 April 2014 14:20 To: qgis-user@lists.osgeo.org Subject: [Qgis-user] Problem with Rasterize (Vector to raster) tool Hi All, 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. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? 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? Thanks for any help anyone can give on this. All the best, Colin == GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology Web: www.GISinEcology.com Email: i...@gisinecology.com Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm Books From GIS In Ecology Staff: An Introduction To Using GIS In Marine Biology; RRP: £44.99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: £19.99 If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm To help the environment, please do not print out this email unless it is unavoidable. == -- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Whilst reasonable care has been taken to avoid virus transmission, no responsibility for viruses is taken and it is your responsibility to carry out such checks as you feel appropriate. If this email contains a quote or offer to sell pro ducts, carry out work or perform services then our standard terms and conditions (which can be found at http://www.lutraconsulting.co.uk/downloads/Lutra%20Consulting%20Standard%20Terms%20and%20Conditions.pdf shall apply unless explicitly stated otherwise. Saber Razmjooei and Peter Wells trading as Lutra Consulting. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool
Using GRASS there are two modules you can consider. First : v.to.rast in=... out=... type=point use=val value=1 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. Next: r.in.xyz in=... out=... method=sum will create a raster (at the current region settings) where each cell will have a value = the count of points in that cell. HTH, Micha On 04/10/2014 04:20 PM, Colin D. MacLeod wrote: Hi All, Im a fairly experienced GIS user, but Im new to QGIS. Im using version 2.2, and Im 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. Ive 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. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? 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 cant find anything in the gdal instructions themselves which would suggest this is possible, but I might be missing something). If this isnt possible to do with the Rasterize tool, are there other tools in QGIS which can do this? Thanks for any help anyone can give on this. All the best, Colin == GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology Web: www.GISinEcology.com Email: i...@gisinecology.com Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm Books From GIS In Ecology Staff: An Introduction To Using GIS In Marine Biology; RRP: 44.99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: 19:99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: 19.99 If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm To help the environment, please do not print out this email unless it is unavoidable. == This mail was received via Mail-SeCure System. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user This mail was received via Mail-SeCure System. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Problem with Rasterize (Vector to raster) tool
Perhaps raster calculator can also help you Expression: (layer0 and layer = 1) Gives us 1 when sentence is true and 0 for false, for each cell in layer. Good luck Carlos 2014-04-10 9:29 GMT-05:00 Micha Silver mi...@arava.co.il: Using GRASS there are two modules you can consider. First : v.to.rast in=... out=... type=point use=val value=1 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. Next: r.in.xyz in=... out=... method=sum will create a raster (at the current region settings) where each cell will have a value = the count of points in that cell. HTH, Micha On 04/10/2014 04:20 PM, Colin D. MacLeod wrote: Hi All, 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. Does anyone have any suggestions of where I might be going wrong and/or how to solve this issue? 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? Thanks for any help anyone can give on this. All the best, Colin == GIS IN ECOLOGY - Providing Training, Advice And Consultancy On The Use Of GIS In Ecology Web: www.GISinEcology.com Email: i...@gisinecology.com Need to ask a question about using GIS? Try the GIS In Ecology Forum: www.GISinEcology.com/GIS_in_Ecology_forum.htm Books From GIS In Ecology Staff: An Introduction To Using GIS In Marine Biology; RRP: £44.99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook One - Creating Maps Of Species Distribution; RRP: £19:99 An Introduction To Using GIS In Marine Biology: Supplementary Workbook Two - Working With Raster Data Layers; RRP: £19.99 If you wish to purchase these books, visit: http://www.gisinecology.com/Book_Shop.htm To help the environment, please do not print out this email unless it is unavoidable. == This mail was received via Mail-SeCure System. ___ Qgis-user mailing listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user This mail was received via Mail-SeCure System. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user