[Liblas-commits] hg-main-tree: support for fetching SRS from the
SDO_PC's PC_GEOM...
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Jun 15 12:36:49 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/13b41b933391
changeset: 787:13b41b933391
user: Howard Butler <hobu.inc at gmail.com>
date: Wed Jun 15 11:36:40 2011 -0500
description:
support for fetching SRS from the SDO_PC's PC_GEOMETRY to set to stage's SRS
diffstat:
src/drivers/oci/Reader.cpp | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diffs (30 lines):
diff -r 0688160ae250 -r 13b41b933391 src/drivers/oci/Reader.cpp
--- a/src/drivers/oci/Reader.cpp Wed Jun 15 10:16:11 2011 -0500
+++ b/src/drivers/oci/Reader.cpp Wed Jun 15 11:36:40 2011 -0500
@@ -458,7 +458,26 @@
pdal::Schema Reader::fetchSchema(sdo_pc* pc)
{
+
+ // Fetch the WKT for the SRID to set the coordinate system of this stage
+ int srid = m_statement->GetInteger(&(pc->pc_geometry.sdo_srid));
+
+ std::ostringstream select_wkt;
+ select_wkt
+ << "SELECT WKTEXT3D from MDSYS.CS_SRS WHERE SRID = " << srid;
+ int wkt_length = 3999;
+ char* wkt = (char*) malloc (sizeof(char*) * wkt_length);
+ Statement get_wkt(m_connection->CreateStatement(select_wkt.str().c_str()));
+ get_wkt->Define( wkt, wkt_length );
+ get_wkt->Execute();
+ std::string s_wkt(wkt);
+ free(wkt);
+
+ setSpatialReference(pdal::SpatialReference(s_wkt));
+
+
+ // Fetch the XML that defines the schema for this point cloud
std::ostringstream select_schema;
OCILobLocator* metadata = NULL;
select_schema
More information about the Liblas-commits
mailing list