[gdal-dev] convert shapefile to raster

Chaitanya kumar CH chaitanya.ch at gmail.com
Sun Feb 13 05:56:05 EST 2011


Rashad,

This would probably give you a Float64 type bands with the pixels valued at
255.0
Try setting the band type to Byte using the -ot option.

On Sun, Feb 13, 2011 at 4:11 PM, Mohammed Rashad <mohammedrashadkm at gmail.com
> wrote:

>
> How to convert shapefile to a raster image using gdal
>
> I tried
> gdal_rasterize -burn 255 -burn 0 -burn 0 -ts 100 100 -l ernakulam
> ernakulam.shp ekm.tif
>
> gdal_rasterize -A DIST -ts 100 100 -l ernakulam ernakulam.shp ekm.tif
>
> gdal_rasterize -A AREA -ts 100 100 -l ernakulam ernakulam.shp ekm.tif
>
> but still no output
>
>
>
> ogrinfo -al -so ernakulam.shp
>
> INFO: Open of `ernakulam.shp'
>      using driver `ESRI Shapefile' successful.
>
> Layer name: ernakulam
> Geometry: Polygon
> Feature Count: 16
> Extent: (76.168263, 9.788524) - (76.840498, 10.301794)
> Layer SRS WKT:
> (unknown)
> AREA: Real (20.15)
> PERIMETER: Real (20.15)
> INDIA_: Real (11.0)
> INDIA_ID: Real (11.0)
> STATE: String (20.0)
> DIST: String (20.0)
> TALUK: String (20.0)
> CENTROID_Y: Real (20.15)
> CENTROID_X: Real (20.15)
> i selected AREA
>
> --
> Thanks && Regards
> Rashad
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110213/9f9f6a67/attachment.html


More information about the gdal-dev mailing list