16

I want to create an application platform based on PostGIS data. I read the documentation where I saw the prerequisite to install GEOS, GDAL and Proj4. The main problem is I am using windows platform. Can anybody refer me where I can get a full documentation on it to install PostGIS, GDAL, GEOS, Proj4 on windows with all their library? or is it possible to install all the library on windows?

  • Which documentation did you read? – R.K. Nov 14 '12 at 5:24
23

You don't have to worry about any of those prerequisites when installing PostGIS on Windows. You just need to install the Postgresql installer for your platform. You can then launch the Application Stack Builder to install PostGIS.

enter image description here

enter image description here

You can find more detailed installation instructions at the Boston GIS web site.

5

I think R.K. answer is all you need, but if helps, I wrote a blog posts about installing and configuring PostGIS Raster on Windows

http://libregis.org/2011/03/10/how-to-install-and-configure-postgis-raster-on-windows/

4

you can check out Portable GIS V3 which is newly released. the package contains what you need about GIS.

  • Desktop GIS packages QGIS (with GRASS plugin) version 1.8
  • FWTools (GDAL and OGR toolkit)
  • Apache2 and Php5
  • PostgreSQL (version 9.0)/Postgis (version 1.5)
  • Mapserver 5.6 and 6, OpenLayers.
  • Python 2.7
  • Loader- for loading gml such as Ordnance Survey Mastermap into a PostgreSQL Database
  • Utilities- portable firefox, pdf reader and text editor

port

i hope it helps you...

3

Thanks to @pateto777 answer and other sources like this and this , I managed to have a "portable" installation of PostGIS on a windows 7 machine without admin rights.

  1. Select the packages and download the binaries zip files. I went for:

    • postgresql-9.6.3-3-windows-x64-binaries.zip
    • postgis-bundle-pg96-2.3.3x64.zip
  2. Unzip the content in a merged folder, I used "pgsql", so within this folder you will have the folders: bin, doc, gdal-data, include, lib, pgAdmin 4, share, utils, symbols and utils. No "data" folder yet!

  3. Create a cluster before using it. I used a batch file in the merged folder to create it. I called FirstBatch.bat

@ECHO ON
REM The script sets environment variables helpful for PostgreSQL
@SET PATH="%~dp0bin";%PATH%
@SET PGDATA=%~dp0data
@SET PGDATABASE=postgres
@SET PGUSER=postgres
@SET PGPORT=5439
@SET PGLOCALEDIR=%~dp0share\locale
"%~dp0bin\initdb" -U postgres -A trust -E utf8
ECHO "Click enter to exit"
pause
  1. Start postgresql. I used a batch file in the merged folder to start it. It has to be running while you want to access the database. I called NormalBatch.bat.
@ECHO ON
REM The script sets environment variables helpful for PostgreSQL
@SET PATH="%~dp0\bin";%PATH%
@SET PGDATA=%~dp0\data
@SET PGDATABASE=geodb
@SET PGUSER=postgres
@SET PGPORT=5439
@SET PGLOCALEDIR=%~dp0\share\locale
"%~dp0bin\pg_ctl" -D "%~dp0data" -l logfile start
ECHO "Click enter to stop"
pause
"%~dp0\bin\pg_ctl" -D "%~dp0/data" stop
  1. While the previous batch is running, create a geodatabase called "geodb". I used this batch to connect to the shell
REM shell interface
"%~dp0bin\psql" -p 5439 -U postgres

then type:

postgres=#create database geodb;
postgres=#\connect geodb;
geodb=#CREATE EXTENSION postgis;
geodb=#CREATE EXTENSION postgis_topology;
geodb=#\q

Voilà! A postGIS database called geodb is available for user postgres on port 5439

1

If you like the manual installations, you can follow these steps:

  1. Downloaded the binary files. In my case I used:

    postgresql-9.5.3-1-windows-x64-binaries.zip

    postgis-bundle-pg95-2.2.2x64-2.zip

  2. Copy all the content from postgis to postgresql in the root folder. At the end you will find the folders: bin, gdal-data, lib, pgAdmin III, share, utils and more files.

  3. Assuming Postgres is already installed, connect to the shell and type:

    create database geodb;

    \connect geodb;

    CREATE EXTENSION postgis;

    CREATE EXTENSION postgis_topology;

These 2 extensions are enough for working.

  • Hi, I might be ver newbe, but I do not know what do you mean with "connect to the shell and type"?. So far I have installed Postgresql and I can see one database in pgAdmin 4. BTW, I am trying to run it without an installation (postgresonline.com/journal/archives/…) – Marco Aug 10 '17 at 12:37
  • Hi, are you using windows? In that case you should open the command prompt typing "cmd" after you click on the windows button. That is a terminal, where you can connect to the database usually with the command: "psql -U postgres ". After that, you can continue with your installation. – pateto777 Aug 14 '17 at 20:38
  • Yes, using windows 7 without admin rights, so it is a bit more complicate. I will try to write a new answer based on yours – Marco Aug 16 '17 at 6:37
0

This page outlines screenshots for installing PostgreSQL and PostGIS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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