How to make a raster or grid from a shapefile

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make a raster or grid from a shapefile

Manuel Spínola
Dear lis members,

How to make a raster or grid from a shapefile?
Best,

Manuel


--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
[hidden email]
[hidden email]
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

pcav
Il 30/10/2010 22:29, Manuel Spínola ha scritto:
>  Dear lis members,
>
> How to make a raster or grid from a shapefile?

either through the Raster tools plugin, or using the grass plugin.
All the best.

--
Paolo Cavallini: http://www.faunalia.it/pc
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

Manuel Spínola
Thank you very much Paolo,

Which function should I use grid?
Should I provide any specific parameter?
Best,

Manuel

On 30/10/2010 03:09 p.m., Paolo Cavallini wrote:
Il 30/10/2010 22:29, Manuel Spínola ha scritto:
 Dear lis members,

How to make a raster or grid from a shapefile?
either through the Raster tools plugin, or using the grass plugin.
All the best.



--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
[hidden email]
[hidden email]
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

Micha Silver
Manuel Spínola wrote:

> Thank you very much Paolo,
>
> Which function should I use grid?
> Should I provide any specific parameter?
You'll have to tell us what sort of shapefile, and what exactly you want
to do.
i.e. is it a point shapefile that you want to *interpolate* into a grad?
or is it a line/area that you just want to rasterize?

> Best,
>
> Manuel
>
> On 30/10/2010 03:09 p.m., Paolo Cavallini wrote:
>> Il 30/10/2010 22:29, Manuel Spínola ha scritto:
>>    
>>>  Dear lis members,
>>>
>>> How to make a raster or grid from a shapefile?
>>>      
>> either through the Raster tools plugin, or using the grass plugin.
>> All the best.
>>
>>    
>
>
> --
> *Manuel Spínola, Ph.D.*
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> [hidden email] <mailto:[hidden email]>
> [hidden email] <mailto:[hidden email]>
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
> Personal website: Lobito de río
> <https://sites.google.com/site/lobitoderio/>
> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>
>
> This mail was received via Mail-SeCure System.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> This mail was received via Mail-SeCure System.
>
>
>  

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

Manuel Spínola
Thank you very much Micha,

I want to make a grid or raster from a land us / land cover shapefile, a polygon with 9 categories.  I want this to model a species distribution, based on animal ocurrence.
Categories:

Forest
Crops
Wetlands
Disturbed Forests
Grasslands
Urban Areas
Water
Bareground
No data

Best,

Manuel

On 31/10/2010 03:33 a.m., Micha Silver wrote:
Manuel Spínola wrote:

Thank you very much Paolo,

Which function should I use grid?
Should I provide any specific parameter?
You'll have to tell us what sort of shapefile, and what exactly you want to do.
i.e. is it a point shapefile that you want to *interpolate* into a grad?
or is it a line/area that you just want to rasterize?

Best,

Manuel

On 30/10/2010 03:09 p.m., Paolo Cavallini wrote:
Il 30/10/2010 22:29, Manuel Spínola ha scritto:
   
 Dear lis members,

How to make a raster or grid from a shapefile?
     
either through the Raster tools plugin, or using the grass plugin.
All the best.

   


-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
[hidden email] [hidden email]
[hidden email] [hidden email]
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>


This mail was received via Mail-SeCure System.
------------------------------------------------------------------------

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user

This mail was received via Mail-SeCure System.


 




--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
[hidden email]
[hidden email]
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

Micha Silver
Manuel Spínola wrote:

> Thank you very much Micha,
>
> I want to make a grid or raster from a land us / land cover shapefile,
> a polygon with 9 categories.  I want this to model a species
> distribution, based on animal ocurrence.
In that case you can import the vector shapefile into the GRASS and
convert to a raster using the QGIS plugin.
Start by setting up a GRASS Location and mapset. The location coordinate
system MUST match the CRS of the shapefile.
Next use v.in.ogr in the GRASS toolbox to import the vector to GRASS.
Now be sure to set the current region to match that imported vector.  
Use g.region, or just edit the region manually with the "Edit region"
toolbar button.
Then use the module v.to.rast.attrib to make the vector into a raster.
Select the landcover attribute column as the raster category (must be an
integer)

