Changeset 1586:e26071072b5e
- Timestamp:
- 02/20/10 12:58:21 (5 months ago)
- Branch:
- default
- Files:
-
- 2 edited
-
apps/oci_wrapper.cpp (modified) (1 diff)
-
src/lasspatialreference.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apps/oci_wrapper.cpp
r1583 r1586 466 466 if( nStmtType != OCI_STMT_SELECT ) 467 467 { 468 //nStmtMode = OCI_COMMIT_ON_SUCCESS;469 nStmtMode = OCI_DEFAULT;468 nStmtMode = OCI_COMMIT_ON_SUCCESS; 469 // nStmtMode = OCI_DEFAULT; 470 470 471 471 } -
src/lasspatialreference.cpp
r1585 r1586 402 402 poSRS->exportToWkt( &pszWKT ); 403 403 404 OGRSpatialReference::DestroySpatialReference(poSRS);404 delete poSRS; 405 405 } 406 406 #endif … … 423 423 char* poWKT = 0; 424 424 const char* input = v.c_str(); 425 OGRSpatialReference* poSRS = (OGRSpatialReference*) OSRNewSpatialReference(NULL); 426 if (OGRERR_NONE != poSRS->SetFromUserInput((char *) input)) 427 { 428 OGRSpatialReference::DestroySpatialReference(poSRS); 425 426 // OGRSpatialReference* poSRS = (OGRSpatialReference*) OSRNewSpatialReference(NULL); 427 OGRSpatialReference srs(NULL); 428 if (OGRERR_NONE != srs.SetFromUserInput((char *) input)) 429 { 429 430 throw std::invalid_argument("could not import coordinate system into OSRSpatialReference SetFromUserInput"); 430 431 } 431 432 432 poSRS->exportToWkt(&poWKT); 433 OGRSpatialReference::DestroySpatialReference(poSRS); 433 srs.exportToWkt(&poWKT); 434 434 435 435 std::string tmp(poWKT); … … 518 518 const char* poWKT = wkt.c_str(); 519 519 520 OGRSpatialReference* poSRS = (OGRSpatialReference*) OSRNewSpatialReference(NULL); 521 if (OGRERR_NONE != poSRS->importFromWkt((char **) &poWKT)) 522 { 523 OGRSpatialReference::DestroySpatialReference(poSRS); 520 OGRSpatialReference srs(NULL); 521 if (OGRERR_NONE != srs.importFromWkt((char **) &poWKT)) 522 { 524 523 return std::string(); 525 524 } 526 525 527 526 char* proj4 = 0; 528 poSRS->exportToProj4(&proj4);527 srs.exportToProj4(&proj4); 529 528 std::string tmp(proj4); 530 529 CPLFree(proj4); 531 530 532 OGRSpatialReference::DestroySpatialReference(poSRS);533 534 531 return tmp; 535 532 #endif … … 567 564 char* poWKT = 0; 568 565 const char* poProj4 = v.c_str(); 569 OGRSpatialReference* poSRS = (OGRSpatialReference*) OSRNewSpatialReference(NULL); 570 if (OGRERR_NONE != poSRS->importFromProj4((char *) poProj4))571 {572 OGRSpatialReference::DestroySpatialReference(poSRS);566 567 OGRSpatialReference srs(NULL); 568 if (OGRERR_NONE != srs.importFromProj4((char *) poProj4)) 569 { 573 570 throw std::invalid_argument("could not import proj4 into OSRSpatialReference SetProj4"); 574 571 } 575 572 576 poSRS->exportToWkt(&poWKT); 577 OGRSpatialReference::DestroySpatialReference(poSRS); 573 srs.exportToWkt(&poWKT); 578 574 579 575 std::string tmp(poWKT);
Note: See TracChangeset
for help on using the changeset viewer.
