[Qgis-user] Convrting vector to raster: rasterize (vecor to raster ) in QGIS

Santiago Banchero santiagobanchero at gmail.com
Fri Mar 22 19:09:33 PDT 2013


I attach a picture so you can understand better and the parameters that you
would see.
Best
Santiago

Usage: gdal_rasterize [-b band]* [-i] [-at]
       [-burn value]* | [-a attribute_name] [-3d]
       [-l layername]* [-where expression] [-sql select_statement]
       [-of format] [-a_srs srs_def] [-co "NAME=VALUE"]*
       [-a_nodata value] [-init value]*
       [-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height]
      * [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/*
*             CInt16/CInt32/CFloat32/CFloat64}]* [-q]
       <src_datasource> <dst_filename>


2013/3/22 Manuel Spínola <mspinola10 at gmail.com>

> Thank you very much Santiago,
>
> I don´t understand your suggestion. Could you be more specific.
>
> Best,
>
> Manuel
>
>
> 2013/3/22 Santiago Banchero <santiagobanchero at gmail.com>
>
>> Hi,
>>    you need fix the *-ot* parameter manually and set a Data Type
>> according to your trouble.
>>
>> Regards
>> Santiago
>>
>>
>> 2013/3/22 Manuel Spínola <mspinola10 at gmail.com>
>>
>>>  Dear list members,
>>>
>>> I am trying to convert a vector (shapefile) to a raster using the option
>>> Conversion -> rasterize under the raster menu, however I don´t understand
>>> the result that I am getting. The values of the raster does not make any
>>> sense the min: -1.79769e+308 and max: 1.79769e+308
>>>
>>>
>>> I am also doing the same thing in R and I got reasonable results, the
>>> values of the raster goes from 1 to 10, the ones that I expected.
>>>
>>> > raster_agri
>>> class       : RasterLayer
>>> dimensions  : 300, 300, 90000  (nrow, ncol, ncell)
>>> resolution  : 207.5064, 133.2117  (x, y)
>>> extent      : 440239.3, 502491.2, 1032331, 1072294  (xmin, xmax, ymin,
>>> ymax)
>>> coord. ref. : +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=500000
>>> +y_0=0 +ellps=WGS84 +units=m +no_defs
>>> data source : in memory
>>> names       : layer
>>> values      : 1, 10  (min, max)
>>>
>>>
>>>
>>> And even when I import this to QGIS the values of the raster does not
>>> make any sense either min: -2.14748e+09 and max: 2.14748e+09
>>>
>>> Any clue on this.
>>>
>>> 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
>>> mspinola at una.ac.cr
>>> mspinola10 at gmail.com
>>> 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/>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>>
>>
>>
>> --
>> Santiago Banchero
>>
>>
>
>
> --
> *Manuel Spínola, Ph.D.*
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> mspinola at una.ac.cr
> mspinola10 at gmail.com
> 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/>
>



-- 
Santiago Banchero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130322/6c72efdb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rta-gdal_rasterize.png
Type: image/png
Size: 66458 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130322/6c72efdb/attachment.png>


More information about the Qgis-user mailing list