Regards,

> Categories:
>
> Forest
> Crops
> Wetlands
> Disturbed Forests
> Grasslands
> Urban Areas
> Water
> Bareground
> No data
>
> Best,
>
> Manuel
>
> On 31/10/2010 03:33 a.m., Micha Silver wrote:
>> Manuel Spínola wrote:
>>
>>> Thank you very much Paolo,
>>>
>>> Which function should I use grid?
>>> Should I provide any specific parameter?
>> You'll have to tell us what sort of shapefile, and what exactly you
>> want to do.
>> i.e. is it a point shapefile that you want to *interpolate* into a grad?
>> or is it a line/area that you just want to rasterize?
>>
>>> Best,
>>>
>>> Manuel
>>>
>>> On 30/10/2010 03:09 p.m., Paolo Cavallini wrote:
>>>> Il 30/10/2010 22:29, Manuel Spínola ha scritto:
>>>>    
>>>>>  Dear lis members,
>>>>>
>>>>> How to make a raster or grid from a shapefile?
>>>>>      
>>>> either through the Raster tools plugin, or using the grass plugin.
>>>> All the best.
>>>>
>>>>    
>>>
>>>
>>> --
>>> *Manuel Spínola, Ph.D.*
>>> Instituto Internacional en Conservación y Manejo de Vida Silvestre
>>> Universidad Nacional
>>> Apartado 1350-3000
>>> Heredia
>>> COSTA RICA
>>> [hidden email] <mailto:[hidden email]>
>>> <mailto:[hidden email]>
>>> [hidden email] <mailto:[hidden email]>
>>> <mailto:[hidden email]>
>>> Teléfono: (506) 2277-3598
>>> Fax: (506) 2237-7036
>>> Personal website: Lobito de río
>>> <https://sites.google.com/site/lobitoderio/>
>>> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>>>
>>>
>>> This mail was received via Mail-SeCure System.
>>> ------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> [hidden email] <mailto:[hidden email]>
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>> This mail was received via Mail-SeCure System.
>>>
>>>
>>>  
>>
>>
>
>
> --
> *Manuel Spínola, Ph.D.*
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> [hidden email] <mailto:[hidden email]>
> [hidden email] <mailto:[hidden email]>
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
> Personal website: Lobito de río
> <https://sites.google.com/site/lobitoderio/>
> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>
>
> This mail was received via Mail-SeCure System.

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

Borys Jurgiel-2
In reply to this post by Manuel Spínola

> I want to make a grid or raster from a land us / land cover shapefile, a

> polygon with 9 categories. I want this to model a species distribution,

> based on animal ocurrence.

You can also use menu Raster -> Rasterize, unfortunately you first need an empty raster to burn the polygons. It calls a GDAL utility program:

http://www.gdal.org/gdal_rasterize.html

From GDAL 1.8 it will create raster files from scratch.


_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

Manuel Spínola
Thank you very much Borys.

Is there any example in a tutorial on the use of Rasterize?

Best,

Manuel

On 01/11/2010 03:30 a.m., Borys Jurgiel wrote:

> I want to make a grid or raster from a land us / land cover shapefile, a

> polygon with 9 categories. I want this to model a species distribution,

> based on animal ocurrence.

You can also use menu Raster -> Rasterize, unfortunately you first need an empty raster to burn the polygons. It calls a GDAL utility program:

http://www.gdal.org/gdal_rasterize.html

From GDAL 1.8 it will create raster files from scratch.



--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
[hidden email]
[hidden email]
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: How to make a raster or grid from a shapefile

Borys Jurgiel-2
Dnia poniedziałek 01 listopada 2010 o 12:23:30 Manuel Spínola napisał(a):
> Thank you very much Borys.
>
> Is there any example in a tutorial on the use of Rasterize?

Unfortunately I don't know any and believe there's nothing like that, as
there's no simple way to do it. You can follow this way:

1. Use "Interpolation" plugin to create a raster file based on your vector (I
suppose the values will be interpolated among polygon centroids)

2. Use RasterCalc to remove values from it. You can e.g. multiply it by 0:
[your_raster]@1 * 0

3. Now use your empty raster in the Raster->Rasterize
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user