Opened 5 years ago

Closed 5 years ago

#4403 closed enhancement (fixed)

Make shp2pgsql -s : work with -D

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

Description

Right now the -s <some srid>:<to other srid> doesn't work with -D option.

This is because it uses INSERT commands with a ST_Transform.

So I usually end up not using it because it's slower than using -D + ALTER … table change the projection.

What I was thinking is why don't we just have the shp2pgsql command do that — do the ALTER right after if the user chooses to use -D.

The other alternative is to build real proj support into shp2pgsql, but I'd much rather not do that because then we might run into issues with the client computer using shp2pgsql having different install from the server and also wouldn't take care of cases where user manually installs their own entries in the server.

Change History (4)

comment:1 by robe, 5 years ago

In 17621:

Support for srid reprojection when using -D switch
References #4403
Tests forthcoming

comment:2 by robe, 5 years ago

In 17622:

Get rid of trailing spaces
References #4403

comment:3 by robe, 5 years ago

In 17623:

Hoepfully last trailing space
References #4403

comment:4 by robe, 5 years ago

Resolution: fixed
Status: assignedclosed

In 17624:

Add regression tests for using -s from_srid:to_srid with -D (copy mode) for both geometry and geography
Closes #4403

Note: See TracTickets for help on using tickets.