Ivan, thanks a lot...<br><br>Is there any availability for some already implemented utility to do the kind of job I need??<br><br>ie: actually create the GCPs from the long/lat dumps and write them to another file for example??<br>
<br>If anyone knows or has anything similar, it would help + speed me up a lot :)<br><br>Thanks again<br><br><br><div class="gmail_quote">On Wed, Mar 5, 2008 at 2:19 PM, Lucena, Ivan <<a href="mailto:ivan.lucena@pmldnet.com">ivan.lucena@pmldnet.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Mattia,<br>
<br>
That is simple. If your image dataset dimensions are [1200x600] and the<br>
latitude or the longitude dataset dimensions are [120x60] means that<br>
those values are related to every other 10 pixels, so you should generate:<br>
<br>
0, 0, lat[0,0], long[0,0]<br>
0, 10, lat[0,1], long[0,1]<br>
0, 20, lat[0,2], long[0,2]<br>
0, 30, lat[0,3], long[0,3]<br>
...<br>
10, 0, lat[1,0], long[1,0]<br>
10, 10, lat[1,1], long[1,1]<br>
...<br>
1199, 599, lat[119,59], long[119,59]<br>
<br>
I suggest the use of AWK to deal with the reformatting/merging the<br>
latitude and longitude text files.<br>
<br>
Best regards,<br>
<br>
Ivan<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
mattia wrote:<br>
> Hello folks,<br>
><br>
> I still need some help / advise for reprojecting my HDF raster image<br>
> datasets..<br>
> I manage to dump the "Latitude" and "Longitude" data sets of the HDF file<br>
> into ASCII format...<br>
> Now I would like to use this data to do the reprojection.. The dump I did<br>
> using HDF's hdp utility as follows:<br>
><br>
> mattia@mattia-laptop:~/Desktop/data/prove/1$ hdp dumpsds -n Latitude -d -x<br>
> -o latitude AMOD021KM20070104035343.hdf<br>
> mattia@mattia-laptop:~/Desktop/data/prove/1$ hdp dumpsds -n Longitude -d -x<br>
> -o longitude AMOD021KM20070104035343.hdf<br>
><br>
> The contents of the file is as follows (Latitude for example):<br>
><br>
> 64.731689 64.741600 64.749550 64.755737 64.760345 64.763504 64.765366<br>
> 64.766037 64.765633 64.764244 64.761963 64.758858 64.754997 64.750458<br>
> 64.745285 64.739532 64.733253 64.726479 64.719261 64.711617 64.703606<br>
> 64.695229 64.686531 64.677536 64.668266 64.658737 64.648972 64.638985<br>
> 64.628799 64.618423 64.607880 64.597176 64.586319 64.575333 64.564217<br>
> 64.552979 64.541634 64.530190 64.518654 64.507034 64.495338 64.483559<br>
> 64.471718 64.459816 64.447853 64.435837 64.423767 64.411659 64.399506<br>
> 64.387314 64.375084 64.362823 64.350525 64.338203 64.325851 64.313484<br>
> 64.301086 64.288673 64.276237 64.263779 64.251312 64.238823 64.226318<br>
> 64.213806 64.201271 64.188736 64.176178 64.163612 64.151039 64.138451<br>
> 64.125854 64.113251 64.100639 64.088013 64.075378 64.062737 64.050079<br>
> 64.037415 64.024742 64.012062 63.999371 63.986668 63.973953 63.961227<br>
> 63.948494 63.935745 63.922985 63.910213 63.897430 63.884628 63.871819<br>
> 63.858990 63.846146 63.833290 63.820412 63.807522 63.794609 63.781685<br>
> 63.768738 63.755768 63.742779 63.729767 63.716736 63.703678 63.690601<br>
> 63.677494 63.664364 63.651207 63.638020 63.624805 63.611561 63.598286<br>
> 63.584984 63.571644 63.558270 63.544861 63.531418 63.517937 63.504421<br>
> 63.490864 63.477264 63.463623 63.449940 63.436214 63.422440 63.408619<br>
> 63.394753 63.380836 63.366871 63.352848 63.338776 63.324650 63.310463<br>
> 63.296223 63.281918 63.267559 63.253132 63.238644 63.224091 63.209465<br>
> 63.194775 63.180012 63.165180 63.150269 63.135284 63.120224 63.105080<br>
> 63.089855 63.074547 63.059151 63.043671 63.028099 63.012436 62.996674<br>
> 62.980820 62.964863 62.948811 62.932648 62.916386 62.900009 62.883526<br>
> 62.866928 62.850208 62.833378 62.816418 62.799339 62.782131 62.764790<br>
> 62.747314 62.729702 62.711952 62.694057 62.676014 62.657822 62.639477<br>
> 62.620972 62.602303 62.583473 62.564472 62.545296 62.525944 62.506409<br>
> 62.486687 62.466774 62.446667 62.426357 62.405842 62.385117 62.364174<br>
><br>
> .<br>
> .<br>
> .<br>
> etc<br>
> .<br>
> .<br>
> .<br>
><br>
><br>
><br>
><br>
> Now, I need to construct GCPs from this data and I would just like to know<br>
> what would be best..<br>
><br>
> 1) writing a C utility which does the job and prepares GCPs which later I<br>
> can pass to gdal_translate from a file for example<br>
><br>
> 2) A C utility which creates the GCPs and a VRT file with these included for<br>
> the later coming reprojection<br>
><br>
> Any other ideas would be appreciated..<br>
><br>
> The problem is though how to assign the actual GCPs... I mean, every GCP<br>
> has format (x,y) > (lat,long) .. how do I know how to assign the (x,y)<br>
> part??<br>
><br>
><br>
> Regards<br>
><br>
><br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org">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>
</blockquote></div><br><br clear="all"><br>-- <br>Mattia