Feature request #2046

-c option missing in v.out.ogr.pg

Added by Otto Dassau about 15 years ago. Updated almost 15 years ago.

Status:Closed
Priority:Low
Assignee:Lorenzo Masini
Category:GRASS
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12106

Description

Hi,

I would like to see the -c option added to the v.out.ogr.pg module in the GRASS toolbox to be able to preserve islands.

Regards,
Otto

patch.tar.gz - patch to add the -c flag (817 Bytes) Giovanni Manghi, 2009-11-30 07:22 AM

History

#1 Updated by Giovanni Manghi almost 15 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

I was trying to make a patch for this module in order to add the "-c" flag, just to discover that there is no such flag.

"v.out.ogr.pg.py --help" returns

Description:
 Export vector to [[PostGIS]] (PostgreSQL) database table.

Keywords:
 vector, export, database

Usage:
 v.out.ogr.pg.py input=name layer=value type=string[,string,...]
   olayer=string [host=string] [port=value] database=name [user=string]
   [password=string] [--verbose] [--quiet]

Flags:
 --v   Verbose module output
 --q   Quiet module output

Parameters:
     input   Name of input vector map
     layer   Number of input layer
             default: 1
      type   Feature type(s)
             options: point,kernel,centroid,line,boundary,area,face
    olayer   Name of output database table
      host   Host
              Host name of the machine on which the server is running.
      port   Port
              TCP port on which the server is listening, usually 5432.
  database   Database
              Database name
      user   User
              Connect to the database as the user username instead of the  default.
  password   Password
              Password will be stored in file!

so I guess that it is the manual page that is wrong.

#2 Updated by Otto Dassau almost 15 years ago

  • Resolution deleted (invalid)
  • Status changed from Closed to Feedback

in GRASS the module "v.out.ogr" offers a flag c: It says:
to export features with category (labeled) only. Otherwise all features are exported

AFAICS in src/plugins/grass/scripts/ the module v.out.ogr.pg.py uses v.out.ogr. So the flag option -c should be added to the script and then also to the GRASS Toolbox.

Otto

#3 Updated by Giovanni Manghi almost 15 years ago

Ok, I attached here the necessary patches. I guess Paolo will commit them as soon as he will be back.

#4 Updated by Paolo Cavallini almost 15 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed

Applied in edafb7e0 (SVN r12474)

Also available in: Atom PDF