2013-03-15 3 views
2

AbstractGridCoverage2DReader에서 객체를 가져올 때 문제가 있습니다. CoordinateReferenceSystem과 적용 범위가 필요합니다.geotools reader

File file = new File("Resource/new.tif"); 

AbstractGridFormat format = GridFormatFinder.findFormat(file); 
System.out.println("here we have format: "+format); 

AbstractGridCoverage2DReader reader = format.getReader(file); 
System.out.println("here we have reader: "+reader); 

형식 괜찮습니다 "[email protected]". 그러나 독자는 항상 NULL입니다.

아이디어가 있으십니까?

+0

tiff 또는 geotiff입니까? 파일에 –

+0

이 있습니다. – porterjr

+0

System.out.println ("desc :"+ format.getDescription()); 내게 준 : 지형 정보가 포함 된 태그가있는 이미지 파일 형식 – porterjr

답변

0

그래, 내가 그것을 해결, pom.xml 파일을 변경 (나는 메이븐 기반 프로젝트가).

(1) org.geotools GT-EPSG-HSQL $ {} geotools.version

(2) : org.geotools GT-EPSG-HSQL 2.7 M2

(2)에서 (1)이 (가) 변경되었으며 정상적으로 작동합니다. :).

+0

수정하지 않아야하는 geotools 버전 2.7-M2를 사용하지 않는 한 가장 일반적인 이유는 아마도 maven이 제대로 업데이트되지 않는 것일 수 있습니다. –