00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "omgspatialreferencesystem.h"
00021 #include <QFile>
00022 #include <QTextStream>
00023
00024
00025 OmgSpatialReferenceSystem::OmgSpatialReferenceSystem()
00026 {
00027
00028 }
00029
00030 OmgSpatialReferenceSystem::~OmgSpatialReferenceSystem()
00031 {
00032
00033 }
00034
00035
00036
00037 OmgSpatialReferenceSystem::WktMap OmgSpatialReferenceSystem::getWktMap()
00038 {
00039 WktMap myWktMap;
00040
00041 myWktMap["Lat/Long WGS84"] = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]";
00042
00043
00044
00045 QFile myQFile(":/wkt_defs.txt" );
00046 if ( myQFile.open( QIODevice::ReadOnly ) )
00047 {
00048
00049 QTextStream myQTextStream( &myQFile );
00050 QString myCurrentLine;
00051 while ( !myQTextStream.atEnd() )
00052 {
00053
00054
00055
00056
00057 myCurrentLine= myQTextStream.readLine();
00058 if (myCurrentLine.left(4)!="PROJ")
00059 {
00060 myWktMap[myCurrentLine]=myQTextStream.readLine();
00061 }
00062 }
00063 myQFile.close();
00064 }
00065 else
00066 {
00067 qDebug("Opening wkt file failed");
00068 }
00069
00070 return myWktMap;
00071 }
00072