[Proj] To handle geographic info from HDF5 formated Satellite Data

Frank Warmerdam warmerdam at pobox.com
Wed May 7 09:00:16 PDT 2008


Aydin wrote:
> I try to handle geographic coordinates (lat/lon) from a sattellite data in 
> HDF5 format. You can find necessary information below.
> Could you please tell me how can initialize proj4 program and how can obtain 
> lat/lon values for one pixel.
> 
> detailed info is below:
> 
> geo_number_rows = 4500
> geo_number_columns = 3165
> geo_pixel_size_x = 0.560648
> geo_pixel_size_y = -0.56215554
> geo_row_offset = -4759.928
> geo_column_offset = -1636.3636
> geo_dim_pixel = KM, KM
> geo_pixel_def = CENTRE
> geo_product_corners = -25.0, 25.0, -25.0, 75.0, 45.0, 75.0, 45.0, 25.0
> geo_product_center = 9.719999, 50.47374
> 
> projection_name = EQUIDISTANT_CYLINDRICAL
> projection_proj4_params = +proj=eqc +lat_ts = 0 +lon_0=0.000000

Aydin,

PROJ.4 does not address transformation from pixel/line space to georeferenced
space.  Just projected space to geographic space (and back).  The info above
does not indicate an ellipsoid, but we might assume WGS84 as a guess.
If the corners are in long/lat ordering we can assume the top left corner
is 25W, 75N.  This can be converted to equidistant cylindrical coordinates
like this:

proj +proj=eqc +lat_ts=0 +lon_0=0.000000 +ellps=WGS84
-25 75
-2782987.27     8348961.81

So, the top left corner is -2782987.27mE, 8348961.81mN.

Actually, treating this as a projection issue is rather silly since
the projection is eqc which is just a scaling of geographic space.
And since all the locations and pixel sizes are expressed in decimal
degrees you might as well just ignore that aspect, and treat this as
a WGS84 image with the given corners.

So, if the top left corner is -25,75 and the pixel size is
0.560648, 0.56215554 you could compute pixel (20in from left,15 down
from top) as:

longitude = -25 + 0.560548 * 20
latitude = 75 - 0.560648 * 15

etc

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Proj mailing list