98 m_Name = Projection.m_Name;
99 m_Type = Projection.m_Type;
100 m_Unit = Projection.m_Unit;
102 m_WKT1 = Projection.m_WKT1;
103 m_WKT2 = Projection.m_WKT2;
104 m_PROJ = Projection.m_PROJ;
105 m_ESRI = Projection.m_ESRI;
106 m_Authority = Projection.m_Authority;
107 m_Code = Projection.m_Code;
120 if( Definition && *Definition)
138 if( Definition && *Definition )
164 m_Name =
WKT.Get_Property(
"name");
166 if(
WKT(
"UNIT") &&
WKT[
"UNIT"].Get_Property(
"name") )
173 if(
WKT.Get_Property(
"authority_name", Authority) &&
WKT.Get_Property(
"authority_code", Code) )
175 m_Authority = Authority; m_Code = Code;
203 m_Name =
_TL(
"undefined");
205 m_Unit = ESG_Projection_Unit::Undefined;
211 m_Authority .
Clear();
225 return(
Load(Stream) );
257 case ESG_CRS_Format::WKT1:
return( !m_WKT1.
is_Empty() && Stream.
Write(m_WKT1) == m_WKT1.
Length() );
258 case ESG_CRS_Format::WKT2:
return( !m_WKT2.
is_Empty() && Stream.
Write(m_WKT2) == m_WKT2.
Length() );
259 case ESG_CRS_Format::PROJ:
return( !m_PROJ.
is_Empty() && Stream.
Write(m_PROJ) == m_PROJ.
Length() );
260 case ESG_CRS_Format::ESRI:
return( !m_ESRI.
is_Empty() && Stream.
Write(m_ESRI) == m_ESRI.
Length() );
261 case ESG_CRS_Format::CODE:
return( !m_Authority.
is_Empty() && m_Code > 0 && Stream.
Printf(
"%s:%d", m_Authority.
c_str(), m_Code) );
271 if( Projection(
"WKT1") ) {
return(
Create(Projection[
"WKT1"].Get_Content()) ); }
272 if( Projection(
"PROJ") ) {
return(
Create(Projection[
"PROJ"].Get_Content()) ); }
277 if( Projection(
"OGC_WKT") ) {
return(
Create(Projection[
"OGC_WKT"].Get_Content()) ); }
278 if( Projection(
"PROJ4" ) ) {
return(
Create(Projection[
"PROJ4" ].Get_Content()) ); }
308 return(
_TL(
"Unknown Spatial Reference") );
311 CSG_MetaData WKT(CSG_Projections::_WKT_to_MetaData(m_WKT1)), *pGCS = NULL;
321 else if(
WKT(
"PROJECTION") )
323 s.
Printf(
"%s [%s]",
WKT.Get_Content(
"PROJECTION"),
_TL(
"user defined")); s.
Replace(
"_",
" ");
330 if( m_Code > 0 && !m_Authority.
is_Empty() )
339 #define ADD_HEAD(name, value) { CSG_String n(name), v(value); n.Replace("_", " "); v.Replace("_", " "); s += CSG_String::Format("<tr><th>%s</th><th>%s</th></tr>", n.c_str(), v.c_str()); }
340 #define ADD_INFO(name, value) { CSG_String n(name), v(value); n.Replace("_", " "); v.Replace("_", " "); s += CSG_String::Format("<tr><td>%s</td><td>%s</td></tr>", n.c_str(), v.c_str()); }
341 #define ADD_CONT(name, entry) if( entry ) { ADD_INFO(name, entry->Get_Content() ); }
342 #define ADD_PROP(name, entry, prop) if( entry && entry->Get_Property(prop) ) { ADD_INFO(name, entry->Get_Property(prop)); }
348 ADD_HEAD(
_TL(
"Projected Coordinate System" ),
WKT.Get_Property(
"name") && !
WKT.Cmp_Property(
"name",
"unknown",
true) ?
WKT.Get_Property(
"name") :
SG_T(
""));
350 if( m_Code > 0 && !m_Authority.
is_Empty() )
357 for(
int i=0; i<
WKT.Get_Children_Count(); i++)
359 if(
WKT[i].Cmp_Name(
"PARAMETER") )
366 pGCS =
WKT(
"GEOGCS");
373 if( pGCS && pGCS->
Cmp_Name(
"GEOGCS") )
376 ADD_PROP(
_TL(
"Authority Code" ), pGCS,
"authority_code");
377 ADD_PROP(
_TL(
"Authority" ), pGCS,
"authority_name");
378 ADD_PROP(
_TL(
"Prime Meridian" ), (*pGCS)(
"PRIMEM" ),
"name");
379 ADD_PROP(
_TL(
"Angular Unit" ), (*pGCS)(
"UNIT" ),
"name");
380 ADD_PROP(
_TL(
"Datum" ), (*pGCS)(
"DATUM" ),
"name");
381 ADD_PROP(
_TL(
"Spheroid" ), (*pGCS)(
"DATUM.SPHEROID"),
"name");
382 ADD_CONT(
_TL(
"Semimajor Axis" ), (*pGCS)(
"DATUM.SPHEROID.a" ));
383 ADD_CONT(
_TL(
"Inverse Flattening" ), (*pGCS)(
"DATUM.SPHEROID.rf"));
384 ADD_CONT(
_TL(
"Extension" ), (*pGCS)(
"DATUM.EXTENSION"));
421 if( !m_Authority.
is_Empty() && !m_Authority.
CmpNoCase(Projection.m_Authority) && m_Code == Projection.m_Code )
426 if( !m_PROJ.
CmpNoCase(Projection.m_PROJ) )
434 #define CMP_CONTENT(a, b ) (a && b && a->Cmp_Content(b->Get_Content()))
435 #define CMP_PROPERTY(a, b, p) (a && b && a->Get_Property(p) && b->Cmp_Property(p, a->Get_Property(p), true))
436 #define CMP_PARAMETER(a, b ) (a && b && ((!a->Cmp_Name("PARAMETER") && !b->Cmp_Name("PARAMETER")) || CMP_PROPERTY(a, b, "name") && a->Cmp_Content(b->Get_Content())))
439 CSG_Projections::_WKT_to_MetaData( m_WKT1),
440 CSG_Projections::_WKT_to_MetaData(Projection.m_WKT1)
441 }, *pGCS[2] = { NULL, NULL };
446 if( !
CMP_CONTENT (
WKT[0](
"PROJECTION"),
WKT[1](
"PROJECTION") ) ) {
return(
false ); }
449 for(
int i=0; i<
WKT[0].Get_Children_Count() && i<
WKT[1].Get_Children_Count(); i++)
454 pGCS[0] =
WKT[0](
"GEOGCS");
455 pGCS[1] =
WKT[1](
"GEOGCS");
463 if( !pGCS[0] || !pGCS[1] )
468 if( !
CMP_CONTENT((*pGCS[0])(
"PRIMEM" ), (*pGCS[1])(
"PRIMEM" )) ) {
return(
false ); }
469 if( !
CMP_CONTENT((*pGCS[0])(
"UNIT" ), (*pGCS[1])(
"UNIT" )) ) {
return(
false ); }
470 if( !
CMP_CONTENT((*pGCS[0])(
"DATUM.SPHEROID.a" ), (*pGCS[1])(
"DATUM.SPHEROID.a" )) ) {
return(
false ); }
471 if( !
CMP_CONTENT((*pGCS[0])(
"DATUM.SPHEROID.rf"), (*pGCS[1])(
"DATUM.SPHEROID.rf")) ) {
return(
false ); }
473 if( (*pGCS[0])(
"DATUM.TOWGS84") || (*pGCS[1])(
"DATUM.TOWGS84") )
475 #define CMP_TOWGS84(id) (\
476 ((*pGCS[0])("DATUM.TOWGS84." id) ? (*pGCS[0])["DATUM.TOWGS84." id].Get_Content().asDouble() : 0.)\
477 == ((*pGCS[1])("DATUM.TOWGS84." id) ? (*pGCS[1])["DATUM.TOWGS84." id].Get_Content().asDouble() : 0.) )
488 if( (*pGCS[0])(
"DATUM.EXTENSION") || (*pGCS[1])(
"DATUM.EXTENSION") )
490 if( !
CMP_CONTENT((*pGCS[0])(
"DATUM.EXTENSION"), (*pGCS[1])(
"DATUM.EXTENSION")) ) {
return(
false ); }
562 return( Projection );
568 if( Zone < 1 || Zone > 60 )
573 int EPSG_ID = (bSouth ? 32700 : 32600) + Zone;
581 #define WKT_GCS_WGS84 "GEOGCS[\"WGS 84\",AUTHORITY[\"EPSG\",\"4326\"]],"\
582 "DATUM[\"WGS_1984\",AUTHORITY[\"EPSG\",\"6326\"]],"\
583 "SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],"\
584 "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"\
585 "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]"
589 WKT.Printf(
"PROJCS[\"WGS 84 / UTM zone %d%c\",%s"
590 "PROJECTION[\"Transverse_Mercator\"],AUTHORITY[\"EPSG\",\"%d\"]]"
591 "PARAMETER[\"latitude_of_origin\",0],"
592 "PARAMETER[\"central_meridian\",%d],"
593 "PARAMETER[\"scale_factor\",0.9996],"
594 "PARAMETER[\"false_easting\",500000],"
595 "PARAMETER[\"false_northing\",%d],"
596 "AXIS[\"Easting\",EAST],"
597 "AXIS[\"Northing\",NORTH],"
598 "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]",
647 #if defined(_SAGA_LINUX)
672 bool bResult =
Load(File_DB);
679 void CSG_Projections::_On_Construction(
void)
697 delete(m_pProjections);
745 if( Index >= 0 && Index < m_pProjections->
Get_Count() )
756 Projection.m_Name =
WKT.Get_Property(
"name");
758 Projection.m_Unit =
WKT(
"UNIT") &&
WKT[
"UNIT"].Get_Property(
"name") ?
759 Get_Unit(
WKT[
"UNIT"].Get_Property(
"name")) : ESG_Projection_Unit::Undefined;
762 return( Projection );
768 CSG_String Authority(_Authority && *_Authority ? _Authority :
SG_T(
"EPSG"));
786 CSG_String Authority(_Authority && *_Authority ? _Authority :
SG_T(
"EPSG"));
836 return( m_pProjections->
Save(File) );
856 bool bResult = pTool->
Execute();
875 if( Definition.
Find(
"+proj") == 0 )
881 if( WKT1 ) { *WKT1 =
WKT ; }
882 if( PROJ ) { *PROJ = Definition; }
895 if(
WKT.Get_Property(
"authority_name", Authority) &&
WKT.Get_Property(
"authority_code", Code)
898 if( WKT1 ) { *WKT1 = Projection.
Get_WKT1(); }
899 if( WKT2 ) { *WKT2 = Projection.
Get_WKT2(); }
900 if( PROJ ) { *PROJ = Projection.
Get_PROJ(); }
901 if( ESRI ) { *ESRI = Projection.
Get_ESRI(); }
911 if( WKT1 ) { *WKT1 = Definition; }
912 if( PROJ ) { *PROJ = Proj4 ; }
923 if( WKT1 ) { *WKT1 = Projection.
Get_WKT1(); }
924 if( WKT2 ) { *WKT2 = Projection.
Get_WKT2(); }
925 if( PROJ ) { *PROJ = Projection.
Get_PROJ(); }
926 if( ESRI ) { *ESRI = Projection.
Get_ESRI(); }
942 bool CSG_Projections::_EPSG_to_Proj4(
CSG_String &Proj4,
int EPSG_Code)
const
954 Proj4.
Printf(
"+init=epsg:%d ", EPSG_Code);
960 bool CSG_Projections::_EPSG_to_WKT(
CSG_String &WKT,
int EPSG_Code)
const
997 !
WKT.BeforeFirst(
'[').Cmp(
"PROJCS") ? ESG_CRS_Type::Projection :
998 !
WKT.BeforeFirst(
'[').Cmp(
"GEOGCS") ? ESG_CRS_Type::Geographic :
1007 WKT.AfterFirst(
'\"').BeforeFirst(
'\"').c_str()
1010 else if( Type == _Type )
1015 WKT.AfterFirst(
'\"').BeforeFirst(
'\"').c_str()
1033 for(
int i=0, l=-1; l!=0 && i<(int)
WKT.Length(); i++)
1039 default : Key +=
WKT[i];
break;
1041 case '[':
case '(': l = 1 ;
break;
1042 case ')':
case ']':
return(
false );
1051 default : bAdd =
true;
break;
1052 case '\"' : bAdd =
false;
break;
1053 case '[' :
case '(': bAdd = ++l > 1;
break;
1054 case ']' :
case ')': bAdd = l-- > 1;
break;
1055 case ',' :
if( !(bAdd = l > 1) ) Content.
Add(
"");
break;
1065 if( Key.
is_Empty() || Content[0].is_Empty() )
1071 if( !Key.
Cmp(
"AUTHORITY") && Content.
Get_Count() == 2 )
1092 || (!Key.
Cmp(
"PARAMETER" ) && Content.
Get_Count() >= 2) )
1099 if( (!Key.
Cmp(
"SPHEROID" ) && Content.
Get_Count() >= 3) )
1106 if( (!Key.
Cmp(
"TOWGS84" ) && Content.
Get_Count() >= 7) )
1117 if( (!Key.
Cmp(
"EXTENSION" ) && Content.
Get_Count() >= 2) )
1123 if( (!Key.
Cmp(
"PROJECTION") && Content.
Get_Count() >= 1) )
1129 for(
int i=0; i<Content.
Get_Count(); i++)
1131 _WKT_to_MetaData(*pKey, Content[i]);
1142 _WKT_to_MetaData(MetaData,
WKT);
1167 if(
WKT.Cmp_Property(
"name",
"WGS84") )
1169 Proj4 +=
" +datum=WGS84";
1176 if( !
WKT(
"SPHEROID") ||
WKT[
"SPHEROID"].Get_Children_Count() != 2
1177 || !
WKT[
"SPHEROID"][0].Get_Content().asDouble(a) || a <= 0.
1178 || !
WKT[
"SPHEROID"][1].Get_Content().asDouble(b) || b < 0. )
1183 b = b > 0. ? a - a / b : a;
1188 if(
WKT(
"TOWGS84") &&
WKT[
"TOWGS84"].Get_Children_Count() == 7 )
1190 Proj4 +=
" +towgs84=";
1192 for(
int i=0; i<7; i++)
1199 Proj4 +=
WKT[
"TOWGS84"][i].Get_Content();
1219 int Authority_Code;
CSG_String Authority_Name;
1222 && m.
Get_Property(
"authority_code", Authority_Code) && _EPSG_to_Proj4(Proj4, Authority_Code) )
1241 if( !m(
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"DATUM"]) )
1246 if( m(
"PRIMEM") && m[
"PRIMEM"].Get_Content().asDouble(d) && d != 0. )
1265 Proj4 =
"+proj=longlat";
1267 if( !m(
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"DATUM"]) )
1272 if( m(
"PRIMEM") && m[
"PRIMEM"].Get_Content().asDouble(d) && d != 0. )
1290 if( m.
Cmp_Name(
"PROJCS") && m(
"GEOGCS") && m(
"PROJECTION") && m_WKT_to_Proj4.
Get_Translation(m[
"PROJECTION"].Get_Content(), Proj4) )
1292 if( m[
"PROJECTION"].Cmp_Content(
"Transverse_Mercator") )
1294 double Scale = -1., Easting = -1., Northing = -1., Meridian = -1., Latitude = -1.;
1298 if( m[i].Cmp_Name(
"PARAMETER") )
1302 if( m[i].Cmp_Property(
"name",
"central_meridian" ,
true) && m[i].Get_Content().asDouble(v) ) Meridian = v;
1303 if( m[i].Cmp_Property(
"name",
"latitude_of_origin",
true) && m[i].Get_Content().asDouble(v) ) Latitude = v;
1304 if( m[i].Cmp_Property(
"name",
"scale_factor" ,
true) && m[i].Get_Content().asDouble(v) ) Scale = v;
1305 if( m[i].Cmp_Property(
"name",
"false_easting" ,
true) && m[i].Get_Content().asDouble(v) ) Easting = v;
1306 if( m[i].Cmp_Property(
"name",
"false_northing" ,
true) && m[i].Get_Content().asDouble(v) ) Northing = v;
1310 if( Latitude == 0. && Scale == 0.9996 && Easting == 500000. && (Northing == 0. || Northing == 10000000.) )
1312 Proj4 =
"+proj=utm";
1314 if( !m[
"GEOGCS"](
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"GEOGCS"][
"DATUM"]) )
1321 if( Northing == 10000000. )
1333 Proj4 =
"+proj=" + Proj4;
1335 if( !m[
"GEOGCS"](
"DATUM") || !_WKT_to_Proj4_Set_Datum(Proj4, m[
"GEOGCS"][
"DATUM"]) )
1340 if( m(
"PRIMEM") && m[
"PRIMEM"].Get_Content().asDouble(d) && d != 0. )
1347 if( m[i].Cmp_Name(
"PARAMETER") )
1351 if( m_WKT_to_Proj4.
Get_Translation(m[i].Get_Property(
"name"), Parameter) )
1353 Proj4 +=
" +" + Parameter +
"=" + m[i].
Get_Content();
1362 if( m(
"UNIT") && m[
"UNIT"].Get_Content().asDouble(d) && d != 0. && d != 1. )
1384 return( Proj4.
Find(
"+" + Key) >= 0 );
1392 int l, i = Proj4.
Find(
"+" + Key +
"=");
1396 for(++i, l=0; l<2 && i<(int)Proj4.
Length(); i++)
1400 case '=': l++;
break;
1401 case '+': l=2;
break;
1402 case ' ': l=2;
break;
1412 return( Value.
Length() > 0 );
1418 const char ellipsoid[42][2][32] =
1420 {
"MERIT" ,
"6378137.0,298.257" },
1421 {
"SGS85" ,
"6378136.0,298.257" },
1422 {
"GRS80" ,
"6378137.0,298.2572221" },
1423 {
"IAU76" ,
"6378140.0,298.257" },
1424 {
"airy" ,
"6377563.396,299.3249753" },
1425 {
"APL4.9" ,
"6378137.0,298.25" },
1426 {
"NWL9D" ,
"6378145.0,298.25" },
1427 {
"mod_airy" ,
"6377340.189,299.3249374" },
1428 {
"andrae" ,
"6377104.43,300" },
1429 {
"aust_SA" ,
"6378160.0,298.25" },
1430 {
"GRS67" ,
"6378160.0,298.2471674" },
1431 {
"bessel" ,
"6377397.155,299.1528128" },
1432 {
"bess_nam" ,
"6377483.865,299.1528128" },
1433 {
"clrk66" ,
"6378206.4,294.9786982" },
1434 {
"clrk80" ,
"6378249.145,293.4663" },
1435 {
"CPM" ,
"6375738.7,334.29" },
1436 {
"delmbr" ,
"6376428.0,311.5" },
1437 {
"engelis" ,
"6378136.05,298.2566" },
1438 {
"evrst30" ,
"6377276.345,300.8017" },
1439 {
"evrst48" ,
"6377304.063,300.8017" },
1440 {
"evrst56" ,
"6377301.243,300.8017" },
1441 {
"evrst69" ,
"6377295.664,300.8017" },
1442 {
"evrstSS" ,
"6377298.556,300.8017" },
1443 {
"fschr60" ,
"6378166.0,298.3" },
1444 {
"fschr60m" ,
"6378155.0,298.3" },
1445 {
"fschr68" ,
"6378150.0,298.3" },
1446 {
"helmert" ,
"6378200.0,298.3" },
1447 {
"hough" ,
"6378270.0,297" },
1448 {
"intl" ,
"6378388.0,297" },
1449 {
"krass" ,
"6378245.0,298.3" },
1450 {
"kaula" ,
"6378163.0,298.24" },
1451 {
"lerch" ,
"6378139.0,298.257" },
1452 {
"mprts" ,
"6397300.0,191" },
1453 {
"new_intl" ,
"6378157.5,298.2496154" },
1454 {
"plessis" ,
"6376523.0,308.6409971" },
1455 {
"SEasia" ,
"6378155.0,298.3000002" },
1456 {
"walbeck" ,
"6376896.0,302.7800002" },
1457 {
"WGS60" ,
"6378165.0,298.3" },
1458 {
"WGS66" ,
"6378145.0,298.25" },
1459 {
"WGS72" ,
"6378135.0,298.26" },
1460 {
"WGS84" ,
"6378137.0,298.2572236" },
1461 {
"sphere" ,
"6370997.0,-1" }
1465 if( _Proj4_Read_Parameter(Value, Proj4,
"ellps") )
1467 for(
int i=0; i<42; i++)
1479 double a = _Proj4_Read_Parameter(Value, Proj4,
"a" ) && Value.
asDouble(a) ? a : 6378137.;
1481 double b = _Proj4_Read_Parameter(Value, Proj4,
"b" ) && Value.
asDouble(b) ? a / (a - b)
1482 : _Proj4_Read_Parameter(Value, Proj4,
"rf") && Value.
asDouble(b) ? b
1483 : _Proj4_Read_Parameter(Value, Proj4,
"f" ) && Value.
asDouble(b) ? 1. / b
1484 : _Proj4_Read_Parameter(Value, Proj4,
"e" ) && Value.
asDouble(b) ? a / (a - sqrt(b*b - a*a))
1485 : _Proj4_Read_Parameter(Value, Proj4,
"es") && Value.
asDouble(b) ? a / (a - sqrt( b - a*a))
1496 const char datum[9][3][64] =
1498 {
"WGS84" ,
"WGS84" ,
"0,0,0,0,0,0,0" },
1499 {
"GGRS87" ,
"GRS80" ,
"-199.87,74.79,246.62,0,0,0,0" },
1500 {
"NAD83" ,
"GRS80" ,
"0,0,0,0,0,0,0" },
1502 {
"potsdam" ,
"bessel" ,
"606.0,23.0,413.0,0,0,0,0" },
1503 {
"carthage" ,
"clark80" ,
"-263.0,6.0,431.0,0,0,0,0" },
1504 {
"hermannskogel" ,
"bessel" ,
"653.0,-212.0,449.0,0,0,0,0" },
1505 {
"ire65" ,
"mod_airy" ,
"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15" },
1506 {
"nzgd49" ,
"intl" ,
"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993" },
1507 {
"OSGB36" ,
"airy" ,
"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894" }
1513 if( _Proj4_Read_Parameter(Value, Proj4,
"datum") )
1515 for(
int i=0; i<9; i++)
1527 if( _Proj4_Get_Ellipsoid(Spheroid, Proj4) )
1529 Value =
"DATUM[\"Datum\","+ Spheroid;
1531 if( _Proj4_Read_Parameter(ToWGS84, Proj4,
"towgs84") )
1537 ToWGS84 +=
",0,0,0,0";
1540 Value +=
",TOWGS84[" + ToWGS84 +
"]";
1544 Value +=
",TOWGS84[0,0,0,0,0,0,0]";
1553 Value =
"DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563],TOWGS84[0,0,0,0,0,0,0]]";
1561 const char meridian[12][2][16] =
1563 {
"lisbon" ,
"-9.131906111" },
1564 {
"paris" ,
"2.337229167" },
1565 {
"bogota" ,
"74.08091667" },
1566 {
"madrid" ,
"-3.687911111" },
1567 {
"rome" ,
"12.45233333" },
1568 {
"bern" ,
"7.439583333" },
1569 {
"jakarta" ,
"106.8077194" },
1570 {
"ferro" ,
"-17.66666667" },
1571 {
"brussels" ,
"4.367975" },
1572 {
"stockholm" ,
"18.05827778" },
1573 {
"athens" ,
"23.7163375" },
1574 {
"oslo" ,
"10.72291667" }
1578 if( _Proj4_Read_Parameter(Value, Proj4,
"pm") )
1580 for(
int i=0; i<12; i++)
1594 Value.
Printf(
"PRIMEM[\"Prime_Meridian\",%f]", d);
1601 Value =
"PRIMEM[\"Greenwich\",0]";
1611 if( Unit != ESG_Projection_Unit::Undefined )
1621 if( _Proj4_Read_Parameter(Value, Proj4,
"to_meter") && Value.
asDouble(d) && d > 0. && d != 1. )
1623 Value.
Printf(
"UNIT[\"Unit\",%f]", d);
1629 Value =
"UNIT[\"metre\",1]";
1641 if( !_Proj4_Read_Parameter(ProjCS, Proj4,
"proj") )
1662 WKT =
"GEOGCS[\"GCS\"";
1664 if( _Proj4_Get_Datum (Value, Proj4) ) {
WKT +=
"," + Value; }
1665 if( _Proj4_Get_Prime_Meridian(Value, Proj4) ) {
WKT +=
"," + Value; }
1666 if( _Proj4_Get_Unit (Value, Proj4) ) {
WKT +=
"," + Value; }
1687 if( _Proj4_Get_Datum (Value, Proj4) ) { GeogCS +=
"," + Value; }
1688 if( _Proj4_Get_Prime_Meridian(Value, Proj4) ) { GeogCS +=
"," + Value; }
1689 if( _Proj4_Get_Unit (Value, Proj4) ) { GeogCS +=
"," + Value; }
else { GeogCS +=
"UNIT[\"degree\",0.01745329251994328]"; }
1725 if( !_Proj4_Read_Parameter(Value, Proj4,
"zone") || !Value.
asDouble(Zone) )
1732 bool South = _Proj4_Find_Parameter(Proj4,
"south");
1734 WKT =
CSG_String::Format(
"PROJCS[\"UTM zone %d%c\",%s,PROJECTION[Transverse_Mercator]", (
int)Zone, South ?
'S' :
'N', GeogCS.
c_str());
1741 WKT +=
",UNIT[\"metre\",1]]";
1753 while( ProjCS.
Find(
'+') >= 0 )
1764 if( Value.
Find(
'+') >= 0 )
1769 WKT +=
",PARAMETER[\"" + Key +
"\"," + Value +
"]";
1776 if( _Proj4_Get_Unit(Value, Proj4) ) {
WKT +=
"," + Value; }
1794 if( !Identifier.
CmpNoCase(
"PROJCS") ) {
return( ESG_CRS_Type::Projection ); }
1795 if( !Identifier.
CmpNoCase(
"GEOGCS") ) {
return( ESG_CRS_Type::Geographic ); }
1796 if( !Identifier.
CmpNoCase(
"GEOCCS") ) {
return( ESG_CRS_Type::Geocentric ); }
1806 case ESG_CRS_Type::Projection:
return(
"PROJCS" );
1807 case ESG_CRS_Type::Geographic:
return(
"GEOGCS" );
1808 case ESG_CRS_Type::Geocentric:
return(
"GEOCCS" );
1809 default :
return(
"UNDEFINED" );
1818 case ESG_CRS_Type::Projection:
return(
_TL(
"Projected Coordinate System" ) );
1819 case ESG_CRS_Type::Geographic:
return(
_TL(
"Geographic Coordinate System") );
1820 case ESG_CRS_Type::Geocentric:
return(
_TL(
"Geocentric Coordinate System") );
1821 default :
return(
_TL(
"Undefined Coordinate System" ) );
1828 for(
int i=0; i<(int)ESG_Projection_Unit::Undefined; i++)
1839 return( !Identifier.
CmpNoCase(
"metre") ? ESG_Projection_Unit::Meter : ESG_Projection_Unit::Undefined );
1847 case ESG_Projection_Unit::Kilometer :
return(
"km" );
1848 case ESG_Projection_Unit::Meter :
return(
"m" );
1849 case ESG_Projection_Unit::Decimeter :
return(
"dm" );
1850 case ESG_Projection_Unit::Centimeter :
return(
"cm" );
1851 case ESG_Projection_Unit::Millimeter :
return(
"mm" );
1852 case ESG_Projection_Unit::Int_Nautical_Mile:
return(
"kmi" );
1853 case ESG_Projection_Unit::Int_Inch :
return(
"in" );
1854 case ESG_Projection_Unit::Int_Foot :
return(
"ft" );
1855 case ESG_Projection_Unit::Int_Yard :
return(
"yd" );
1856 case ESG_Projection_Unit::Int_Statute_Mile :
return(
"mi" );
1857 case ESG_Projection_Unit::Int_Fathom :
return(
"fath" );
1858 case ESG_Projection_Unit::Int_Chain :
return(
"ch" );
1859 case ESG_Projection_Unit::Int_Link :
return(
"link" );
1860 case ESG_Projection_Unit::US_Inch :
return(
"us-in" );
1861 case ESG_Projection_Unit::US_Foot :
return(
"us-ft" );
1862 case ESG_Projection_Unit::US_Yard :
return(
"us-yd" );
1863 case ESG_Projection_Unit::US_Chain :
return(
"us-ch" );
1864 case ESG_Projection_Unit::US_Statute_Mile :
return(
"us-mi" );
1865 case ESG_Projection_Unit::Indian_Yard :
return(
"ind-yd" );
1866 case ESG_Projection_Unit::Indian_Foot :
return(
"ind-ft" );
1867 case ESG_Projection_Unit::Indian_Chain :
return(
"ind-ch" );
1868 default:
return(
"" );
1877 case ESG_Projection_Unit::Kilometer :
return( bSimple ?
"Kilometers" :
"Kilometer" );
1878 case ESG_Projection_Unit::Meter :
return( bSimple ?
"Meters" :
"Meter" );
1879 case ESG_Projection_Unit::Decimeter :
return( bSimple ?
"Decimeters" :
"Decimeter" );
1880 case ESG_Projection_Unit::Centimeter :
return( bSimple ?
"Centimeters" :
"Centimeter" );
1881 case ESG_Projection_Unit::Millimeter :
return( bSimple ?
"Millimeters" :
"Millimeter" );
1882 case ESG_Projection_Unit::Int_Nautical_Mile:
return( bSimple ?
"Miles" :
"International Nautical Mile" );
1883 case ESG_Projection_Unit::Int_Inch :
return( bSimple ?
"Inches" :
"International Inch" );
1884 case ESG_Projection_Unit::Int_Foot :
return( bSimple ?
"Feet" :
"International Foot" );
1885 case ESG_Projection_Unit::Int_Yard :
return( bSimple ?
"Yards" :
"International Yard" );
1886 case ESG_Projection_Unit::Int_Statute_Mile :
return( bSimple ?
"Miles" :
"International Statute Mile" );
1887 case ESG_Projection_Unit::Int_Fathom :
return( bSimple ?
"Fathoms" :
"International Fathom" );
1888 case ESG_Projection_Unit::Int_Chain :
return( bSimple ?
"Chains" :
"International Chain" );
1889 case ESG_Projection_Unit::Int_Link :
return( bSimple ?
"Links" :
"International Link" );
1890 case ESG_Projection_Unit::US_Inch :
return( bSimple ?
"Inches" :
"U.S. Surveyor's Inch" );
1891 case ESG_Projection_Unit::US_Foot :
return( bSimple ?
"Feet" :
"U.S. Surveyor's Foot" );
1892 case ESG_Projection_Unit::US_Yard :
return( bSimple ?
"Yards" :
"U.S. Surveyor's Yard" );
1893 case ESG_Projection_Unit::US_Chain :
return( bSimple ?
"Chains" :
"U.S. Surveyor's Chain" );
1894 case ESG_Projection_Unit::US_Statute_Mile :
return( bSimple ?
"Miles" :
"U.S. Surveyor's Statute Mile" );
1895 case ESG_Projection_Unit::Indian_Yard :
return( bSimple ?
"Yards" :
"Indian Yard" );
1896 case ESG_Projection_Unit::Indian_Foot :
return( bSimple ?
"Feet" :
"Indian Foot" );
1897 case ESG_Projection_Unit::Indian_Chain :
return( bSimple ?
"Chains" :
"Indian Chain" );
1898 default:
return(
"" );
1907 case ESG_Projection_Unit::Kilometer :
return( 1000. );
1908 case ESG_Projection_Unit::Meter :
return( 1. );
1909 case ESG_Projection_Unit::Decimeter :
return( 0.1 );
1910 case ESG_Projection_Unit::Centimeter :
return( 0.01 );
1911 case ESG_Projection_Unit::Millimeter :
return( 0.001 );
1912 case ESG_Projection_Unit::Int_Nautical_Mile:
return( 1852. );
1913 case ESG_Projection_Unit::Int_Inch :
return( 0.0254 );
1914 case ESG_Projection_Unit::Int_Foot :
return( 0.3048 );
1915 case ESG_Projection_Unit::Int_Yard :
return( 0.9144 );
1916 case ESG_Projection_Unit::Int_Statute_Mile :
return( 1609.344 );
1917 case ESG_Projection_Unit::Int_Fathom :
return( 1.8288 );
1918 case ESG_Projection_Unit::Int_Chain :
return( 20.1168 );
1919 case ESG_Projection_Unit::Int_Link :
return( 0.201168 );
1920 case ESG_Projection_Unit::US_Inch :
return( 1. / 39.37 );
1921 case ESG_Projection_Unit::US_Foot :
return( 0.304800609601219 );
1922 case ESG_Projection_Unit::US_Yard :
return( 0.914401828803658 );
1923 case ESG_Projection_Unit::US_Chain :
return( 20.11684023368047 );
1924 case ESG_Projection_Unit::US_Statute_Mile :
return( 1609.347218694437 );
1925 case ESG_Projection_Unit::Indian_Yard :
return( 0.91439523 );
1926 case ESG_Projection_Unit::Indian_Foot :
return( 0.30479841 );
1927 case ESG_Projection_Unit::Indian_Chain :
return( 20.11669506 );
1928 default :
return( 1. );
1940 bool CSG_Projections::_Set_Dictionary(
CSG_Table &Dictionary,
int Direction)
1942 const char Translation[][4][128] = {
1946 {
"aea" ,
" ",
"Albers_Conic_Equal_Area" ,
"Albers Equal Area" },
1947 {
"aea" ,
"<",
"Albers" ,
"[ESRI] Albers Equal Area" },
1948 {
"aeqd" ,
" ",
"Azimuthal_Equidistant" ,
"Azimuthal Equidistant" },
1949 {
"airy" ,
" ",
"Airy 1830" ,
"Airy 1830" },
1950 {
"aitoff" ,
" ",
"Sphere_Aitoff" ,
"Aitoff" },
1951 {
"alsk" ,
" ",
"Mod_Stererographics_of_Alaska" ,
"*) Mod. Stererographics of Alaska" },
1952 {
"Amersfoort" ,
"<",
"D_Amersfoort" ,
"[ESRI] datum RD_NEW" },
1953 {
"Amersfoort" ,
"<",
"GCS_Amersfoort" ,
"[ESRI] GCS RD_NEW" },
1954 {
"Amersfoort / RD New",
"<",
"Amersfoort_RD_New" ,
"[ESRI] RD_NEW" },
1955 {
"apian" ,
" ",
"Apian_Globular_I" ,
"*) Apian Globular I" },
1956 {
"august" ,
" ",
"August_Epicycloidal" ,
"*) August Epicycloidal" },
1957 {
"bacon" ,
" ",
"Bacon_Globular" ,
"*) Bacon Globular" },
1958 {
"bipc" ,
" ",
"Bipolar_conic_of_western_hemisphere" ,
"*) Bipolar conic of western hemisphere" },
1959 {
"boggs" ,
" ",
"Boggs_Eumorphic" ,
"*) Boggs Eumorphic" },
1960 {
"bonne" ,
" ",
"Bonne" ,
"Bonne (Werner lat_1=90)" },
1961 {
"cass" ,
" ",
"Cassini_Soldner" ,
"Cassini" },
1962 {
"cass" ,
"<",
"Cassini" ,
"[ESRI] Cassini" },
1963 {
"cc" ,
" ",
"Central_Cylindrical" ,
"*) Central Cylindrical" },
1964 {
"cea" ,
" ",
"Cylindrical_Equal_Area" ,
"Equal Area Cylindrical, alias: Lambert Cyl.Eq.A., Normal Authalic Cyl. (FME), Behrmann (SP=30), Gall Orthogr. (SP=45)" },
1965 {
"cea" ,
"<",
"Behrmann" ,
"[ESRI] Behrmann (standard parallel = 30)" },
1966 {
"chamb" ,
" ",
"Chamberlin_Trimetric" ,
"*) Chamberlin Trimetric" },
1967 {
"collg" ,
" ",
"Collignon" ,
"*) Collignon" },
1968 {
"crast" ,
" ",
"Craster_Parabolic" ,
"[ESRI] Craster Parabolic (Putnins P4)" },
1969 {
"denoy" ,
" ",
"Denoyer_Semi_Elliptical" ,
"*) Denoyer Semi-Elliptical" },
1970 {
"eck1" ,
" ",
"Eckert_I" ,
"*) Eckert I" },
1971 {
"eck2" ,
" ",
"Eckert_II" ,
"*) Eckert II" },
1972 {
"eck3" ,
" ",
"Eckert_III" ,
"*) Eckert III" },
1973 {
"eck4" ,
" ",
"Eckert_IV" ,
"Eckert IV" },
1974 {
"eck5" ,
" ",
"Eckert_V" ,
"*) Eckert V" },
1975 {
"eck6" ,
" ",
"Eckert_VI" ,
"Eckert VI" },
1976 {
"eqearth" ,
" ",
"Equal_Earth" ,
"*) Equal Earth" },
1977 {
"eqc" ,
" ",
"Equirectangular" ,
"Equidistant Cylindrical (Plate Caree)" },
1978 {
"eqc" ,
"<",
"Equidistant_Cylindrical" ,
"[ESRI] Equidistant Cylindrical (Plate Caree)" },
1979 {
"eqc" ,
"<",
"Plate_Carree" ,
"[ESRI] Equidistant Cylindrical (Plate Caree)" },
1980 {
"eqdc" ,
" ",
"Equidistant_Conic" ,
"*) Equidistant Conic" },
1981 {
"euler" ,
" ",
"Euler" ,
"*) Euler" },
1982 {
"etmerc" ,
" ",
"Extended_Transverse_Mercator" ,
"*) Extended Transverse Mercator" },
1983 {
"fahey" ,
" ",
"Fahey" ,
"*) Fahey" },
1984 {
"fouc" ,
" ",
"Foucault" ,
"*) Foucaut" },
1985 {
"fouc_s" ,
" ",
"Foucault_Sinusoidal" ,
"*) Foucaut Sinusoidal" },
1986 {
"gall" ,
" ",
"Gall_Stereographic" ,
"Gall (Gall Stereographic)" },
1987 {
"geocent" ,
" ",
"Geocentric" ,
"*) Geocentric" },
1988 {
"geos" ,
" ",
"GEOS" ,
"Geostationary Satellite View" },
1989 {
"gins8" ,
" ",
"Ginsburg_VIII" ,
"*) Ginsburg VIII (TsNIIGAiK)" },
1990 {
"gn_sinu" ,
" ",
"General_Sinusoidal_Series" ,
"*) General Sinusoidal Series" },
1991 {
"gnom" ,
" ",
"Gnomonic" ,
"Gnomonic" },
1992 {
"goode" ,
" ",
"Goode_Homolosine" ,
"*) Goode Homolosine" },
1993 {
"gs48" ,
" ",
"Mod_Stererographics_48" ,
"*) Mod. Stererographics of 48 U.S." },
1994 {
"gs50" ,
" ",
"Mod_Stererographics_50" ,
"*) Mod. Stererographics of 50 U.S." },
1995 {
"hammer" ,
" ",
"Hammer_Eckert_Greifendorff" ,
"*) Hammer & Eckert-Greifendorff" },
1996 {
"hatano" ,
" ",
"Hatano_Asymmetrical_Equal_Area" ,
"*) Hatano Asymmetrical Equal Area" },
1997 {
"igh" ,
" ",
"Interrupted_Goodes_Homolosine" ,
"*) Interrupted Goode's Homolosine" },
1998 {
"igh_o" ,
" ",
"Interrupted_Goodes_Homolosine_Ocean" ,
"*) Interrupted Goode's Homolosine (Ocean)" },
1999 {
"imw_p" ,
" ",
"International_Map_of_the_World_Polyconic" ,
"*) International Map of the World Polyconic" },
2000 {
"kav5" ,
" ",
"Kavraisky_V" ,
"*) Kavraisky V" },
2001 {
"kav7" ,
" ",
"Kavraisky_VII" ,
"*) Kavraisky VII" },
2002 {
"krovak" ,
" ",
"Krovak" ,
"Krovak" },
2003 {
"labrd" ,
" ",
"Laborde_Oblique_Mercator" ,
"*) Laborde" },
2004 {
"laea" ,
" ",
"Lambert_Azimuthal_Equal_Area" ,
"Lambert Azimuthal Equal Area" },
2005 {
"lagrng" ,
" ",
"Lagrange" ,
"*) Lagrange" },
2006 {
"larr" ,
" ",
"Larrivee" ,
"*) Larrivee" },
2007 {
"lask" ,
" ",
"Laskowski" ,
"*) Laskowski" },
2008 {
"lcc" ,
"<",
"Lambert_Conformal_Conic_1SP" ,
"Lambert Conformal Conic (1 standard parallel)" },
2009 {
"lcc" ,
"<",
"Lambert_Conformal_Conic_2SP" ,
"Lambert Conformal Conic (2 standard parallels)" },
2010 {
"lcc" ,
" ",
"Lambert_Conformal_Conic" ,
"Lambert Conformal Conic" },
2011 {
"lcca" ,
" ",
"Lambert_Conformal_Conic_Alternative" ,
"*) Lambert Conformal Conic Alternative" },
2012 {
"leac" ,
" ",
"Lambert_Equal_Area_Conic" ,
"*) Lambert Equal Area Conic" },
2013 {
"lee_os" ,
" ",
"Lee_Oblated_Stereographic" ,
"*) Lee Oblated Stereographic" },
2014 {
"loxim" ,
" ",
"Loximuthal" ,
"[ESRI] Loximuthal" },
2015 {
"lsat" ,
" ",
"Space_oblique_for_LANDSAT" ,
"*) Space oblique for LANDSAT" },
2016 {
"mbt_s" ,
" ",
"McBryde_Thomas_Flat_Polar_Sine" ,
"*) McBryde-Thomas Flat-Polar Sine" },
2017 {
"mbt_fps" ,
" ",
"McBryde_Thomas_Flat_Polar_Sine_2" ,
"*) McBryde-Thomas Flat-Pole Sine (No. 2)" },
2018 {
"mbtfpp" ,
" ",
"McBryde_Thomas_Flat_Polar_Parabolic" ,
"*) McBride-Thomas Flat-Polar Parabolic" },
2019 {
"mbtfpq" ,
" ",
"Flat_Polar_Quartic" ,
"[ESRI] McBryde-Thomas Flat-Polar Quartic" },
2020 {
"mbtfps" ,
" ",
"McBryde_Thomas_Flat_Polar_Sinusoidal" ,
"*) McBryde-Thomas Flat-Polar Sinusoidal" },
2021 {
"merc" ,
" ",
"Mercator" ,
"[ESRI] Mercator" },
2022 {
"merc" ,
"<",
"Mercator_1SP" ,
"Mercator (1 standard parallel)" },
2023 {
"merc" ,
"<",
"Mercator_2SP" ,
"Mercator (2 standard parallels)" },
2024 {
"mil_os" ,
" ",
"Miller_Oblated_Stereographic" ,
"*) Miller Oblated Stereographic" },
2025 {
"mill" ,
" ",
"Miller_Cylindrical" ,
"Miller Cylindrical" },
2026 {
"moll" ,
" ",
"Mollweide" ,
"Mollweide" },
2027 {
"murd1" ,
" ",
"Murdoch_I" ,
"*) Murdoch I" },
2028 {
"murd2" ,
" ",
"Murdoch_II" ,
"*) Murdoch II" },
2029 {
"murd3" ,
" ",
"Murdoch_III" ,
"*) Murdoch III" },
2030 {
"nell" ,
" ",
"Nell" ,
"*) Nell" },
2031 {
"nell_h" ,
" ",
"Nell_Hammer" ,
"*) Nell-Hammer" },
2032 {
"nicol" ,
" ",
"Nicolosi_Globular" ,
"*) Nicolosi Globular" },
2033 {
"nsper" ,
" ",
"Near_sided_perspective" ,
"*) Near-sided perspective" },
2034 {
"nzmg" ,
" ",
"New_Zealand_Map_Grid" ,
"New Zealand Map Grid" },
2035 {
"ob_tran" ,
" ",
"General_Oblique_Transformation" ,
"*) General Oblique Transformation" },
2036 {
"ocea" ,
" ",
"Oblique_Cylindrical_Equal_Area" ,
"*) Oblique Cylindrical Equal Area" },
2037 {
"oea" ,
" ",
"Oblated_Equal_Area" ,
"*) Oblated Equal Area" },
2038 {
"omerc" ,
" ",
"Hotine_Oblique_Mercator" ,
"Oblique Mercator" },
2039 {
"omerc" ,
"<",
"Oblique_Mercator" ,
"Oblique Mercator" },
2040 {
"ortel" ,
" ",
"Ortelius_Oval" ,
"*) Ortelius Oval" },
2041 {
"ortho" ,
" ",
"Orthographic" ,
"Orthographic (ESRI: World from Space)" },
2042 {
"pconic" ,
" ",
"Perspective_Conic" ,
"*) Perspective Conic" },
2043 {
"poly" ,
" ",
"Polyconic" ,
"*) Polyconic (American)" },
2044 {
"putp1" ,
" ",
"Putnins_P1" ,
"*) Putnins P1" },
2045 {
"putp2" ,
" ",
"Putnins_P2" ,
"*) Putnins P2" },
2046 {
"putp3" ,
" ",
"Putnins_P3" ,
"*) Putnins P3" },
2047 {
"putp3p" ,
" ",
"Putnins_P3'" ,
"*) Putnins P3'" },
2048 {
"putp4p" ,
" ",
"Putnins_P4'" ,
"*) Putnins P4'" },
2049 {
"putp5" ,
" ",
"Putnins_P5" ,
"*) Putnins P5" },
2050 {
"putp5p" ,
" ",
"Putnins_P5'" ,
"*) Putnins P5'" },
2051 {
"putp6" ,
" ",
"Putnins_P6" ,
"*) Putnins P6" },
2052 {
"putp6p" ,
" ",
"Putnins_P6'" ,
"*) Putnins P6'" },
2053 {
"qua_aut" ,
" ",
"Quartic_Authalic" ,
"[ESRI] Quart c Authalic" },
2054 {
"robin" ,
" ",
"Robinson" ,
"Robinson" },
2055 {
"rouss" ,
" ",
"Roussilhe_Stereographic" ,
"*) Roussilhe Stereographic" },
2056 {
"rpoly" ,
" ",
"Rectangular_Polyconic" ,
"*) Rectangular Polyconic" },
2057 {
"sinu" ,
" ",
"Sinusoidal" ,
"Sinusoidal (Sanson-Flamsteed)" },
2058 {
"somerc" ,
" ",
"Hotine_Oblique_Mercator" ,
"Swiss Oblique Mercator" },
2059 {
"somerc" ,
"<",
"Swiss_Oblique_Cylindrical" ,
"Swiss Oblique Cylindrical" },
2060 {
"somerc" ,
"<",
"Hotine_Oblique_Mercator_Azimuth_Center" ,
"[ESRI] Swiss Oblique Mercator/Cylindrical" },
2061 {
"stere" ,
"<",
"Polar_Stereographic" ,
"Stereographic" },
2062 {
"stere" ,
" ",
"Stereographic" ,
"[ESRI] Stereographic" },
2063 {
"sterea" ,
" ",
"Oblique_Stereographic" ,
"Oblique Stereographic Alternative" },
2064 {
"sterea" ,
"<",
"Double_Stereographic" ,
"[ESRI]" },
2065 {
"gstmerc" ,
" ",
"Gauss_Schreiber_Transverse_Mercator" ,
"*) Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)" },
2066 {
"tcc" ,
" ",
"Transverse_Central_Cylindrical" ,
"*) Transverse Central Cylindrical" },
2067 {
"tcea" ,
" ",
"Transverse_Cylindrical_Equal_Area" ,
"*) Transverse Cylindrical Equal Area" },
2068 {
"tissot" ,
" ",
"Tissot_Conic" ,
"*) Tissot Conic" },
2069 {
"tmerc" ,
" ",
"Transverse_Mercator" ,
"*) Transverse Mercator" },
2070 {
"tmerc" ,
"<",
"Gauss_Kruger" ,
"[ESRI] DHDN" },
2071 {
"tpeqd" ,
" ",
"Two_Point_Equidistant" ,
"*) Two Point Equidistant" },
2072 {
"tpers" ,
" ",
"Tilted_perspective" ,
"*) Tilted perspective" },
2073 {
"ups" ,
" ",
"Universal_Polar_Stereographic" ,
"*) Universal Polar Stereographic" },
2074 {
"urm5" ,
" ",
"Urmaev_V" ,
"*) Urmaev V" },
2075 {
"urmfps" ,
" ",
"Urmaev_Flat_Polar_Sinusoidal" ,
"*) Urmaev Flat-Polar Sinusoidal" },
2076 {
"utm" ,
">",
"Transverse_Mercator" ,
"*) Universal Transverse Mercator (UTM)" },
2077 {
"vandg" ,
"<",
"Van_Der_Grinten_I" ,
"[ESRI] van der Grinten (I)" },
2078 {
"vandg" ,
" ",
"VanDerGrinten" ,
"van der Grinten (I)" },
2079 {
"vandg2" ,
" ",
"VanDerGrinten_II" ,
"*) van der Grinten II" },
2080 {
"vandg3" ,
" ",
"VanDerGrinten_III" ,
"*) van der Grinten III" },
2081 {
"vandg4" ,
" ",
"VanDerGrinten_IV" ,
"*) van der Grinten IV" },
2082 {
"vitk1" ,
" ",
"Vitkovsky_I" ,
"*) Vitkovsky I" },
2083 {
"wag1" ,
" ",
"Wagner_I" ,
"*) Wagner I (Kavraisky VI)" },
2084 {
"wag2" ,
" ",
"Wagner_II" ,
"*) Wagner II" },
2085 {
"wag3" ,
" ",
"Wagner_III" ,
"*) Wagner III" },
2086 {
"wag4" ,
" ",
"Wagner_IV" ,
"*) Wagner IV" },
2087 {
"wag5" ,
" ",
"Wagner_V" ,
"*) Wagner V" },
2088 {
"wag6" ,
" ",
"Wagner_VI" ,
"*) Wagner VI" },
2089 {
"wag7" ,
" ",
"Wagner_VII" ,
"*) Wagner VII" },
2090 {
"webmerc" ,
" ",
"Mercator_1SP" ,
"Web Mercator" },
2091 {
"webmerc" ,
"<",
"Mercator_Auxiliary_Sphere" ,
"[ESRI] Web Mercator" },
2092 {
"weren" ,
" ",
"Werenskiold_I" ,
"*) Werenskiold I" },
2093 {
"wink1" ,
" ",
"Winkel_I" ,
"[ESRI] Winkel I" },
2094 {
"wink2" ,
" ",
"Winkel_II" ,
"[ESRI] Winkel II" },
2095 {
"wintri" ,
" ",
"Winkel_Tripel" ,
"[ESRI] Winkel Tripel" },
2098 {
"alpha" ,
" ",
"azimuth" ,
"? Used with Oblique Mercator and possibly a few others" },
2099 {
"k" ,
">",
"scale_factor" ,
"Scaling factor (old name)" },
2100 {
"K" ,
">",
"scale_factor" ,
"? Scaling factor (old name)" },
2101 {
"k_0" ,
" ",
"scale_factor" ,
"Scaling factor (new name)" },
2102 {
"lat_0" ,
" ",
"latitude_of_origin" ,
"Latitude of origin" },
2103 {
"lat_0" ,
"<",
"latitude_of_center" ,
"Latitude of center" },
2104 {
"lat_0" ,
"<",
"central_parallel" ,
"[ESRI] Latitude of center" },
2105 {
"lat_1" ,
" ",
"standard_parallel_1" ,
"Latitude of first standard parallel" },
2106 {
"lat_2" ,
" ",
"standard_parallel_2" ,
"Latitude of second standard parallel" },
2107 {
"lat_ts" ,
">",
"latitude_of_origin" ,
"Latitude of true scale" },
2108 {
"lon_0" ,
" ",
"central_meridian" ,
"Central meridian" },
2109 {
"lon_0" ,
"<",
"longitude_of_center" ,
"Longitude of center" },
2110 {
"lonc" ,
">",
"longitude_of_center" ,
"? Longitude used with Oblique Mercator and possibly a few others" },
2111 {
"x_0" ,
" ",
"false_easting" ,
"False easting" },
2112 {
"y_0" ,
" ",
"false_northing" ,
"False northing" },
2122 {
"h" ,
" ",
"satellite_height",
"Satellite height (geos - Geostationary Satellite View)" },
2194 Dictionary.
Set_Name(
"Proj.4-WKT Dictionary");
2196 if( Direction == 0 )
2203 for(
int i=0; *Translation[i][0]; i++)
2213 else if( Direction > 0 )
2218 for(
int i=0; *Translation[i][0]; i++)
2220 if( Translation[i][1][0] !=
'<' )
2229 else if( Direction < 0 )
2234 for(
int i=0; *Translation[i][0]; i++)
2236 if( Translation[i][1][0] !=
'>' )
2250 bool CSG_Projections::_Set_Dictionary(
void)
2254 return( _Set_Dictionary(Table, 1) && m_Proj4_to_WKT.
Create(&Table, 0, 1,
true)
2255 && _Set_Dictionary(Table, -1) && m_WKT_to_Proj4.
Create(&Table, 0, 1,
true)
2273 return( pTarget ? pTarget->
Create(*pSource) :
true );
2278 pTarget->
Create(*pSource); pSource = pTarget;
2293 bool bResult = pTool->
Execute();
2296 Data.
Delete(pSource,
true);
2309 if( Source == Target )
2327 bool bResult = pTool->
Execute();
2348 if( Source == Target )
2383 bool bResult =
false;