title: How to rasterize simple geometry from GeoJSON file using GDAL?
body: <p>I am trying to rasterize simple Point &amp; Line geometry using Python GDAL and I am not able perform it. e.g. I have 3 points as follows in Lat-Lon format in the json file.</p>
  
  <p>[ 2.19326073965, 49.049766213940003 ], [ 2.19289443625, 49.049622431300001 ], [ 2.19271641965, 49.049547116589999 ]</p>
  
  <p>What are the steps to create a tif file after rasterizing this GeoJSON file? I found various articles but could not understand and tried the following code but generated tif file is black.</p>
  
  <pre><code>pixel_size = 1.0
  NoData_value = 100
  # Filename of input OGR file
  vector_fn = 'point_out.geojson'
  
  # Filename of the raster Tiff that will be created
  raster_fn = 'test.tif'
  
  # Open the data source and read in the extent
  source_ds = ogr.Open(vector_fn)
  source_layer = source_ds.GetLayer()
  x_min, x_max, y_min, y_max = source_layer.GetExtent()
  
  print x_min, x_max, y_min, y_max
  # Create the destination data source
  x_res = int((x_max - x_min) / pixel_size)
  y_res = int((y_max - y_min) / pixel_size)
  print x_res, y_res
  target_ds = gdal.GetDriverByName('GTiff').Create(raster_fn, 1300, 1300, 1, gdal.GDT_Byte)
  target_ds.SetGeoTransform([1, pixel_size, 0, 1, 0, -pixel_size])
  band = target_ds.GetRasterBand(1)
  band.SetNoDataValue(NoData_value)
  
  # Rasterize
  gdal.RasterizeLayer(target_ds, [1], source_layer, burn_values=[128])
  </code></pre>