<p>Frank,</p>
<p>Thank you for response.<br>if I use your suggestion, for example pixel (1000,1000);</p>
<p>longitude = -25 + 0.560648 * 1000 = 5581.48<br>latitude = 75 - 0.560648 * 1000 = -5531.48</p>
<p>So, it is not possible.</p>
<p>I do not have problem converting projected space to geographic space using <br>proj lib. My problem is how can calculate the distance from the corner using <br>below parameters than I can convert those to lat/lon.</p>
<p>Best Regards,<br>Aydin<br></p><br><br>
<div><span class="gmail_quote">2008/5/7, Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span class="q">Aydin wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px; BORDER-LEFT: #ccc 1px solid">I try to handle geographic coordinates (lat/lon) from a sattellite data in HDF5 format. You can find necessary information below.<br>
Could you please tell me how can initialize proj4 program and how can obtain lat/lon values for one pixel.<br><br>detailed info is below:<br><br>geo_number_rows = 4500<br>geo_number_columns = 3165<br>geo_pixel_size_x = 0.560648<br>
geo_pixel_size_y = -0.56215554<br>geo_row_offset = -4759.928<br>geo_column_offset = -1636.3636<br>geo_dim_pixel = KM, KM<br>geo_pixel_def = CENTRE<br>geo_product_corners = -25.0, 25.0, -25.0, 75.0, 45.0, 75.0, 45.0, 25.0<br>
geo_product_center = 9.719999, 50.47374<br><br>projection_name = EQUIDISTANT_CYLINDRICAL<br>projection_proj4_params = +proj=eqc +lat_ts = 0 +lon_0=0.000000<br></blockquote><br></span>Aydin,<br><br>PROJ.4 does not address transformation from pixel/line space to georeferenced<br>
space. Just projected space to geographic space (and back). The info above<br>does not indicate an ellipsoid, but we might assume WGS84 as a guess.<br>If the corners are in long/lat ordering we can assume the top left corner<br>
is 25W, 75N. This can be converted to equidistant cylindrical coordinates<br>like this:<br><br>proj +proj=eqc +lat_ts=0 +lon_0=0.000000 +ellps=WGS84<br>-25 75<br>-2782987.27 8348961.81<br><br>So, the top left corner is -2782987.27mE, 8348961.81mN.<br>
<br>Actually, treating this as a projection issue is rather silly since<br>the projection is eqc which is just a scaling of geographic space.<br>And since all the locations and pixel sizes are expressed in decimal<br>degrees you might as well just ignore that aspect, and treat this as<br>
a WGS84 image with the given corners.<br><br>So, if the top left corner is -25,75 and the pixel size is<br>0.560648, 0.56215554 you could compute pixel (20in from left,15 down<br>from top) as:<br><br>longitude = -25 + 0.560548 * 20<br>
latitude = 75 - 0.560648 * 15<br><br>etc<br><br>Best regards,<br><span class="sg">-- <br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush | President OSGeo, <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://osgeo.org/" target="_blank">http://osgeo.org</a></span>
<div><span class="e" id="q_119c43196e2f32f6_3"><br><br>_______________________________________________<br>Proj mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Proj@lists.maptools.org" target="_blank">Proj@lists.maptools.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.maptools.org/mailman/listinfo/proj" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a><br></span></div></blockquote></div><br>