The datum change isn&#39;t sufficient, as they are using different coordinate systems.&nbsp; They actually have to have the same SRS, otherwise gdal_rasterize will see 2 very different ranges of coordinates (meter vs latlong).&nbsp; <br>
<br>PROJCS[&quot;OSGB 1936 / British National Grid&quot;,<br>&nbsp;&nbsp;&nbsp; GEOGCS[&quot;OSGB 1936&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DATUM[&quot;OSGB_1936&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPHEROID[&quot;Airy 1830&quot;,6377563.396,299.3249646,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;7001&quot;]],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;6277&quot;]],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PRIMEM[&quot;Greenwich&quot;,0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UNIT[&quot;degree&quot;,0.01745329251994328,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;4277&quot;]],<br>&nbsp;&nbsp;&nbsp; UNIT[&quot;metre&quot;,1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],<br>&nbsp;&nbsp;&nbsp; PROJECTION[&quot;Transverse_Mercator&quot;],<br>
&nbsp;&nbsp;&nbsp; PARAMETER[&quot;latitude_of_origin&quot;,49],<br>&nbsp;&nbsp;&nbsp; PARAMETER[&quot;central_meridian&quot;,-2],<br>&nbsp;&nbsp;&nbsp; PARAMETER[&quot;scale_factor&quot;,0.9996012717],<br>&nbsp;&nbsp;&nbsp; PARAMETER[&quot;false_easting&quot;,400000],<br>&nbsp;&nbsp;&nbsp; PARAMETER[&quot;false_northing&quot;,-100000],<br>
&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;27700&quot;]]<br><br>vs.<br><br>GEOGCS[&quot;WGS 84&quot;,<br>&nbsp;&nbsp;&nbsp; DATUM[&quot;WGS_1984&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],<br>&nbsp;&nbsp;&nbsp; PRIMEM[&quot;Greenwich&quot;,0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],<br>&nbsp;&nbsp;&nbsp; UNIT[&quot;degree&quot;,0.01745329251994328,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],<br>
&nbsp;&nbsp;&nbsp; AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]<br><br>As far as the reprojection goes, are you getting errors in the output vector or only after rasterization?&nbsp; <br><br><br><div class="gmail_quote">On Fri, Nov 14, 2008 at 3:19 PM, Andrew Brooks <span dir="ltr">&lt;<a href="mailto:arb@sat.dundee.ac.uk" target="_blank">arb@sat.dundee.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for the help everyone, I&#39;ll summarise when I get it all working ;-)<br>
<div><br>
Jamie Adams &lt;<a href="mailto:jaadfoo@gmail.com" target="_blank">jaadfoo@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Are your files in the same projection? &nbsp;I know gshhs is projected in wgs84<br>
&gt; by default, and I see your raster is in British National Grid.<br>
<br>
</div>To what extent do they need to be in the same projection? &nbsp;Isn&#39;t a change<br>
of datum sufficient?<br>
<br>
Firstly, is gdal_rasterize not capable of performing the change of SRS<br>
internally itself? &nbsp;That would save having to use ogr2ogr to write a new<br>
vector file for every image.<br>
<br>
Secondly, how closely do the vector and raster SRS need to match? &nbsp;Surely<br>
as long as both are WGS84 (for example) that should suffice? &nbsp;But when I<br>
try to rasterise a WGS84 vector onto a WGS84 Mercator raster it complains<br>
and doesn&#39;t work.<br>
<br>
Thirdly, when I &quot;reproject&quot; the vector to Mercator first and then rasterize<br>
it does work, to an extent, but it smears random extra vectors across the<br>
raster :-( &nbsp;It does this for both gshhs_land and v0_landmass so I don&#39;t<br>
think the vector itself is the problem.<br>
<font color="#888888"><br>
Andrew<br>
</font><div><div></div><div><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br>