[QGIS-trac] Re: [Quantum GIS] #2452: Save as vector (not only to shapefile)

Quantum GIS qgis at qgis.org
Tue Mar 2 17:36:29 EST 2010


#2452: Save as vector (not only to shapefile)
-------------------------------------+--------------------------------------
        Reporter:  mhugent           |         Owner:  jef          
            Type:  patch             |        Status:  new          
        Priority:  minor: annoyance  |     Milestone:  Version 1.5.0
       Component:  Vectors           |       Version:  HEAD         
      Resolution:                    |      Keywords:               
Platform_version:                    |      Platform:  Debian       
        Must_fix:  No                |   Status_info:  0            
-------------------------------------+--------------------------------------
Comment (by jpalmer):

 I've being doing some more testing with transforming output vector layers.
 I have found that if the layer transformation fails during the vector
 writing, the process aborts, no error message is given to the user, and
 the output file is left in a corrupted state.

 Here is the debug log from the failed layer save:

 ..\..\..\src\gui\qgsprojectionselector.cpp(72) :
 (QgsProjectionSelector::QgsProj
 ectionSelector) Use popular projection list from EPSG/Proj4 saved state
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(242) :
 (QgsCoordinateReferenc
 eSystem::loadFromDb) failed : select
 srs_id,description,projection_acronym,ellip
 soid_acronym,parameters,srid,epsg,is_geo from tbl_srs where epsg='100000'
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(489) :
 (QgsCoordinateReferenc
 eSystem::getRecord) running query: select * from tbl_srs where
 parameters='+proj
 =longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +pm=160 +no_defs'
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(523) :
 (QgsCoordinateReferenc
 eSystem::getRecord) trying system qgis.db
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(558) :
 (QgsCoordinateReferenc
 eSystem::getRecord) failed :  select * from tbl_srs where
 parameters='+proj=long
 lat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +pm=160 +no_defs'
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(566) :
 (QgsCoordinateReferenc
 eSystem::getRecord) retrieved:  select * from tbl_srs where
 parameters='+proj=lo
 nglat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +pm=160 +no_defs'
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(425) :
 (QgsCoordinateReferenc
 eSystem::createFromProj4) globbing search for srsid from this proj string
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(777) :
 (QgsCoordinateReferenc
 eSystem::findMatchingProj) entered.
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(826) :
 (QgsCoordinateReferenc
 eSystem::findMatchingProj) no match found in srs.db, trying user db now!
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(853) :
 (QgsCoordinateReferenc
 eSystem::findMatchingProj) -------> MATCH FOUND in user qgis.db srsid:
 100000
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(428) :
 (QgsCoordinateReferenc
 eSystem::createFromProj4) globbing search for srsid returned srsid: 100000
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(242) :
 (QgsCoordinateReferenc
 eSystem::loadFromDb) failed : select
 srs_id,description,projection_acronym,ellip
 soid_acronym,parameters,srid,epsg,is_geo from tbl_srs where epsg='0'
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(489) :
 (QgsCoordinateReferenc
 eSystem::getRecord) running query: select * from tbl_srs where
 parameters='+proj
 =merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +units=m
 +no_defs'
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(523) :
 (QgsCoordinateReferenc
 eSystem::getRecord) trying system qgis.db
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(566) :
 (QgsCoordinateReferenc
 eSystem::getRecord) retrieved:  select * from tbl_srs where
 parameters='+proj=me
 rc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +units=m
 +no_defs'
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(369) :
 (QgsCoordinateReferenc
 eSystem::createFromProj4) proj4string match search for srsid returned
 srsid: 100
 002
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\gui\qgsprojectionselector.cpp(279) :
 (QgsProjectionSelector::ogcWms
 CrsFilterAsSqlExpression) exiting with '1'.
 ..\..\..\src\gui\qgsprojectionselector.cpp(660) :
 (QgsProjectionSelector::loadUs
 erCrsList) Fetching user projection list...
 ..\..\..\src\gui\qgsprojectionselector.cpp(279) :
 (QgsProjectionSelector::ogcWms
 CrsFilterAsSqlExpression) exiting with '1'.
 ..\..\..\src\gui\qgsprojectionselector.cpp(465) :
 (QgsProjectionSelector::select
 edProj4String) mySrsId = 3452
 ..\..\..\src\gui\qgsprojectionselector.cpp(466) :
 (QgsProjectionSelector::select
 edProj4String) USER_CRS_START_ID = 100000
 ..\..\..\src\gui\qgsprojectionselector.cpp(490) :
 (QgsProjectionSelector::select
 edProj4String) db = C:/OSGeo4W/apps/qgis-linz/./resources/srs.db
 ..\..\..\src\gui\qgsprojectionselector.cpp(507) :
 (QgsProjectionSelector::select
 edProj4String) Selection sql: select parameters from tbl_srs where srs_id
 = 3452

 ..\..\..\src\gui\qgsprojectionselector.cpp(465) :
 (QgsProjectionSelector::select
 edProj4String) mySrsId = 177
 ..\..\..\src\gui\qgsprojectionselector.cpp(466) :
 (QgsProjectionSelector::select
 edProj4String) USER_CRS_START_ID = 100000
 ..\..\..\src\gui\qgsprojectionselector.cpp(490) :
 (QgsProjectionSelector::select
 edProj4String) db = C:/OSGeo4W/apps/qgis-linz/./resources/srs.db
 ..\..\..\src\gui\qgsprojectionselector.cpp(507) :
 (QgsProjectionSelector::select
 edProj4String) Selection sql: select parameters from tbl_srs where srs_id
 = 177
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgscoordinatereferencesystem.cpp(739) :
 (QgsCoordinateReferenc
 eSystem::setMapUnits) Projection has linear units of Meter
 ..\..\..\src\core\qgsvectorfilewriter.cpp(97) :
 (QgsVectorFileWriter::QgsVectorF
 ileWriter) Created data source
 ..\..\..\src\core\qgsvectorfilewriter.cpp(119) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) WKT to save as is PROJCS["unnamed",GEOGCS["GRS 1980(IUGG,
 1980)",DAT
 UM["unknown",SPHEROID["GRS80",6378137,298.257222101],TOWGS84[0,0,0,0,0,0,0]],PRI
 MEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mer
 cator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",173],PARA
 METER["scale_factor",0.9996],PARAMETER["false_easting",1600000],PARAMETER["false
 _northing",10000000],UNIT["Meter",1]]
 ..\..\..\src\core\qgsvectorfilewriter.cpp(156) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) created layer
 ..\..\..\src\core\qgsvectorfilewriter.cpp(159) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) creating 6 fields
 ..\..\..\src\core\qgsvectorfilewriter.cpp(221) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) creating field id type int width 10 precision 0
 ..\..\..\src\core\qgsvectorfilewriter.cpp(221) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) creating field alt_id type int width 10 precision 0
 ..\..\..\src\core\qgsvectorfilewriter.cpp(221) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) creating field name type QString width 255 precision 104
 ..\..\..\src\core\qgsvectorfilewriter.cpp(221) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) creating field location type QString width 255 precision 104
 ..\..\..\src\core\qgsvectorfilewriter.cpp(221) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) creating field status type QString width 255 precision 8
 ..\..\..\src\core\qgsvectorfilewriter.cpp(221) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) creating field audit_id type int width 10 precision 0
 ..\..\..\src\core\qgsvectorfilewriter.cpp(235) :
 (QgsVectorFileWriter::QgsVector
 FileWriter) Done creating fields
 ..\..\..\..\src\providers\postgres\qgspostgresprovider.cpp(3115) :
 (QgsPostgresP
 rovider::Conn::openCursor) Starting read-only transaction
 ..\..\..\src\core\qgscoordinatetransform.cpp(488) :
 (QgsCoordinateTransform::tra
 nsformCoords) Projection failed emitting invalid transform signal: forward
 trans
 form of
 (0.152795, -0.806109)

 failed with error: latitude or longitude exceeded limits

 ..\..\..\src\core\qgscoordinatetransform.cpp(492) :
 (QgsCoordinateTransform::tra
 nsformCoords) throwing exception
 ..\..\..\src\core\qgscoordinatetransform.cpp(306) :
 (QgsCoordinateTransform::tra
 nsformInPlace) rethrowing exception
 Failed to transform a point while drawing a feature of type ''. Writing
 stopped.
  (Exception: forward transform of
 (0.152795, -0.806109)

 failed with error: latitude or longitude exceeded limits
 )

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2452#comment:4>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list