Hi,<div><br></div><div>Sorry for not thinking well enough through this before asking stupid questions.</div><div>I fixed this by simply: UPDATE precip SET lon = lon -360 WHER lon > 180;</div><div><br></div><div>This shifted the coordinates > 180 to the western hemisphere.<br>
<br><div class="gmail_quote">2011/11/22 Andreas Forų Tollefsen <span dir="ltr"><<a href="mailto:andreasft@gmail.com">andreasft@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all. <div>This might be more of a mathematical problem, but this have to do with spatial data in my PostGIS database.</div><div><br></div><div>I have imported NetCDF raster data values as lat, long coordinates into a table. Now i need to shift the location of the coordinates.</div>
<div>The problem is that the NetCDF raster stores its coordinates from 0 to 360. 0 is Greenwich, while 180 is 180 and 360 is again Greenwich. (see image for detail).</div><div><br></div><div>What i want is to have the coordinates shifted. So that it starts at -180 for the coordinates east of the date line and centers on the prime meridian and ends at 180.</div>
<div><br></div><div>I guess i could do this by shifting the longitude coordinates using sin(lon), but the result is not correct. I guess the sin(lon) returns radians, so i tried with degrees(sin(lon)) but the result was not correct.</div>
<div><br></div><div>Any ideas on how i can transform/shift these coordinates into a more "normal" representation?</div><div><br></div><div>Thanks,</div><div><br></div><font color="#888888"><div>Andreas</div>
</font></blockquote></div><br></div>