The datum change isn't sufficient, as they are using different coordinate systems. They actually have to have the same SRS, otherwise gdal_rasterize will see 2 very different ranges of coordinates (meter vs latlong). <br>
<br>PROJCS["OSGB 1936 / British National Grid",<br> GEOGCS["OSGB 1936",<br> DATUM["OSGB_1936",<br> SPHEROID["Airy 1830",6377563.396,299.3249646,<br> AUTHORITY["EPSG","7001"]],<br>
AUTHORITY["EPSG","6277"]],<br> PRIMEM["Greenwich",0,<br> AUTHORITY["EPSG","8901"]],<br> UNIT["degree",0.01745329251994328,<br>
AUTHORITY["EPSG","9122"]],<br> AUTHORITY["EPSG","4277"]],<br> UNIT["metre",1,<br> AUTHORITY["EPSG","9001"]],<br> PROJECTION["Transverse_Mercator"],<br>
PARAMETER["latitude_of_origin",49],<br> PARAMETER["central_meridian",-2],<br> PARAMETER["scale_factor",0.9996012717],<br> PARAMETER["false_easting",400000],<br> PARAMETER["false_northing",-100000],<br>
AUTHORITY["EPSG","27700"]]<br><br>vs.<br><br>GEOGCS["WGS 84",<br> DATUM["WGS_1984",<br> SPHEROID["WGS 84",6378137,298.257223563,<br> AUTHORITY["EPSG","7030"]],<br>
AUTHORITY["EPSG","6326"]],<br> PRIMEM["Greenwich",0,<br> AUTHORITY["EPSG","8901"]],<br> UNIT["degree",0.01745329251994328,<br> AUTHORITY["EPSG","9122"]],<br>
AUTHORITY["EPSG","4326"]]<br><br>As far as the reprojection goes, are you getting errors in the output vector or only after rasterization? <br><br><br><div class="gmail_quote">On Fri, Nov 14, 2008 at 3:19 PM, Andrew Brooks <span dir="ltr"><<a href="mailto:arb@sat.dundee.ac.uk" target="_blank">arb@sat.dundee.ac.uk</a>></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'll summarise when I get it all working ;-)<br>
<div><br>
Jamie Adams <<a href="mailto:jaadfoo@gmail.com" target="_blank">jaadfoo@gmail.com</a>> wrote:<br>
><br>
> Are your files in the same projection? I know gshhs is projected in wgs84<br>
> 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? Isn't a change<br>
of datum sufficient?<br>
<br>
Firstly, is gdal_rasterize not capable of performing the change of SRS<br>
internally itself? 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? Surely<br>
as long as both are WGS84 (for example) that should suffice? But when I<br>
try to rasterise a WGS84 vector onto a WGS84 Mercator raster it complains<br>
and doesn't work.<br>
<br>
Thirdly, when I "reproject" 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 :-( It does this for both gshhs_land and v0_landmass so I don'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>