2017-10-30 24 views
1

특정 투영에 문제가 있습니다. 그것은 proj4 (http://proj4.org/usage/operations/projections/bipc.html) 내에서 지원하지만 GDAL 내에서 사용할 때 존재 나던 그 것처럼 것 같다 :GDAL은 양극 원추형 서반구 투영을 인식하지 않습니다.

gdalsrsinfo :

gdalsrsinfo -o proj4 "+proj=bipc +ns" 

수익률

failed to load SRS definition 

gdalwarp :

gdalwarp -overwrite -s_srs EPSG:4326 -t_srs "+proj=bipc +ns" -of GTiff in.tiff out.tiff 

수율

ERROR 1: Translating source or target SRS failed: +proj=bipc +ns 

또한 proj -lp을 실행하면 bipc : Bipolar conic of western hemisphere이 표시됩니다.

이 명령은 일반적인 (재) 예상과 함께 잘 작동하며, GDAL 1.11.5 및 2.2.2에서이 방법을 시도했습니다.

이 프로젝션이 작동하지 않는 이유는 무엇입니까?/어떻게 인식합니까?

답변

3

GDAL이 일부 예상을 지원하지 않습니다. 당신은 파이썬이 목록을 만들 수 있습니다

#!/usr/bin/env python 
from osgeo import osr 
from subprocess import Popen, PIPE 

osr.UseExceptions() 

# Get the list of PROJ.4 projections 
proj = {} 
p = Popen(['proj', '-lp'], stdout=PIPE) 
for line in p.communicate()[0].split('\n'): 
    if ':' in line: 
     a, b = line.split(':') 
     proj[a.strip()] = b.strip() 

# Brute force method of testing GDAL's OSR module 
supported = set() 
not_supported = set() 
for k in proj.keys(): 
    sr = osr.SpatialReference() 
    try: 
     _ = sr.ImportFromProj4('+proj=' + k) 
     supported.add(k) 
    except RuntimeError as e: 
     not_supported.add(k) 

print('{0} total projections, {1} supported, {2} not supported' 
     .format(len(proj), len(supported), len(not_supported))) 
print('Supported: ' + ', '.join(sorted(supported))) 
print('Not supported: ' + ', '.join(sorted(not_supported))) 

134 총 예측을, 47 87

지원되지 지원

지원 : AEA, aeqd, 봉, 카스, CEA, eck1, eck2, eck3, eck4 , eck5, eck6, eqc, eqdc, etmerc, gall, geos, gnom, goode, gstmerc, igh, krovak, laea, lcc, merc, 밀, 몰타, nzmg, omerc, 오르쏘, 폴리, qsc, 로빈, sinu, somerc , stere, 스테 레아, tmerc, tpeqd, UTM, vandg, wag1, wag2, wag3, wag4, wag5, wag6, wag7

지원되지 않음 : 공기, aitoff, alsk, 꿀벌, 8 월, 베이컨, BIPC, 보그스, calcofi , cc, chamb, collg, crast, denoy, 오일러, fahey, fouc, fouc _s, gins8, gn_sinu, gs48, gs50, hammer, hatano, healpix, imw_p, isea, kav5, kav7, labrd, lagrng, larr, lask, latlon, lcca, leac, lee_os, lonlat, loxim, lsat, mbt_fps, mbt_s, nicol, nsper, ob_tran, ocea, oea, ortel, pconic, putp1, putp2, putp3, putp3p, putp4p, putp5, putp5p, putp6, mtpp, mbtfpq, mbtfps, mil_os, murd1, murd2, murd3, 우울, 우울, 우울, 우울, 우울, 우박, 우박, 우박, 우박, 우박, 우박, 우박, 우박, 우박, 우박, 우박, 우물, 우물, 우물)

+0

대단히 감사합니다. 당신은 GDAL이 지원하는 것을 나열하는 네이티브 함수를 가지고 있다고 생각할 것입니다. (편집 : 즉, 명령 행 도구에서) –

+0

@BrianJacobs 좋은 질문입니다. GDAL에서 지원되는 예측에 액세스 할 수있는 기본 기능이있을 수 있습니다. 이것을위한 눈. –