Opened 10 years ago

Closed 9 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: loader/dumper Version: master
Keywords: Cc:


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 9 years ago.
the patch…

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago by strk

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

comment:2 Changed 9 years ago by strk

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 Changed 9 years ago by strk

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...

Changed 9 years ago by strk

Attachment: shp2pgsql-s_reprject.patch added

the patch...

comment:4 Changed 9 years ago by robe

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

comment:5 Changed 9 years ago by Bborie Park


comment:6 Changed 9 years ago by strk

Resolution: fixed
Status: assignedclosed

committed as r8472 and r8473

Note: See TracTickets for help on using tickets.