[postgis-users] How to add shp2pgsql and pgsql2shp

Greg Troxel gdt at lexort.com
Fri Dec 3 17:14:40 PST 2021


Terry <terry.curran at shaw.ca> writes:

> I have a RHEL8 system, with PostgreSQL-13 and postgis_3.1.4.  All
> seems to work well.
>
> I wanted to add some shp files, and I was surprised to *not* find the
> shp2pgsql and pgsql2shp applications.  My PostgreSQL is installed in
> /usr/pgsql-13, and the missing applications are not in
> /usr/pgsql-13/bin ( nor elsewhere).
>
> What is the preferred method to install shp2pgsql, please?

shp2pgsql is part of postgis.  The pkgsrc package for 3.1.4 has a ton of
sql files to install uprade, plus:

  /usr/pkg/bin/pgsql2shp
  /usr/pkg/bin/raster2pgsql
  /usr/pkg/bin/shp2pgsql
  /usr/pkg/lib/postgresql/postgis-3.so
  /usr/pkg/lib/postgresql/postgis_raster-3.so
  /usr/pkg/lib/postgresql/postgis_topology-3.so
  /usr/pkg/share/postgresql/contrib/postgis-3.1/postgis_restore.pl
  /usr/pkg/share/postgresql/extension/postgis.control
  /usr/pkg/share/postgresql/extension/postgis_raster.control
  /usr/pkg/share/postgresql/extension/postgis_tiger_geocoder.control
  /usr/pkg/share/postgresql/extension/postgis_topology.control

You should ask Red Hat why it isn't in the postgis package, after first
looking for some postgis-tools or similar package that has the
command-line tools.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20211203/98dfb7cb/attachment.sig>


More information about the postgis-users mailing list