Learning my way through the GIS world, i was able to create a nice script to handle some geotiffed nitf files. Could create png, thumbnails and even kmls from these files with GDAL.
Then I have another file type: .cos, and I can get imagery and thumbnails but cannot use gdal2tiles.py to build kmls from these. That gives me an error (which my n00bness to gis stuff means little to me yet):
gdal2tiles.py -g geodetic -k IMAGE_XDetc.cos Usage: gdal2tiles.py [options] input_file(s) [output] gdal2tiles.py: error: There is no georeference - neither affine transformation (worldfile) nor GCPs. You can generate only 'raster' profile tiles. Either gdal2tiles with parameter -p 'raster' or use another GIS software for georeference e.g. gdal_transform -gcp / -a_ullr / -a_srs
So it looks like there is no georference in the file, is it impossible to create tiles/kml or a shapefile (just a rectangle of where this would be on a globe) from these kinds of files?
I did a gdalnfo on this cos file type and got
python gdalnfo.py IMAGE_XDetc.cos Driver: COSAR/COSAR Annotated Binary Matrix (TerraSAR-X) Files: IMAGE_XDetc.cos Size is 6048, 5993 Coordinate System is `' Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 5993.0) Upper Right ( 6048.0, 0.0) Lower Right ( 6048.0, 5993.0) Center ( 3024.0, 2996.5) Band 1 Block=6048x1 Type=CInt16, ColorInterp=Undefined Traceback (most recent call last): File "gdalnfo.py", line 613, in <module> sys.exit(main(sys.argv)) File "gdalnfo.py", line 512, in main ( hBand.GetOffset(), hBand.GetScale())) TypeError: float argument required, not NoneType
I am not sure what I am missing or how to process this file. I know the UpperLeft and LowerLeft are coordinates I could use but as I posted in this help question :
I need other things besides that LowerLeft corner etc number to properly process this geo file into a kml for google earth or something.
EDIT: Did find a GEOREF.xml file with some pieces of the snippet here:
There are a ton of these entries:
<gridPoint iaz="12" irg="22"> <t>7.75109087050168455E-01</t> <tau>3.13007399728248718E-05</tau> <lat>3.13670474258092860E+01</lat> <lon>-1.10901922952670986E+02</lon> <row>6434</row> <col>5160</col> <inc>2.69587903322477729E+01</inc> <elev>-9.00217208666371427E+00</elev> <height>1.17917304198257625E+03</height> </gridPoint>
There is like 312 or so of those entries above, and before that has a bunch of information on like signalPropegationEffects, rangeDelay, azimuthShift, platformParameterProcessing...which I am guessing this is all very specific data to the sensor that colleceted the information. No idea if or what is needed to generate some nice KML for this to plot onto a virtual earth??b (more gdal commands?) This script I have running is in python and works pretty well... and I can call through os commands from python gdal2tiles. If there is a command line solution, then cool!, if there is one i can programmatically use that might be better.