94 default :
return(
"UNDEFINED" );
106 default :
return(
_TL(
"Undefined Coordinate System" ) );
118 {
"km" ,
"Kilometers" ,
"Kilometer" },
119 {
"m" ,
"Meters" ,
"Meter" },
120 {
"dm" ,
"Decimeters" ,
"Decimeter" },
121 {
"cm" ,
"Centimeters",
"Centimeter" },
122 {
"mm" ,
"Millimeters",
"Millimeter" },
123 {
"kmi" ,
"Miles" ,
"International Nautical Mile" },
124 {
"in" ,
"Inches" ,
"International Inch" },
125 {
"ft" ,
"Feet" ,
"International Foot" },
126 {
"yd" ,
"Yards" ,
"International Yard" },
127 {
"mi" ,
"Miles" ,
"International Statute Mile" },
128 {
"fath" ,
"Fathoms" ,
"International Fathom" },
129 {
"ch" ,
"Chains" ,
"International Chain" },
130 {
"link" ,
"Links" ,
"International Link" },
131 {
"us-in" ,
"Inches" ,
"U.S. Surveyor's Inch" },
132 {
"us-ft" ,
"Feet" ,
"U.S. Surveyor's Foot" },
133 {
"us-yd" ,
"Yards" ,
"U.S. Surveyor's Yard" },
134 {
"us-ch" ,
"Chains" ,
"U.S. Surveyor's Chain" },
135 {
"us-mi" ,
"Miles" ,
"U.S. Surveyor's Statute Mile" },
136 {
"ind-yd",
"Yards" ,
"Indian Yard" },
137 {
"ind-ft",
"Feet" ,
"Indian Foot" },
138 {
"ind-ch",
"Chains" ,
"Indian Chain" },
203 default :
return( 1. );
217 else if( !m[
"UNIT"].Get_Content().asDouble(To_Meter) || To_Meter <= 0. )
254 return(
Assign(Projection) );
259 m_Name = Projection.m_Name;
260 m_Type = Projection.m_Type;
261 m_Unit = Projection.m_Unit;
262 m_Unit_To_Meter = Projection.m_Unit_To_Meter;
263 m_Unit_Name = Projection.m_Unit_Name;
264 m_WKT = Projection.m_WKT;
265 m_Proj4 = Projection.m_Proj4;
266 m_Authority = Projection.m_Authority;
267 m_Authority_ID = Projection.m_Authority_ID;
277 Create(Authority_ID, Authority);
282 return(
Assign(Authority_ID, Authority) );
287 return( Authority && *Authority
296 Create(Projection, Format);
301 return(
Assign(Projection, Format) );
335 m_Proj4 = Projection;
378 return(
Assign(WKT, Proj4) );
396 m_Name =
_TL(
"undefined");
399 m_Unit_To_Meter = 1.;
400 m_Unit_Name .
Clear();
403 m_Authority .
Clear();
417 return(
Load(Stream, Format) );
437 return(
Assign(s, Format) );
454 return( Stream.
Write(m_Proj4) == m_Proj4.
Length() );
466 if( (pEntry = Projection.
Get_Child(
"OGC_WKT")) != NULL )
470 if( (pEntry = Projection.
Get_Child(
"PROJ4")) != NULL )
487 Projection.
Add_Child(
"PROJ4" , m_Proj4 );
499 #define WKT_GCS_WGS84 "GEOGCS[\"WGS 84\",AUTHORITY[\"EPSG\",\"4326\"]],"\
500 "DATUM[\"WGS_1984\",AUTHORITY[\"EPSG\",\"6326\"]],"\
501 "SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],"\
502 "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"\
503 "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]"
506 #define PROJ4_GCS_WGS84 "+proj=longlat +datum=WGS84 +no_defs"
517 if( Zone < 1 || Zone > 60 )
523 int EPSG_ID = (bSouth ? 32700 : 32600) + Zone;
533 WKT.
Printf(
"PROJCS[\"WGS 84 / UTM zone %d%c\",%s"
534 "PROJECTION[\"Transverse_Mercator\"],AUTHORITY[\"EPSG\",\"%d\"]]"
535 "PARAMETER[\"latitude_of_origin\",0],"
536 "PARAMETER[\"central_meridian\",%d],"
537 "PARAMETER[\"scale_factor\",0.9996],"
538 "PARAMETER[\"false_easting\",500000],"
539 "PARAMETER[\"false_northing\",%d],"
540 "AXIS[\"Easting\",EAST],"
541 "AXIS[\"Northing\",NORTH],"
542 "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]",
546 Proj4.
Printf(
"+proj=utm +zone=%d%s +datum=WGS84 +units=m +no_defs", Zone, bSouth ?
SG_T(
" +south") :
SG_T(
""));
548 return(
Create(WKT, Proj4) );
571 return( m_Authority.
CmpNoCase(Projection.m_Authority) == 0 && m_Authority_ID == Projection.m_Authority_ID );
574 if( m_Proj4.
CmpNoCase(Projection.m_Proj4) == 0 )
582 for(
int j=0; j<2; j++)
591 if( !key.
is_Empty() && key.
Cmp(
"no_defs") && !Parms[j](key) )
598 for(
int j=0, k=1; j<2; j++, k=++k%2)
606 if( !Parms[k][key].Cmp_Content(Parms[j][i].Get_Content()) )
610 if( !Parms[j].Get_Content().asDouble(d[0])
611 || !Parms[j].Get_Content().asDouble(d[1]) || d[0] != d[1] )
643 #define GET_DATUM(d, p) { CSG_String s; CSG_Projections::_Proj4_Get_Datum(s, p); d.Clear();\
644 for(int i=0, add=1; i<s.Length(); i++) {\
645 if( s[i] == '\"' ) { add = add ? 0 : 1; } else if( add ) { d += s[i]; }\
652 return( Datum[0].is_Same_As(Datum[1]) );
669 if( m_Authority.
Length() > 0 && m_Authority_ID > 0 )
676 if( m_Proj4.
Length() > 0 )
678 s +=
"\n[" + m_Proj4 +
"]";
727 #if defined(_SAGA_LINUX)
756 bool bResult =
Load_DB(File_DB);
764 void CSG_Projections::_On_Construction(
void)
782 delete(m_pProjections);
804 _Set_Dictionary(m_Proj4_to_WKT, 1);
805 _Set_Dictionary(m_WKT_to_Proj4, -1);
821 switch( Table[i].asString(1)[0] )
837 m_Proj4_to_WKT.
Create(&Proj4_to_WKT, 0, 2,
true);
851 return( _Set_Dictionary(Table, 0) && Table.
Save(File) );
866 if( Table.
Create(FileName) )
890 return( m_pProjections->
Save(File) );
903 return( Projection );
913 return( Projection );
952 if( Index >= 0 && Index < m_pProjections->
Get_Count() )
972 return( Projection );
1017 Proj4.
Printf(
"+init=epsg:%d ", EPSG_Code);
1069 else if( Type == iType )
1090 for(
int i=0, l=-1; l!=0 && i<(int)WKT.
Length(); i++)
1096 default : Key += WKT[i];
break;
1098 case '[':
case '(': l = 1 ;
break;
1099 case ')':
case ']':
return(
false );
1108 default : bAdd =
true;
break;
1109 case '\"':
case ' ': bAdd =
false;
break;
1110 case '[' :
case '(': bAdd = ++l > 1;
break;
1111 case ']' :
case ')': bAdd = l-- > 1;
break;
1112 case ',' :
if( !(bAdd = l > 1) ) Content.
Add(
"");
break;
1117 Content[Content.
Get_Count() - 1] += WKT[i];
1122 if( Key.
Length() == 0 || Content[0].Length() == 0 )
1128 if( !Key.
Cmp(
"AUTHORITY" ) && Content.
Get_Count() == 2 )
1149 || (!Key.
Cmp(
"PARAMETER" ) && Content.
Get_Count() >= 2) )
1156 if( (!Key.
Cmp(
"SPHEROID" ) && Content.
Get_Count() >= 3) )
1163 if( (!Key.
Cmp(
"TOWGS84" ) && Content.
Get_Count() >= 7) )
1174 if( (!Key.
Cmp(
"PROJECTION") && Content.
Get_Count() >= 1) )
1180 for(
int i=0; i<Content.
Get_Count(); i++)
1182 _WKT_to_MetaData(*pKey, Content[i]);
1193 _WKT_to_MetaData(MetaData, WKT);
1220 Proj4 +=
" +datum=WGS84";
1227 if( !WKT(
"SPHEROID") || WKT[
"SPHEROID"].Get_Children_Count() != 2
1228 || !WKT[
"SPHEROID"][0].Get_Content().asDouble(a) || a <= 0.
1229 || !WKT[
"SPHEROID"][1].Get_Content().asDouble(b) || b < 0. )
1234 b = b > 0. ? a - a / b : a;
1239 if( WKT(
"TOWGS84") && WKT[
"TOWGS84"].Get_Children_Count() == 7 )
1241 Proj4 +=
" +towgs84=";
1243 for(
int i=0; i<7; i++)
1293 if( !m(
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"DATUM"]) )
1298 if( m(
"PRIMEM") && m[
"PRIMEM"].Get_Content().asDouble(d) && d != 0. )
1317 Proj4 =
"+proj=longlat";
1319 if( !m(
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"DATUM"]) )
1324 if( m(
"PRIMEM") && m[
"PRIMEM"].Get_Content().asDouble(d) && d != 0. )
1344 if( m[
"PROJECTION"].Cmp_Content(
"Transverse_Mercator") )
1346 double Scale = -1., Easting = -1., Northing = -1., Meridian = -1., Latitude = -1.;
1350 if( m[i].Cmp_Name(
"PARAMETER") )
1354 if( m[i].Cmp_Property(
"name",
"central_meridian" ,
true) && m[i].Get_Content().asDouble(v) ) Meridian = v;
1355 if( m[i].Cmp_Property(
"name",
"latitude_of_origin",
true) && m[i].Get_Content().asDouble(v) ) Latitude = v;
1356 if( m[i].Cmp_Property(
"name",
"scale_factor" ,
true) && m[i].Get_Content().asDouble(v) ) Scale = v;
1357 if( m[i].Cmp_Property(
"name",
"false_easting" ,
true) && m[i].Get_Content().asDouble(v) ) Easting = v;
1358 if( m[i].Cmp_Property(
"name",
"false_northing" ,
true) && m[i].Get_Content().asDouble(v) ) Northing = v;
1362 if( Latitude == 0. && Scale == 0.9996 && Easting == 500000. && (Northing == 0. || Northing == 10000000.) )
1364 Proj4 =
"+proj=utm";
1366 if( !m[
"GEOGCS"](
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"GEOGCS"][
"DATUM"]) )
1373 if( Northing == 10000000. )
1385 Proj4 =
"+proj=" + Proj4;
1387 if( !m[
"GEOGCS"](
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"GEOGCS"][
"DATUM"]) )
1392 if( m(
"PRIMEM") && m[
"PRIMEM"].Get_Content().asDouble(d) && d != 0. )
1399 if( m[i].Cmp_Name(
"PARAMETER") )
1405 Proj4 +=
" +" + Parameter +
"=" + m[i].
Get_Content();
1414 if( m(
"UNIT") && m[
"UNIT"].Get_Content().asDouble(d) && d != 0. && d != 1. )
1436 return( Proj4.
Find(
"+" + Key) >= 0 );
1444 int l, i = Proj4.
Find(
"+" + Key +
"=");
1448 for(++i, l=0; l<2 && i<(int)Proj4.
Length(); i++)
1452 case '=': l++;
break;
1453 case '+': l=2;
break;
1454 case ' ': l=2;
break;
1464 return( Value.
Length() > 0 );
1515 const char ellipsoid[42][2][32] =
1517 {
"MERIT" ,
"6378137.0,298.257" },
1518 {
"SGS85" ,
"6378136.0,298.257" },
1519 {
"GRS80" ,
"6378137.0,298.2572221" },
1520 {
"IAU76" ,
"6378140.0,298.257" },
1521 {
"airy" ,
"6377563.396,299.3249753" },
1522 {
"APL4.9" ,
"6378137.0,298.25" },
1523 {
"NWL9D" ,
"6378145.0,298.25" },
1524 {
"mod_airy" ,
"6377340.189,299.3249374" },
1525 {
"andrae" ,
"6377104.43,300" },
1526 {
"aust_SA" ,
"6378160.0,298.25" },
1527 {
"GRS67" ,
"6378160.0,298.2471674" },
1528 {
"bessel" ,
"6377397.155,299.1528128" },
1529 {
"bess_nam" ,
"6377483.865,299.1528128" },
1530 {
"clrk66" ,
"6378206.4,294.9786982" },
1531 {
"clrk80" ,
"6378249.145,293.4663" },
1532 {
"CPM" ,
"6375738.7,334.29" },
1533 {
"delmbr" ,
"6376428.0,311.5" },
1534 {
"engelis" ,
"6378136.05,298.2566" },
1535 {
"evrst30" ,
"6377276.345,300.8017" },
1536 {
"evrst48" ,
"6377304.063,300.8017" },
1537 {
"evrst56" ,
"6377301.243,300.8017" },
1538 {
"evrst69" ,
"6377295.664,300.8017" },
1539 {
"evrstSS" ,
"6377298.556,300.8017" },
1540 {
"fschr60" ,
"6378166.0,298.3" },
1541 {
"fschr60m" ,
"6378155.0,298.3" },
1542 {
"fschr68" ,
"6378150.0,298.3" },
1543 {
"helmert" ,
"6378200.0,298.3" },
1544 {
"hough" ,
"6378270.0,297" },
1545 {
"intl" ,
"6378388.0,297" },
1546 {
"krass" ,
"6378245.0,298.3" },
1547 {
"kaula" ,
"6378163.0,298.24" },
1548 {
"lerch" ,
"6378139.0,298.257" },
1549 {
"mprts" ,
"6397300.0,191" },
1550 {
"new_intl" ,
"6378157.5,298.2496154" },
1551 {
"plessis" ,
"6376523.0,308.6409971" },
1552 {
"SEasia" ,
"6378155.0,298.3000002" },
1553 {
"walbeck" ,
"6376896.0,302.7800002" },
1554 {
"WGS60" ,
"6378165.0,298.3" },
1555 {
"WGS66" ,
"6378145.0,298.25" },
1556 {
"WGS72" ,
"6378135.0,298.26" },
1557 {
"WGS84" ,
"6378137.0,298.2572236" },
1558 {
"sphere" ,
"6370997.0,-1" }
1562 if( _Proj4_Read_Parameter(Value, Proj4,
"ellps") )
1564 for(
int i=0; i<42; i++)
1578 a = _Proj4_Read_Parameter(Value, Proj4,
"a" ) && Value.
asDouble(a) ? a : 6378137.;
1580 b = _Proj4_Read_Parameter(Value, Proj4,
"b" ) && Value.
asDouble(b) ? a / (a - b)
1581 : _Proj4_Read_Parameter(Value, Proj4,
"rf") && Value.
asDouble(b) ? b
1582 : _Proj4_Read_Parameter(Value, Proj4,
"f" ) && Value.
asDouble(b) ? 1. / b
1583 : _Proj4_Read_Parameter(Value, Proj4,
"e" ) && Value.
asDouble(b) ? a / (a - sqrt(b*b - a*a))
1584 : _Proj4_Read_Parameter(Value, Proj4,
"es") && Value.
asDouble(b) ? a / (a - sqrt( b - a*a))
1595 const char datum[9][3][64] =
1597 {
"WGS84" ,
"WGS84" ,
"0,0,0,0,0,0,0" },
1598 {
"GGRS87" ,
"GRS80" ,
"-199.87,74.79,246.62,0,0,0,0" },
1599 {
"NAD83" ,
"GRS80" ,
"0,0,0,0,0,0,0" },
1601 {
"potsdam" ,
"bessel" ,
"606.0,23.0,413.0,0,0,0,0" },
1602 {
"carthage" ,
"clark80" ,
"-263.0,6.0,431.0,0,0,0,0" },
1603 {
"hermannskogel" ,
"bessel" ,
"653.0,-212.0,449.0,0,0,0,0" },
1604 {
"ire65" ,
"mod_airy" ,
"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15" },
1605 {
"nzgd49" ,
"intl" ,
"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993" },
1606 {
"OSGB36" ,
"airy" ,
"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894" }
1612 if( _Proj4_Read_Parameter(Value, Proj4,
"datum") )
1614 for(
int i=0; i<9; i++)
1626 if( _Proj4_Get_Ellipsoid(Spheroid, Proj4) )
1628 Value =
"DATUM[\"Datum\","+ Spheroid;
1630 if( _Proj4_Read_Parameter(ToWGS84, Proj4,
"towgs84") )
1636 ToWGS84 +=
",0,0,0,0";
1639 Value +=
",TOWGS84[" + ToWGS84 +
"]";
1643 Value +=
",TOWGS84[0,0,0,0,0,0,0]";
1652 Value =
"DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563],TOWGS84[0,0,0,0,0,0,0]]";
1660 const char meridian[12][2][16] =
1662 {
"lisbon" ,
"-9.131906111" },
1663 {
"paris" ,
"2.337229167" },
1664 {
"bogota" ,
"74.08091667" },
1665 {
"madrid" ,
"-3.687911111" },
1666 {
"rome" ,
"12.45233333" },
1667 {
"bern" ,
"7.439583333" },
1668 {
"jakarta" ,
"106.8077194" },
1669 {
"ferro" ,
"-17.66666667" },
1670 {
"brussels" ,
"4.367975" },
1671 {
"stockholm" ,
"18.05827778" },
1672 {
"athens" ,
"23.7163375" },
1673 {
"oslo" ,
"10.72291667" }
1677 if( _Proj4_Read_Parameter(Value, Proj4,
"pm") )
1679 for(
int i=0; i<12; i++)
1693 Value.
Printf(
"PRIMEM[\"Prime_Meridian\",%f]", d);
1700 Value =
"PRIMEM[\"Greenwich\",0]";
1721 if( _Proj4_Read_Parameter(Value, Proj4,
"to_meter") && Value.
asDouble(d) && d > 0. && d != 1. )
1723 Value.
Printf(
"UNIT[\"Unit\",%f]", d);
1729 Value =
"UNIT[\"metre\",1]";
1740 if( !_Proj4_Read_Parameter(ProjCS, Proj4,
"proj") )
1759 GeogCS =
"GEOGCS[\"GCS\",";
1761 _Proj4_Get_Datum (Value, Proj4); GeogCS += Value; GeogCS +=
",";
1762 _Proj4_Get_Prime_Meridian (Value, Proj4); GeogCS += Value; GeogCS +=
",";
1764 GeogCS +=
"UNIT[\"degree\",0.01745329251994328]]";
1799 if( !_Proj4_Read_Parameter(Value, Proj4,
"zone") || !Value.
asDouble(Zone) )
1806 bool South = _Proj4_Find_Parameter(Proj4,
"south");
1808 WKT =
CSG_String::Format(
"PROJCS[\"UTM zone %d%c\",%s,PROJECTION[Transverse_Mercator]", (
int)Zone, South ?
'S' :
'N', GeogCS.
c_str());
1815 WKT +=
",UNIT[\"metre\",1]]";
1827 while( ProjCS.
Find(
'+') >= 0 )
1838 if( Value.
Find(
'+') >= 0 )
1843 WKT +=
",PARAMETER[\"" + Key +
"\"," + Value +
"]";
1850 _Proj4_Get_Unit(Value, Proj4);
1852 WKT +=
"," + Value +
"]";
1866 bool CSG_Projections::_Set_Dictionary(
CSG_Table &Dictionary,
int Direction)
1868 const int n = 214;
const char Translation[n][4][128] = {
1872 {
"aea" ,
" ",
"Albers_Conic_Equal_Area" ,
"Albers Equal Area" },
1873 {
"aea" ,
"<",
"Albers" ,
"[ESRI] Albers Equal Area" },
1874 {
"aeqd" ,
" ",
"Azimuthal_Equidistant" ,
"Azimuthal Equidistant" },
1875 {
"airy" ,
" ",
"Airy 1830" ,
"Airy 1830" },
1876 {
"aitoff" ,
" ",
"Sphere_Aitoff" ,
"Aitoff" },
1877 {
"alsk" ,
" ",
"Mod_Stererographics_of_Alaska" ,
"*) Mod. Stererographics of Alaska" },
1878 {
"apian" ,
" ",
"Apian_Globular_I" ,
"*) Apian Globular I" },
1879 {
"august" ,
" ",
"August_Epicycloidal" ,
"*) August Epicycloidal" },
1880 {
"bacon" ,
" ",
"Bacon_Globular" ,
"*) Bacon Globular" },
1881 {
"bipc" ,
" ",
"Bipolar_conic_of_western_hemisphere" ,
"*) Bipolar conic of western hemisphere" },
1882 {
"boggs" ,
" ",
"Boggs_Eumorphic" ,
"*) Boggs Eumorphic" },
1883 {
"bonne" ,
" ",
"Bonne" ,
"Bonne (Werner lat_1=90)" },
1884 {
"cass" ,
" ",
"Cassini_Soldner" ,
"Cassini" },
1885 {
"cass" ,
"<",
"Cassini" ,
"[ESRI] Cassini" },
1886 {
"cc" ,
" ",
"Central_Cylindrical" ,
"*) Central Cylindrical" },
1887 {
"cea" ,
" ",
"Cylindrical_Equal_Area" ,
"Equal Area Cylindrical, alias: Lambert Cyl.Eq.A., Normal Authalic Cyl. (FME), Behrmann (SP=30), Gall Orthogr. (SP=45)" },
1888 {
"cea" ,
"<",
"Behrmann" ,
"[ESRI] Behrmann (standard parallel = 30)" },
1889 {
"chamb" ,
" ",
"Chamberlin_Trimetric" ,
"*) Chamberlin Trimetric" },
1890 {
"collg" ,
" ",
"Collignon" ,
"*) Collignon" },
1891 {
"crast" ,
" ",
"Craster_Parabolic" ,
"[ESRI] Craster Parabolic (Putnins P4)" },
1892 {
"denoy" ,
" ",
"Denoyer_Semi_Elliptical" ,
"*) Denoyer Semi-Elliptical" },
1893 {
"eck1" ,
" ",
"Eckert_I" ,
"*) Eckert I" },
1894 {
"eck2" ,
" ",
"Eckert_II" ,
"*) Eckert II" },
1895 {
"eck3" ,
" ",
"Eckert_III" ,
"*) Eckert III" },
1896 {
"eck4" ,
" ",
"Eckert_IV" ,
"Eckert IV" },
1897 {
"eck5" ,
" ",
"Eckert_V" ,
"*) Eckert V" },
1898 {
"eck6" ,
" ",
"Eckert_VI" ,
"Eckert VI" },
1899 {
"eqearth" ,
" ",
"Equal_Earth" ,
"*) Equal Earth" },
1900 {
"eqc" ,
" ",
"Equirectangular" ,
"Equidistant Cylindrical (Plate Caree)" },
1901 {
"eqc" ,
"<",
"Equidistant_Cylindrical" ,
"[ESRI] Equidistant Cylindrical (Plate Caree)" },
1902 {
"eqc" ,
"<",
"Plate_Carree" ,
"[ESRI] Equidistant Cylindrical (Plate Caree)" },
1903 {
"eqdc" ,
" ",
"Equidistant_Conic" ,
"*) Equidistant Conic" },
1904 {
"euler" ,
" ",
"Euler" ,
"*) Euler" },
1905 {
"etmerc" ,
" ",
"Extended_Transverse_Mercator" ,
"*) Extended Transverse Mercator" },
1906 {
"fahey" ,
" ",
"Fahey" ,
"*) Fahey" },
1907 {
"fouc" ,
" ",
"Foucault" ,
"*) Foucaut" },
1908 {
"fouc_s" ,
" ",
"Foucault_Sinusoidal" ,
"*) Foucaut Sinusoidal" },
1909 {
"gall" ,
" ",
"Gall_Stereographic" ,
"Gall (Gall Stereographic)" },
1910 {
"geocent" ,
" ",
"Geocentric" ,
"*) Geocentric" },
1911 {
"geos" ,
" ",
"GEOS" ,
"Geostationary Satellite View" },
1912 {
"gins8" ,
" ",
"Ginsburg_VIII" ,
"*) Ginsburg VIII (TsNIIGAiK)" },
1913 {
"gn_sinu" ,
" ",
"General_Sinusoidal_Series" ,
"*) General Sinusoidal Series" },
1914 {
"gnom" ,
" ",
"Gnomonic" ,
"Gnomonic" },
1915 {
"goode" ,
" ",
"Goode_Homolosine" ,
"*) Goode Homolosine" },
1916 {
"gs48" ,
" ",
"Mod_Stererographics_48" ,
"*) Mod. Stererographics of 48 U.S." },
1917 {
"gs50" ,
" ",
"Mod_Stererographics_50" ,
"*) Mod. Stererographics of 50 U.S." },
1918 {
"hammer" ,
" ",
"Hammer_Eckert_Greifendorff" ,
"*) Hammer & Eckert-Greifendorff" },
1919 {
"hatano" ,
" ",
"Hatano_Asymmetrical_Equal_Area" ,
"*) Hatano Asymmetrical Equal Area" },
1920 {
"igh" ,
" ",
"Interrupted_Goodes_Homolosine" ,
"*) Interrupted Goode's Homolosine" },
1921 {
"igh_o" ,
" ",
"Interrupted_Goodes_Homolosine_Ocean" ,
"*) Interrupted Goode's Homolosine (Ocean)" },
1922 {
"imw_p" ,
" ",
"International_Map_of_the_World_Polyconic" ,
"*) International Map of the World Polyconic" },
1923 {
"kav5" ,
" ",
"Kavraisky_V" ,
"*) Kavraisky V" },
1924 {
"kav7" ,
" ",
"Kavraisky_VII" ,
"*) Kavraisky VII" },
1925 {
"krovak" ,
" ",
"Krovak" ,
"Krovak" },
1926 {
"labrd" ,
" ",
"Laborde_Oblique_Mercator" ,
"*) Laborde" },
1927 {
"laea" ,
" ",
"Lambert_Azimuthal_Equal_Area" ,
"Lambert Azimuthal Equal Area" },
1928 {
"lagrng" ,
" ",
"Lagrange" ,
"*) Lagrange" },
1929 {
"larr" ,
" ",
"Larrivee" ,
"*) Larrivee" },
1930 {
"lask" ,
" ",
"Laskowski" ,
"*) Laskowski" },
1931 {
"lcc" ,
"<",
"Lambert_Conformal_Conic_1SP" ,
"Lambert Conformal Conic (1 standard parallel)" },
1932 {
"lcc" ,
"<",
"Lambert_Conformal_Conic_2SP" ,
"Lambert Conformal Conic (2 standard parallels)" },
1933 {
"lcc" ,
" ",
"Lambert_Conformal_Conic" ,
"Lambert Conformal Conic" },
1934 {
"lcca" ,
" ",
"Lambert_Conformal_Conic_Alternative" ,
"*) Lambert Conformal Conic Alternative" },
1935 {
"leac" ,
" ",
"Lambert_Equal_Area_Conic" ,
"*) Lambert Equal Area Conic" },
1936 {
"lee_os" ,
" ",
"Lee_Oblated_Stereographic" ,
"*) Lee Oblated Stereographic" },
1937 {
"loxim" ,
" ",
"Loximuthal" ,
"[ESRI] Loximuthal" },
1938 {
"lsat" ,
" ",
"Space_oblique_for_LANDSAT" ,
"*) Space oblique for LANDSAT" },
1939 {
"mbt_s" ,
" ",
"McBryde_Thomas_Flat_Polar_Sine" ,
"*) McBryde-Thomas Flat-Polar Sine" },
1940 {
"mbt_fps" ,
" ",
"McBryde_Thomas_Flat_Polar_Sine_2" ,
"*) McBryde-Thomas Flat-Pole Sine (No. 2)" },
1941 {
"mbtfpp" ,
" ",
"McBryde_Thomas_Flat_Polar_Parabolic" ,
"*) McBride-Thomas Flat-Polar Parabolic" },
1942 {
"mbtfpq" ,
" ",
"Flat_Polar_Quartic" ,
"[ESRI] McBryde-Thomas Flat-Polar Quartic" },
1943 {
"mbtfps" ,
" ",
"McBryde_Thomas_Flat_Polar_Sinusoidal" ,
"*) McBryde-Thomas Flat-Polar Sinusoidal" },
1944 {
"merc" ,
" ",
"Mercator" ,
"[ESRI] Mercator" },
1945 {
"merc" ,
"<",
"Mercator_1SP" ,
"Mercator (1 standard parallel)" },
1946 {
"merc" ,
"<",
"Mercator_2SP" ,
"Mercator (2 standard parallels)" },
1947 {
"mil_os" ,
" ",
"Miller_Oblated_Stereographic" ,
"*) Miller Oblated Stereographic" },
1948 {
"mill" ,
" ",
"Miller_Cylindrical" ,
"Miller Cylindrical" },
1949 {
"moll" ,
" ",
"Mollweide" ,
"Mollweide" },
1950 {
"murd1" ,
" ",
"Murdoch_I" ,
"*) Murdoch I" },
1951 {
"murd2" ,
" ",
"Murdoch_II" ,
"*) Murdoch II" },
1952 {
"murd3" ,
" ",
"Murdoch_III" ,
"*) Murdoch III" },
1953 {
"nell" ,
" ",
"Nell" ,
"*) Nell" },
1954 {
"nell_h" ,
" ",
"Nell_Hammer" ,
"*) Nell-Hammer" },
1955 {
"nicol" ,
" ",
"Nicolosi_Globular" ,
"*) Nicolosi Globular" },
1956 {
"nsper" ,
" ",
"Near_sided_perspective" ,
"*) Near-sided perspective" },
1957 {
"nzmg" ,
" ",
"New_Zealand_Map_Grid" ,
"New Zealand Map Grid" },
1958 {
"ob_tran" ,
" ",
"General_Oblique_Transformation" ,
"*) General Oblique Transformation" },
1959 {
"ocea" ,
" ",
"Oblique_Cylindrical_Equal_Area" ,
"*) Oblique Cylindrical Equal Area" },
1960 {
"oea" ,
" ",
"Oblated_Equal_Area" ,
"*) Oblated Equal Area" },
1961 {
"omerc" ,
" ",
"Hotine_Oblique_Mercator" ,
"Oblique Mercator" },
1962 {
"omerc" ,
"<",
"Oblique_Mercator" ,
"Oblique Mercator" },
1963 {
"ortel" ,
" ",
"Ortelius_Oval" ,
"*) Ortelius Oval" },
1964 {
"ortho" ,
" ",
"Orthographic" ,
"Orthographic (ESRI: World from Space)" },
1965 {
"pconic" ,
" ",
"Perspective_Conic" ,
"*) Perspective Conic" },
1966 {
"poly" ,
" ",
"Polyconic" ,
"*) Polyconic (American)" },
1967 {
"putp1" ,
" ",
"Putnins_P1" ,
"*) Putnins P1" },
1968 {
"putp2" ,
" ",
"Putnins_P2" ,
"*) Putnins P2" },
1969 {
"putp3" ,
" ",
"Putnins_P3" ,
"*) Putnins P3" },
1970 {
"putp3p" ,
" ",
"Putnins_P3'" ,
"*) Putnins P3'" },
1971 {
"putp4p" ,
" ",
"Putnins_P4'" ,
"*) Putnins P4'" },
1972 {
"putp5" ,
" ",
"Putnins_P5" ,
"*) Putnins P5" },
1973 {
"putp5p" ,
" ",
"Putnins_P5'" ,
"*) Putnins P5'" },
1974 {
"putp6" ,
" ",
"Putnins_P6" ,
"*) Putnins P6" },
1975 {
"putp6p" ,
" ",
"Putnins_P6'" ,
"*) Putnins P6'" },
1976 {
"qua_aut" ,
" ",
"Quartic_Authalic" ,
"[ESRI] Quart c Authalic" },
1977 {
"robin" ,
" ",
"Robinson" ,
"Robinson" },
1978 {
"rouss" ,
" ",
"Roussilhe_Stereographic" ,
"*) Roussilhe Stereographic" },
1979 {
"rpoly" ,
" ",
"Rectangular_Polyconic" ,
"*) Rectangular Polyconic" },
1980 {
"sinu" ,
" ",
"Sinusoidal" ,
"Sinusoidal (Sanson-Flamsteed)" },
1981 {
"somerc" ,
" ",
"Hotine_Oblique_Mercator" ,
"Swiss Oblique Mercator" },
1982 {
"somerc" ,
"<",
"Swiss_Oblique_Cylindrical" ,
"Swiss Oblique Cylindrical" },
1983 {
"somerc" ,
"<",
"Hotine_Oblique_Mercator_Azimuth_Center" ,
"[ESRI] Swiss Oblique Mercator/Cylindrical" },
1984 {
"stere" ,
"<",
"Polar_Stereographic" ,
"Stereographic" },
1985 {
"stere" ,
" ",
"Stereographic" ,
"[ESRI] Stereographic" },
1986 {
"sterea" ,
" ",
"Oblique_Stereographic" ,
"Oblique Stereographic Alternative" },
1987 {
"sterea" ,
"<",
"Double_Stereographic" ,
"[ESRI]" },
1988 {
"gstmerc" ,
" ",
"Gauss_Schreiber_Transverse_Mercator" ,
"*) Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)" },
1989 {
"tcc" ,
" ",
"Transverse_Central_Cylindrical" ,
"*) Transverse Central Cylindrical" },
1990 {
"tcea" ,
" ",
"Transverse_Cylindrical_Equal_Area" ,
"*) Transverse Cylindrical Equal Area" },
1991 {
"tissot" ,
" ",
"Tissot_Conic" ,
"*) Tissot Conic" },
1992 {
"tmerc" ,
" ",
"Transverse_Mercator" ,
"*) Transverse Mercator" },
1993 {
"tmerc" ,
"<",
"Gauss_Kruger" ,
"[ESRI] DHDN" },
1994 {
"tpeqd" ,
" ",
"Two_Point_Equidistant" ,
"*) Two Point Equidistant" },
1995 {
"tpers" ,
" ",
"Tilted_perspective" ,
"*) Tilted perspective" },
1996 {
"ups" ,
" ",
"Universal_Polar_Stereographic" ,
"*) Universal Polar Stereographic" },
1997 {
"urm5" ,
" ",
"Urmaev_V" ,
"*) Urmaev V" },
1998 {
"urmfps" ,
" ",
"Urmaev_Flat_Polar_Sinusoidal" ,
"*) Urmaev Flat-Polar Sinusoidal" },
1999 {
"utm" ,
">",
"Transverse_Mercator" ,
"*) Universal Transverse Mercator (UTM)" },
2000 {
"vandg" ,
"<",
"Van_Der_Grinten_I" ,
"[ESRI] van der Grinten (I)" },
2001 {
"vandg" ,
" ",
"VanDerGrinten" ,
"van der Grinten (I)" },
2002 {
"vandg2" ,
" ",
"VanDerGrinten_II" ,
"*) van der Grinten II" },
2003 {
"vandg3" ,
" ",
"VanDerGrinten_III" ,
"*) van der Grinten III" },
2004 {
"vandg4" ,
" ",
"VanDerGrinten_IV" ,
"*) van der Grinten IV" },
2005 {
"vitk1" ,
" ",
"Vitkovsky_I" ,
"*) Vitkovsky I" },
2006 {
"wag1" ,
" ",
"Wagner_I" ,
"*) Wagner I (Kavraisky VI)" },
2007 {
"wag2" ,
" ",
"Wagner_II" ,
"*) Wagner II" },
2008 {
"wag3" ,
" ",
"Wagner_III" ,
"*) Wagner III" },
2009 {
"wag4" ,
" ",
"Wagner_IV" ,
"*) Wagner IV" },
2010 {
"wag5" ,
" ",
"Wagner_V" ,
"*) Wagner V" },
2011 {
"wag6" ,
" ",
"Wagner_VI" ,
"*) Wagner VI" },
2012 {
"wag7" ,
" ",
"Wagner_VII" ,
"*) Wagner VII" },
2013 {
"webmerc" ,
" ",
"Mercator_1SP" ,
"Web Mercator" },
2014 {
"webmerc" ,
"<",
"Mercator_Auxiliary_Sphere" ,
"[ESRI] Web Mercator" },
2015 {
"weren" ,
" ",
"Werenskiold_I" ,
"*) Werenskiold I" },
2016 {
"wink1" ,
" ",
"Winkel_I" ,
"[ESRI] Winkel I" },
2017 {
"wink2" ,
" ",
"Winkel_II" ,
"[ESRI] Winkel II" },
2018 {
"wintri" ,
" ",
"Winkel_Tripel" ,
"[ESRI] Winkel Tripel" },
2021 {
"alpha" ,
" ",
"azimuth" ,
"? Used with Oblique Mercator and possibly a few others" },
2022 {
"k" ,
">",
"scale_factor" ,
"Scaling factor (old name)" },
2023 {
"K" ,
">",
"scale_factor" ,
"? Scaling factor (old name)" },
2024 {
"k_0" ,
" ",
"scale_factor" ,
"Scaling factor (new name)" },
2025 {
"lat_0" ,
" ",
"latitude_of_origin" ,
"Latitude of origin" },
2026 {
"lat_0" ,
"<",
"latitude_of_center" ,
"Latitude of center" },
2027 {
"lat_0" ,
"<",
"central_parallel" ,
"[ESRI] Latitude of center" },
2028 {
"lat_1" ,
" ",
"standard_parallel_1" ,
"Latitude of first standard parallel" },
2029 {
"lat_2" ,
" ",
"standard_parallel_2" ,
"Latitude of second standard parallel" },
2030 {
"lat_ts" ,
">",
"latitude_of_origin" ,
"Latitude of true scale" },
2031 {
"lon_0" ,
" ",
"central_meridian" ,
"Central meridian" },
2032 {
"lon_0" ,
"<",
"longitude_of_center" ,
"Longitude of center" },
2033 {
"lonc" ,
">",
"longitude_of_center" ,
"? Longitude used with Oblique Mercator and possibly a few others" },
2034 {
"x_0" ,
" ",
"false_easting" ,
"False easting" },
2035 {
"y_0" ,
" ",
"false_northing" ,
"False northing" },
2038 {
"azi" ,
" ",
"",
"" },
2039 {
"belgium" ,
" ",
"",
"" },
2040 {
"beta" ,
" ",
"",
"" },
2041 {
"czech" ,
" ",
"",
"" },
2042 {
"gamma" ,
" ",
"",
"" },
2043 {
"geoc" ,
" ",
"",
"" },
2044 {
"guam" ,
" ",
"",
"" },
2045 {
"h" ,
" ",
"satellite_height",
"Satellite height (geos - Geostationary Satellite View)" },
2046 {
"lat_b" ,
" ",
"",
"" },
2047 {
"lat_t" ,
" ",
"",
"" },
2048 {
"lon_1" ,
" ",
"",
"" },
2049 {
"lon_2" ,
" ",
"",
"" },
2050 {
"lsat" ,
" ",
"",
"" },
2051 {
"m" ,
" ",
"",
"" },
2052 {
"M" ,
" ",
"",
"" },
2053 {
"n" ,
" ",
"",
"" },
2054 {
"no_cut" ,
" ",
"",
"" },
2055 {
"no_off" ,
" ",
"",
"" },
2056 {
"no_rot" ,
" ",
"",
"" },
2057 {
"ns" ,
" ",
"",
"" },
2058 {
"o_alpha" ,
" ",
"",
"" },
2059 {
"o_lat_1" ,
" ",
"",
"" },
2060 {
"o_lat_2" ,
" ",
"",
"" },
2061 {
"o_lat_c" ,
" ",
"",
"" },
2062 {
"o_lat_p" ,
" ",
"",
"" },
2063 {
"o_lon_1" ,
" ",
"",
"" },
2064 {
"o_lon_2" ,
" ",
"",
"" },
2065 {
"o_lon_c" ,
" ",
"",
"" },
2066 {
"o_lon_p" ,
" ",
"",
"" },
2067 {
"o_proj" ,
" ",
"",
"" },
2068 {
"over" ,
" ",
"",
"" },
2069 {
"p" ,
" ",
"",
"" },
2070 {
"path" ,
" ",
"",
"" },
2071 {
"q" ,
" ",
"",
"" },
2072 {
"R" ,
" ",
"",
"" },
2073 {
"R_a" ,
" ",
"",
"" },
2074 {
"R_A" ,
" ",
"",
"" },
2075 {
"R_g" ,
" ",
"",
"" },
2076 {
"R_h" ,
" ",
"",
"" },
2077 {
"R_lat_a" ,
" ",
"",
"" },
2078 {
"R_lat_g" ,
" ",
"",
"" },
2079 {
"rot" ,
" ",
"",
"" },
2080 {
"R_V" ,
" ",
"",
"" },
2081 {
"s" ,
" ",
"",
"" },
2082 {
"sym" ,
" ",
"",
"" },
2083 {
"t" ,
" ",
"",
"" },
2084 {
"theta" ,
" ",
"",
"" },
2085 {
"tilt" ,
" ",
"",
"" },
2086 {
"vopt" ,
" ",
"",
"" },
2087 {
"W" ,
" ",
"",
"" },
2088 {
"westo" ,
" ",
"",
"" },
2112 {
"" ,
" ",
"",
"" } };
2116 Dictionary.
Set_Name(
"Proj.4-WKT Dictionary");
2118 if( Direction == 0 )
2125 for(
int i=0; i<n; i++)
2135 else if( Direction > 0 )
2140 for(
int i=0; i<n; i++)
2142 if( Translation[i][1][0] !=
'<' )
2151 else if( Direction < 0 )
2156 for(
int i=0; i<n; i++)
2158 if( Translation[i][1][0] !=
'>' )
2172 bool CSG_Projections::_Set_Dictionary(
CSG_Translator &Dictionary,
int Direction)
2176 return( _Set_Dictionary(Table, Direction) && Dictionary.
Create(&Table, 0, 1,
true) );
2193 if( !pSource || !pSource->
is_Valid() )
2200 return( pTarget ? pTarget->
Create(*pSource) :
true );
2235 if( Source == Target )
2272 if( Source == Target )
2309 bool bResult =
false;