source:
issm/trunk-jpl/src/m/coordsystems/epsg2proj.m@
25034
Last change on this file since 25034 was 25034, checked in by , 5 years ago | |
---|---|
File size: 411 bytes |
Line | |
---|---|
1 | function string = epsg2proj(epsg) |
2 | %use gdalsrsinfo to provide Proj.4 compatible string from EPSG code |
3 | % |
4 | % Usage: |
5 | % proj4string = epsg2proj(4326); |
6 | % |
7 | % Example: |
8 | % proj4string = epsg2proj(4326); |
9 | % return proj4string='+proj=longlat +datum=wgs84 +no_defs ' |
10 | % |
11 | |
12 | [s,r]=system(['gdalsrsinfo epsg:' num2str(epsg) ' | grep PROJ.4 | sed "s/PROJ.4 : //"']); |
13 | |
14 | if s~=0, |
15 | error(r); |
16 | end |
17 | string=(r); |
Note:
See TracBrowser
for help on using the repository browser.