patch_1875_B_1.diff

Magnus Homann, 2009-08-14 07:52 AM

Download (1.71 KB)

View differences:

core/qgsvectorfilewriter.cpp (arbetskopia)
30 30
#include <QSettings>
31 31
#include <QFileInfo>
32 32
#include <QTextCodec>
33
#include <QTextStream>
33 34

  
34 35
#include <cassert>
35 36
#include <cstdlib> // size_t
......
89 90
  if ( srs )
90 91
  {
91 92
    QString srsWkt = srs->toWkt();
93
    QgsDebugMsg( "WKT to save as is " + srsWkt );
92 94
    ogrRef = OSRNewSpatialReference( srsWkt.toLocal8Bit().data() );
93 95
  }
94 96

  
......
379 381
  {
380 382
    delete ct;
381 383
  }
384

  
385
  // Ohh, a great Hack-fest starts!
386
  // Overwrite the .prj file created by QGsVectorFileWrite().
387
  QRegExp regExp( ".shp$" );
388
  QString prjName = shapefileName;
389
  prjName.replace( regExp, QString( "" ));
390
  prjName.append( QString( ".prj" ) );
391
  QFile prjFile( prjName );
392

  
393
  if( !prjFile.open( QIODevice::WriteOnly ) )
394
  {
395
    QgsDebugMsg( "Couldn't open file " + prjName );
396
    return NoError; // For now
397
  }
398

  
399
  QTextStream prjStream( & prjFile );
400
  prjStream << destCRS->toWkt() << endl;
401
  prjFile.close();
402

  
382 403
  return NoError;
383 404
}
384 405

  
core/qgscoordinatereferencesystem.cpp (arbetskopia)
1135 1135
  QgsDebugMsg( "* Valid : " + ( mIsValidFlag ? QString( "true" ) : QString( "false" ) ) );
1136 1136
  QgsDebugMsg( "* SrsId : " + QString::number( mSrsId ) );
1137 1137
  QgsDebugMsg( "* Proj4 : " + toProj4() );
1138
  QgsDebugMsg( "* WKT   : " + toWkt() );
1138 1139
  QgsDebugMsg( "* Desc. : " + mDescription );
1139 1140
  if ( mapUnits() == QGis::Meters )
1140 1141
  {