Skip to main content
deleted 4 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

SOLUTION from @IanTurton: (Thank you IAN !!) I

I created a epsg.properties file with the line indicated by Ian. And added the following code:

SOLUTION: (Thank you IAN !!) I created a epsg.properties file with the line indicated by Ian. And added the following code:

SOLUTION from @IanTurton:

I created a epsg.properties file with the line indicated by Ian. And added the following code:

added solution
Source Link
Peter
  • 61
  • 4

SOLUTION: (Thank you IAN !!) I created a epsg.properties file with the line indicated by Ian. And added the following code:

   URL epsg = getClass().getClassLoader().getResource("epsg.properties"); 
          if (epsg != null) { 
           Hints hints =  
            new Hints(Hints.CRS_AUTHORITY_FACTORY, PropertyAuthorityFactory.class); 
           ReferencingFactoryContainer referencingFactoryContainer =  
            ReferencingFactoryContainer.instance(hints); 
           PropertyAuthorityFactory factory; 
            factory = new PropertyAuthorityFactory( 
                            referencingFactoryContainer, 
                            Citations.fromName("EPSG"), 
                            epsg); 
            ReferencingFactoryFinder.addAuthorityFactory(factory); 
            ReferencingFactoryFinder.scanForPlugins();
} 
          else throw new IOException("properties not found");

SOLUTION: (Thank you IAN !!) I created a epsg.properties file with the line indicated by Ian. And added the following code:

   URL epsg = getClass().getClassLoader().getResource("epsg.properties"); 
          if (epsg != null) { 
           Hints hints =  
            new Hints(Hints.CRS_AUTHORITY_FACTORY, PropertyAuthorityFactory.class); 
           ReferencingFactoryContainer referencingFactoryContainer =  
            ReferencingFactoryContainer.instance(hints); 
           PropertyAuthorityFactory factory; 
            factory = new PropertyAuthorityFactory( 
                            referencingFactoryContainer, 
                            Citations.fromName("EPSG"), 
                            epsg); 
            ReferencingFactoryFinder.addAuthorityFactory(factory); 
            ReferencingFactoryFinder.scanForPlugins();
} 
          else throw new IOException("properties not found");
formatting
Source Link
Ian Turton
  • 83.2k
  • 6
  • 89
  • 189

GridCoverage2D image = new GeoTiffReader(f);

GridCoverage2D image  = new GeoTiffReader(f);

Error message: GeoTiffMetadata2CRSAdapter::createCoordinateSystem:Only Geographic & Projected Systems are supported.gives

Error message: GeoTiffMetadata2CRSAdapter::createCoordinateSystem:Only
Geographic & Projected Systems are supported.

Below is the gdalinfo. Thank you ! Peter

Driver: GTiff/GeoTIFF Files: GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.ovr GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.aux.xml Size is 35497, 15236 Coordinate System is: PROJCS["World_Mollweide", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.017453292519943295]], PROJECTION["Mollweide"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], UNIT["Meter",1.0]] Origin = (-17619594.547443531453609,8751029.461868489161134) Pixel Size = (1000.000000000000000,-1000.000000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=LZW INTERLEAVE=BAND Corner Coordinates: Upper Left (-17619594.547, 8751029.462) ( 5d15'16.97"W, 83d38'22.73"N) Lower Left (-17619594.547,-6484970.538) (107d 3'58.73"E, 55d59' 2.97"S) Upper Right (17877405.453, 8751029.462) ( 15d52' 0.05"E, 83d38'22.73"N) Lower Right (17877405.453,-6484970.538) (103d21'55.35"W, 55d59' 2.97"S) Center ( 128905.453, 1133029.462) ( 1d17'47.25"E, 9d10'43.07"N)

Driver: GTiff/GeoTIFF
Files: GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif
       GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.ovr
       GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.aux.xml
Size is 35497, 15236
Coordinate System is:
PROJCS["World_Mollweide",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137.0,298.257223563]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Mollweide"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",0.0],
    UNIT["Meter",1.0]]
Origin = (-17619594.547443531453609,8751029.461868489161134)
Pixel Size = (1000.000000000000000,-1000.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-17619594.547, 8751029.462) (  5d15'16.97"W, 83d38'22.73"N)
Lower Left  (-17619594.547,-6484970.538) (107d 3'58.73"E, 55d59' 2.97"S)
Upper Right (17877405.453, 8751029.462) ( 15d52' 0.05"E, 83d38'22.73"N)
Lower Right (17877405.453,-6484970.538) (103d21'55.35"W, 55d59' 2.97"S)
Center      (  128905.453, 1133029.462) (  1d17'47.25"E,  9d10'43.07"N)

GridCoverage2D image = new GeoTiffReader(f);

Error message: GeoTiffMetadata2CRSAdapter::createCoordinateSystem:Only Geographic & Projected Systems are supported.

Below is the gdalinfo. Thank you ! Peter

Driver: GTiff/GeoTIFF Files: GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.ovr GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.aux.xml Size is 35497, 15236 Coordinate System is: PROJCS["World_Mollweide", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.017453292519943295]], PROJECTION["Mollweide"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], UNIT["Meter",1.0]] Origin = (-17619594.547443531453609,8751029.461868489161134) Pixel Size = (1000.000000000000000,-1000.000000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=LZW INTERLEAVE=BAND Corner Coordinates: Upper Left (-17619594.547, 8751029.462) ( 5d15'16.97"W, 83d38'22.73"N) Lower Left (-17619594.547,-6484970.538) (107d 3'58.73"E, 55d59' 2.97"S) Upper Right (17877405.453, 8751029.462) ( 15d52' 0.05"E, 83d38'22.73"N) Lower Right (17877405.453,-6484970.538) (103d21'55.35"W, 55d59' 2.97"S) Center ( 128905.453, 1133029.462) ( 1d17'47.25"E, 9d10'43.07"N)

GridCoverage2D image  = new GeoTiffReader(f);

gives

Error message: GeoTiffMetadata2CRSAdapter::createCoordinateSystem:Only
Geographic & Projected Systems are supported.

Below is the gdalinfo.

Driver: GTiff/GeoTIFF
Files: GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif
       GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.ovr
       GHS_POP_GPW42015_GLOBE_R2015A_54009_1k_v1_0.tif.aux.xml
Size is 35497, 15236
Coordinate System is:
PROJCS["World_Mollweide",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137.0,298.257223563]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Mollweide"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",0.0],
    UNIT["Meter",1.0]]
Origin = (-17619594.547443531453609,8751029.461868489161134)
Pixel Size = (1000.000000000000000,-1000.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-17619594.547, 8751029.462) (  5d15'16.97"W, 83d38'22.73"N)
Lower Left  (-17619594.547,-6484970.538) (107d 3'58.73"E, 55d59' 2.97"S)
Upper Right (17877405.453, 8751029.462) ( 15d52' 0.05"E, 83d38'22.73"N)
Lower Right (17877405.453,-6484970.538) (103d21'55.35"W, 55d59' 2.97"S)
Center      (  128905.453, 1133029.462) (  1d17'47.25"E,  9d10'43.07"N)
Source Link
Peter
  • 61
  • 4
Loading