Maybe you also need to add -a_srs EPSG:4326 to your command line to specify that the georeferenced coordinates are longitude/latitude WGS84 (provided that's the case !)
Le Thursday 19 March 2009 23:01:59 mohwawang, vous avez écrit : > Even, > > It is getting better: with -co ICORDS=G gdal_translate ran through without > error message. But, the output image does not have the correct coordinates > (nearly zero for lat/lon for all the pixels when displayed by openEV_FW). I > tried -co ICORDS=N instead and still got the same wrong coordinates. > > I feel some how the info in the jpgw (its content is at the bottom of the > email) should be input as parameters for running gdal_translate. But I > don't know how. I know that I need both ast_geo.jpg and ast_geo.jpgw to run > openEV_FW. Without the jpgw file the Reproject of openEV_FW will fail. > > Thanks. > > Mo > > --- On Thu, 3/19/09, Even Rouault <even.roua...@mines-paris.org> wrote: > > From: Even Rouault <even.roua...@mines-paris.org> > > Subject: Re: [gdal-dev] Is there any gdal\apps executable that is > > equivalent to Reproject of openEV_FW To: gdal-dev@lists.osgeo.org, > > mohwaw...@yahoo.com > > Date: Thursday, March 19, 2009, 4:27 PM > > > > -----Inline Attachment Follows----- > > > > Mo, > > > > here's the documentation of the NITF driver : > > http://gdal.org/frmt_nitf.html > > > > You probably need to define the ICORDS=G creation option : > > > > gdal_translate -of NITF ast_geo.jpg new.ntf -co ICORDS=G > > > > Best regards, > > > > Even > > > > Le Thursday 19 March 2009 21:15:12 mohwaw...@yahoo.com, > > > > vous avez écrit : > > > Hi all, > > > > > > I have successfully used the Reproject of openEV_FW > > > > (FWTools 2.2.8) to > > reproject an AST_L1B geo jpg file (ast_geo.jpg with an > > ast_geo.jpgw file) to > > a NITF file. I wonder if there is any gdal-1.6\apps > > executable that is > > equivalent to Reproject of Tools of openEV_FW? I tried > > gdal_translate.exe but > > > > failed as: > > > > gdal_translate -of nitf ast_geo.jpg new.ntf > > > > > > Input flle size is 5896, 4714 > > > 0...10...20...30...40...50...60...70...80...90...100 - > > > > done > > > > > ERROR 6: Apparently no space reserved for IGEOLO info > > > > in NITF file. > > > > > NITFWriteIGEOGLO() fails. > > > > > > I guess the key is to use the info in the jpgw file as > > > > parameters in the > > > > > equivalent executable if exists. What? How? Below are > > > > the info of the jpg > > > > > file and the content of the jpgw file. > > > > > > > gdalinfo ast_geo.jpg > > > > > > Driver: JPEG/JPEG JFIF > > > Files: ast_geo.jpg > > > Size is 5896, 4714 > > > Coordinate System is `' > > > Origin = (-113.281421452980040,33.477365682899951) > > > Pixel Size = (0.000153055144450,-0.000142760639120) > > > Image Structure Metadata: > > > SOURCE_COLOR_SPACE=YCbCr > > > INTERLEAVE=PIXEL > > > COMPRESSION=JPEG > > > Corner Coordinates: > > > Upper Left (-113.2814215, 33.4773657) > > > Lower Left (-113.2814215, 32.8043920) > > > Upper Right (-112.3790083, 33.4773657) > > > Lower Right (-112.3790083, 32.8043920) > > > Center (-112.8302149, 33.1408789) > > > Band 1 Block=5896x1 Type=Byte, ColorInterp=Red > > > Image Structure Metadata: > > > COMPRESSION=JPEG > > > Band 2 Block=5896x1 Type=Byte, ColorInterp=Green > > > Image Structure Metadata: > > > COMPRESSION=JPEG > > > Band 3 Block=5896x1 Type=Byte, ColorInterp=Blue > > > Image Structure Metadata: > > > COMPRESSION=JPEG > > > > > > > type ast_geo.jpgw > > > > > > 0.00015305514445 > > > 0.00000000000000 > > > 0.00000000000000 > > > -0.00014276063912 > > > -113.28134492540782 > > > 33.47729430258039 > > > Tiff File > > > > AST_L1B_00309192003182059_10032003135534_VNIR_geo.tif/n > > Image > > > > > width = 5896 height = 4714 bands = 3/n Image_UL = > > > > 33.465445 -113.085740 > > > > > Image_UR = 33.371366 -112.428675/n Image_LL = > > > > 32.910820 -113.234051 > > > > > Image_LR = 32.817455 -112.581118/n Image_UL_Loc = > > > > 1278 83 > > > > > Image_UR_Loc = 5571 742 Image_LL_Loc > > > > = 309 3968 > > > > > Image_LR_Loc = 4575 4622 > > > > > > Thanks. > > > > > > Best Regards, > > > > > > Mo Wang > > > > > > > > > > > > > > > _______________________________________________ > > > gdal-dev mailing list > > > gdal-dev@lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev