Ticket #994 (closed defect: fixed)

Opened 2 years ago

Last modified 17 months ago

-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: trunk
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

shp2pgsql-s_reprject.patch Download (3.0 KB) - added by strk 17 months ago.
the patch…

Change History

Changed 17 months ago by strk

  • owner changed from pramsey to mcayland
  • component changed from postgis to loader/dumper

Changed 17 months 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

Changed 17 months ago by strk

  • owner changed from mcayland to strk
  • status changed from new to assigned

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

Changed 17 months ago by strk

the patch...

Changed 17 months ago by robe

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

Changed 17 months ago by dustymugs

+1

Changed 17 months ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

committed as r8472 and r8473

Note: See TracTickets for help on using tickets.