Opened 13 years ago

Closed 13 years ago

#994 closed defect (fixed)

-r used in shp2pgsql and pgsql2shp to mean two different things

Reported by: robe Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: utils/loader-dumper Version: master
Keywords: Cc:

Description

Perhaps its just me that is bothered by this, but I just noticed in developing my command line cheatsheet that we have the

r switch defined for both pgsql2shp and shp2pgsql and they mean completely different things.

For shp2pgsql the r switch is new and represents the input spatial reference system.

In pgsql2shp -r means output in raw mode — do not unescape attribute names.

I'm not super bothered by it but thought I'd flag as an inconsistency.

I suppose we can't change the old use of r, but since the new r is new, we could replace that.

Attachments (1)

shp2pgsql-s_reprject.patch (3.0 KB ) - added by strk 13 years ago.
the patch…

Download all attachments as: .zip

Change History (7)

comment:1 by strk, 13 years ago

Component: postgisloader/dumper
Owner: changed from pramsey to mcayland

comment:2 by strk, 13 years ago

How about dropping -r and replacing with an enhanced -s ? It would go like this:

 -s <srid>         Set the srid
 -s <from>:<srid>  Set the srid and reproject

comment:3 by strk, 13 years ago

Owner: changed from mcayland to strk
Status: newassigned

I've a patch ready for this, just give a word of appreciation to see it committed…

by strk, 13 years ago

Attachment: shp2pgsql-s_reprject.patch added

the patch…

comment:4 by robe, 13 years ago

works for me. +1 - one less switch to remember.

comment:5 by dustymugs, 13 years ago

+1

comment:6 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

committed as r8472 and r8473

Note: See TracTickets for help on using tickets.