From 3adbd7c5af5f120b2fc1d507f654ac6212a7a306 Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Thu, 9 Mar 2017 08:17:01 -0600 Subject: [PATCH 1/2] Change overwrite option on writers.pgpointcloud to false. Close #1516 --- doc/stages/writers.pgpointcloud.rst | 2 +- plugins/pgpointcloud/io/PgWriter.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/stages/writers.pgpointcloud.rst b/doc/stages/writers.pgpointcloud.rst index 9c39f5f644..42262fb78d 100644 --- a/doc/stages/writers.pgpointcloud.rst +++ b/doc/stages/writers.pgpointcloud.rst @@ -59,7 +59,7 @@ compression * **ght** applies a "geohash tree" compression by sorting the points into a prefix tree overwrite - To drop the table before writing set to 'true'. To append to the table set to 'false'. [Default: **true**] + To drop the table before writing set to 'true'. To append to the table set to 'false'. [Default: **false**] srid Spatial reference ID (relative to the `spatial_ref_sys` table in PostGIS) to store with the point cloud schema. [Default: **4326**] diff --git a/plugins/pgpointcloud/io/PgWriter.cpp b/plugins/pgpointcloud/io/PgWriter.cpp index d592916dcf..323ae3b695 100644 --- a/plugins/pgpointcloud/io/PgWriter.cpp +++ b/plugins/pgpointcloud/io/PgWriter.cpp @@ -93,8 +93,7 @@ void PgWriter::addArgs(ProgramArgs& args) args.add("schema", "Schema name", m_schema_name); args.add("compression", "Compression type", m_compressionSpec, "dimensional"); - args.add("overwrite", "Whether data should be overwritten", m_overwrite, - true); + args.add("overwrite", "Whether data should be overwritten", m_overwrite); args.add("srid", "SRID", m_srid, 4326U); args.add("pcid", "PCID", m_pcid); args.add("pre_sql", "SQL to execute before query", m_pre_sql); From 8e17fb8de083405cc2602083a405f7966ad6f66b Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Thu, 9 Mar 2017 08:20:56 -0600 Subject: [PATCH 2/2] Remove dead code. --- plugins/oci/io/OciWriter.cpp | 106 ----------------------------------- 1 file changed, 106 deletions(-) diff --git a/plugins/oci/io/OciWriter.cpp b/plugins/oci/io/OciWriter.cpp index 0b60879ae2..b7a425aea7 100644 --- a/plugins/oci/io/OciWriter.cpp +++ b/plugins/oci/io/OciWriter.cpp @@ -73,112 +73,6 @@ OciWriter::OciWriter() {} -/** -Options OciWriter::getDefaultOptions() -{ - Options options; - - Option solid("solid", false, - "Define the point cloud's PC_EXTENT geometry gtype as (1,1007,3) " - "instead of the normal (1,1003,3), and use gtype 3008/2008 vs " - " 3003/2003 for BLK_EXTENT geometry values."); - Option overwrite("overwrite", false, - "Wipe the block table and recreate it before loading data"); - Option srid("srid", 0, - "The Oracle numerical SRID value to use for PC_EXTENT, " - "BLK_EXTENT, and indexing"); - Option stream_output_precision("stream_output_precision", 8, - "The number of digits past the decimal place for outputting " - "floats/doubles to streams. This is used for creating the SDO_PC " - "object and adding the index entry to the USER_SDO_GEOM_METADATA " - "for the block table"); - Option connection("connection", "", - "Oracle connection string to connect to database"); - Option block_table_name("block_table_name", "output", - "The table in which block data for the created SDO_PC will be placed"); - Option block_table_partition_column("block_table_partition_column", "", - "The column name for which 'block_table_partition_value' will " - "be placed in the 'block_table_name'"); - Option block_table_partition_value("block_table_partition_value", 0, - "Integer value to use to assing partition IDs in the block table. " - "Used in conjunction with 'block_table_partition_column'"); - Option base_table_name("base_table_name", "hobu", - "The name of the table which will contain the SDO_PC object"); - Option cloud_column_name("cloud_column_name", "CLOUD", - "The column name in 'base_table_name' that will hold the SDO_PC " - "object"); - Option base_table_aux_columns("base_table_aux_columns", "", - "Quoted, comma-separated list of columns to add to the SQL that " - "gets executed as part of the point cloud insertion into the " - "'base_table_name' table"); - Option base_table_aux_values("base_table_aux_values", "", - "Quoted, comma-separated values that correspond to " - "'base_table_aux_columns', entries that will get inserted as part " - "of the creation of the SDO_PC entry in the 'base_table_name' table"); - Option base_table_boundary_column("base_table_boundary_column", "", - "The SDO_GEOMETRY column in 'base_table_name' in which to insert " - "the WKT in 'base_table_boundary_wkt' representing a boundary for " - "the SDO_PC object. Note this is not the same as the " - "'base_table_bounds', which is just a bounding box that is placed " - "on the SDO_PC object itself."); - Option base_table_boundary_wkt("base_table_boundary_wkt", "", - "WKT, in the form of a string or a file location, to insert into " - "the SDO_GEOMTRY column defined by 'base_table_boundary_column'"); - Option pre_block_sql("pre_block_sql", "", - "SQL, in the form of a string or file location, that is executed " - "after the SDO_PC object has been created but before the block data " - "in 'block_table_name' are inserted into the database"); - Option pre_sql("pre_sql", "", - "SQL, in the form of a string or file location, that is executed " - "before the SDO_PC object is created."); - Option post_block_sql("post_block_sql", "", - "SQL, in the form of a string or file location, that is executed " - "after the block data in 'block_table_name' have been inserted"); - Option base_table_bounds("base_table_bounds", BOX3D(), - "A bounding box, given in the Oracle SRID specified in 'srid' to " - "set on the PC_EXTENT object of the SDO_PC. If none is specified, " - "the cumulated bounds of all of the block data are used."); - Option pc_id("pc_id", -1, "Point Cloud id"); - Option do_trace("do_trace", false, - "turn on server-side binds/waits tracing -- needs ALTER SESSION privs"); - Option stream_chunks("stream_chunks", false, - "Stream block data chunk-wise by the DB's chunk size rather than " - "as an entire blob"); - Option blob_chunk_count("blob_chunk_count", 16, - "When streaming, the number of chunks per write to use"); - Option store_dimensional_orientation("store_dimensional_orientation", false, - "Store the points oriented in DIMENSION_INTERLEAVED instead of " - "POINT_INTERLEAVED orientation"); - options.add(is3d); - options.add(solid); - options.add(overwrite); - options.add(srid); - options.add(stream_output_precision); - options.add(connection); - options.add(block_table_name); - options.add(block_table_partition_column); - options.add(block_table_partition_value); - options.add(base_table_name); - options.add(cloud_column_name); - options.add(base_table_aux_columns); - options.add(base_table_aux_values); - options.add(base_table_boundary_column); - options.add(base_table_boundary_wkt); - options.add(pre_block_sql); - options.add(pre_sql); - options.add(post_block_sql); - options.add(base_table_bounds); - options.add(pc_id); - options.add(do_trace); - options.add(stream_chunks); - options.add(blob_chunk_count); - options.add(store_dimensional_orientation); - - return options; -} -**/ - - void OciWriter::runCommand(std::ostringstream const& command) { Statement statement(m_connection->CreateStatement(command.str().c_str()));