Hi, I'm new to gdal, so I could be very wrong about this.
When I tried to follow the example in http://trac.osgeo.org/gdal/wiki/FAQRaster#HowcanIcreateablankrasterbasedonavectorfilesextentsforusewithgdal_rasterize to generate a blank geotiff based on a shapefile, I got incorrect results. Here's what I had to change to generate the correct geotiff. Instead of: raster_transform = [src_extent[0], px, 0.0, src_extent[3], 0.0, -px] I used: x_scale = (src_extent[1] - src_extent[0]) / tiff_width y_scale = (src_extent[3] - src_extent[2]) / tiff_height raster_transform = [src_extent[0], x_scale, 0.0, src_extent[3], 0.0, -y_scale] I'm not using the px variable at all. Should the answer be changed, or am I misunderstanding something? Thanks, Simon _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
