Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am working on a Java swings based GIS application to project my tiff image as maps . But each time I run my application I get Illegal argument: "semiMajorAxis=�" . The tiff images I have are working fine with QuantumGIS. Below is the complete exception log

WARNING: Illegal argument: "semiMajorAxis=�".
org.geotools.data.DataSourceException: Illegal argument: "semiMajorAxis=�".
    at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:220)
    at org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat.java:269)
    at org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat.java:236)
    at org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat.java:78)
    at org.geotools.tutorial.quickstart.ImageLab.displayLayers(ImageLab.java:94)
    at org.geotools.tutorial.quickstart.ImageLab.getLayersAndDisplay(ImageLab.java:82)
    at org.geotools.tutorial.quickstart.ImageLab.main(ImageLab.java:59)
Caused by: org.geotools.data.DataSourceException: Illegal argument: "semiMajorAxis=�".
    at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:343)
    at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:207)
    ... 6 more

Below is the code.It works fine with bluemarble.tif image:

AbstractGridFormat format = GridFormatFinder.findFormat( rasterFile );        
reader = format.getReader(rasterFile); //exception is thrown here

Below is the gdalinfo of the tiff image:

Driver: GTiff/GeoTIFF
Files: 46N10copy.TIF
Size is 4186, 4186
Coordinate System is:
GEOGCS["Geographic (Longitude, Latitude); user-defined (non-standard); user-defined (non-standard)",
    DATUM["unknown",
        SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (75.500000000000000,22.750000000000000)
Pixel Size = (0.000059722885810,-0.000059722885807)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_MAXSAMPLEVALUE=255
  TIFFTAG_MINSAMPLEVALUE=0
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=200
  TIFFTAG_YRESOLUTION=200
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  75.5000000,  22.7500000) ( 75d30' 0.00"E, 22d45' 0.00"N)
Lower Left  (  75.5000000,  22.5000000) ( 75d30' 0.00"E, 22d30' 0.00"N)
Upper Right (  75.7500000,  22.7500000) ( 75d45' 0.00"E, 22d45' 0.00"N)
Lower Right (  75.7500000,  22.5000000) ( 75d45' 0.00"E, 22d30' 0.00"N)
Center      (  75.6250000,  22.6250000) ( 75d37'30.00"E, 22d37'30.00"N)
Band 1 Block=4186x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 255,255,255,255
    1: 132,115,115,255
    2: 189,165,165,255
    3: 57,41,41,255
    4: 181,90,90,255
    5: 115,49,49,255
    6: 255,198,189,255
    7: 239,222,214,255
    8: 173,156,148,255
    9: 99,82,74,255
   10: 74,57,49,255
   11: 189,173,165,255
   12: 156,140,132,255
   13: 90,74,66,255
   14: 247,231,222,255
   15: 181,165,156,255
   16: 148,132,123,255
   17: 49,33,24,255
   18: 173,148,132,255
   19: 239,222,206,255
   20: 206,189,173,255
   21: 132,115,99,255
   22: 214,206,198,255
   23: 156,148,140,255
   24: 115,107,99,255
   25: 222,206,189,255
   26: 148,132,115,255
   27: 123,107,90,255
   28: 140,115,90,255
   29: 140,132,123,255
   30: 74,66,57,255
   31: 231,222,206,255
   32: 132,123,107,255
   33: 222,214,198,255
   34: 239,231,214,255
   35: 181,173,156,255
   36: 107,99,82,255
   37: 181,173,148,255
   38: 74,66,41,255
   39: 107,107,99,255
   40: 173,173,148,255
   41: 173,173,140,255
   42: 165,173,123,255
   43: 165,173,148,255
   44: 123,140,132,255
   45: 123,181,181,255
   46: 140,198,206,255
   47: 140,181,189,255
   48: 198,189,206,255
   49: 90,66,107,255
   50: 132,107,140,255
   51: 107,82,115,255
   52: 189,156,181,255
   53: 206,189,198,255
   54: 239,90,115,255
   55: 206,90,107,255
   56: 239,57,82,255
   57: 198,115,123,255
   58: 239,82,99,255
   59: 206,66,82,255
   60: 255,156,165,255
   61: 247,123,132,255
   62: 189,49,57,255
   63: 0,0,0,255
   64: 0,0,0,255
   65: 0,0,0,255
   66: 0,0,0,255
   67: 0,0,0,255
   68: 0,0,0,255
   69: 0,0,0,255
   70: 0,0,0,255
   71: 0,0,0,255
   72: 0,0,0,255
   73: 0,0,0,255
   74: 0,0,0,255
   75: 0,0,0,255
   76: 0,0,0,255
   77: 0,0,0,255
   78: 0,0,0,255
   79: 0,0,0,255
   80: 0,0,0,255
   81: 0,0,0,255
   82: 0,0,0,255
   83: 0,0,0,255
   84: 0,0,0,255
   85: 0,0,0,255
   86: 0,0,0,255
   87: 0,0,0,255
   88: 0,0,0,255
   89: 0,0,0,255
   90: 0,0,0,255
   91: 0,0,0,255
   92: 0,0,0,255
   93: 0,0,0,255
   94: 0,0,0,255
   95: 0,0,0,255
   96: 0,0,0,255
   97: 0,0,0,255
   98: 0,0,0,255
   99: 0,0,0,255
  100: 0,0,0,255
  101: 0,0,0,255
  102: 0,0,0,255
  103: 0,0,0,255
  104: 0,0,0,255
  105: 0,0,0,255
  106: 0,0,0,255
  107: 0,0,0,255
  108: 0,0,0,255
  109: 0,0,0,255
  110: 0,0,0,255
  111: 0,0,0,255
  112: 0,0,0,255
  113: 0,0,0,255
  114: 0,0,0,255
  115: 0,0,0,255
  116: 0,0,0,255
  117: 0,0,0,255
  118: 0,0,0,255
  119: 0,0,0,255
  120: 0,0,0,255
  121: 0,0,0,255
  122: 0,0,0,255
  123: 0,0,0,255
  124: 0,0,0,255
  125: 0,0,0,255
  126: 0,0,0,255
  127: 0,0,0,255
  128: 0,0,0,255
  129: 0,0,0,255
  130: 0,0,0,255
  131: 0,0,0,255
  132: 0,0,0,255
  133: 0,0,0,255
  134: 0,0,0,255
  135: 0,0,0,255
  136: 0,0,0,255
  137: 0,0,0,255
  138: 0,0,0,255
  139: 0,0,0,255
  140: 0,0,0,255
  141: 0,0,0,255
  142: 0,0,0,255
  143: 0,0,0,255
  144: 0,0,0,255
  145: 0,0,0,255
  146: 0,0,0,255
  147: 0,0,0,255
  148: 0,0,0,255
  149: 0,0,0,255
  150: 0,0,0,255
  151: 0,0,0,255
  152: 0,0,0,255
  153: 0,0,0,255
  154: 0,0,0,255
  155: 0,0,0,255
  156: 0,0,0,255
  157: 0,0,0,255
  158: 0,0,0,255
  159: 0,0,0,255
  160: 0,0,0,255
  161: 0,0,0,255
  162: 0,0,0,255
  163: 0,0,0,255
  164: 0,0,0,255
  165: 0,0,0,255
  166: 0,0,0,255
  167: 0,0,0,255
  168: 0,0,0,255
  169: 0,0,0,255
  170: 0,0,0,255
  171: 0,0,0,255
  172: 0,0,0,255
  173: 0,0,0,255
  174: 0,0,0,255
  175: 0,0,0,255
  176: 0,0,0,255
  177: 0,0,0,255
  178: 0,0,0,255
  179: 0,0,0,255
  180: 0,0,0,255
  181: 0,0,0,255
  182: 0,0,0,255
  183: 0,0,0,255
  184: 0,0,0,255
  185: 0,0,0,255
  186: 0,0,0,255
  187: 0,0,0,255
  188: 0,0,0,255
  189: 0,0,0,255
  190: 0,0,0,255
  191: 0,0,0,255
  192: 0,0,0,255
  193: 0,0,0,255
  194: 0,0,0,255
  195: 0,0,0,255
  196: 0,0,0,255
  197: 0,0,0,255
  198: 0,0,0,255
  199: 0,0,0,255
  200: 0,0,0,255
  201: 0,0,0,255
  202: 0,0,0,255
  203: 0,0,0,255
  204: 0,0,0,255
  205: 0,0,0,255
  206: 0,0,0,255
  207: 0,0,0,255
  208: 0,0,0,255
  209: 0,0,0,255
  210: 0,0,0,255
  211: 0,0,0,255
  212: 0,0,0,255
  213: 0,0,0,255
  214: 0,0,0,255
  215: 0,0,0,255
  216: 0,0,0,255
  217: 0,0,0,255
  218: 0,0,0,255
  219: 0,0,0,255
  220: 0,0,0,255
  221: 0,0,0,255
  222: 0,0,0,255
  223: 0,0,0,255
  224: 0,0,0,255
  225: 0,0,0,255
  226: 0,0,0,255
  227: 0,0,0,255
  228: 0,0,0,255
  229: 0,0,0,255
  230: 0,0,0,255
  231: 0,0,0,255
  232: 0,0,0,255
  233: 0,0,0,255
  234: 0,0,0,255
  235: 0,0,0,255
  236: 0,0,0,255
  237: 0,0,0,255
  238: 0,0,0,255
  239: 0,0,0,255
  240: 0,0,0,255
  241: 0,0,0,255
  242: 0,0,0,255
  243: 0,0,0,255
  244: 0,0,0,255
  245: 0,0,0,255
  246: 0,0,0,255
  247: 0,0,0,255
  248: 0,0,0,255
  249: 0,0,0,255
  250: 0,0,0,255
  251: 0,0,0,255
  252: 0,0,0,255
  253: 0,0,0,255
  254: 0,0,0,255
  255: 0,0,0,255

All suggestions & solutions are welcome.

share|improve this question
    
Can you add some information about your tiff? maybe the gdalinfo? also the code you are using to open it –  iant Mar 3 '13 at 13:06
    
@iant added gdalinfo & code –  100rabh Mar 3 '13 at 13:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.