Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there anywhere available shp2pgsql binaries for windows without installing the whole PostGIS? I particularity need the command line version of that import tool.

I would like to share a batch script that uses the shp2pgsql.exe to my co-workers but don't know how to share the shp2pgsql.exe. Could I just copy that file from my postgres/bin folder? I suppose that then I need at least libpg.dll. How about other files (libgdal-1.dll, libproj.dll)?

share|improve this question
may be useful for you – Sunil Feb 6 '13 at 8:27
Thanks @Sunil, but didn't help. That thread was from 2004 and linked to unknown zip file that doesn't exists. And ogr2ogr doesn't work in my case. – LauriK Feb 6 '13 at 9:43
We are researching on your issue..and let you know soon – Sunil Feb 6 '13 at 9:45
Its working @ my end – Sunil Feb 6 '13 at 9:49
Use depend.exe to find what libraries it depends on. I think libconv might be the only one. – Paul Ramsey Feb 7 '13 at 19:44
up vote 8 down vote accepted

Answering to my own question based on help from @Sunil and @Paul.

Shp2pgsql.exe is available in binary download from It comes with a lot of unnecessary files. Only libiconv-2.dll in needed.

To be able to load shapes to PostGIS also the psql.exe is needed. It comes with pgAdmin installation. It depends on libpq.dll, libintl.dll and ssleay32.dll.

share|improve this answer
Thanks, small update for the current version of shp2pgsql. Additional files required: libgcc_s_seh-1.dll, libgeos.dll, libgeos_c.dll, libproj-9.dll, libstdc++-6.dll. Also libintl.dll is now libintl-8.dll. – Konrad Mar 14 at 12:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.