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

How can I connect to a PostGIS database from ArcMap? Solutions for ArcGIS 9.3, 10.0 and later are acceptable.

Ideally, I would like to be able to perform spatially enabled queries and receive the results back (e.g. spatial and non-spatial joins, filtering etc.) rather than just dumping the contents of a table.

To clarify, I don't want to use the ArcSDE spatial extensions, I want to use the PostGIS spatial extensions in ArcGIS.

share|improve this question
Very similar post to: – RyanDalton Aug 12 '11 at 17:06
The Accept-ed Answer to this Question has now been noticeably outvoted so there would appear to be a case for reconsidering all Answers in light of today's options. – PolyGeo Apr 22 '14 at 22:11
Can you run Squirrel and SDE next to each other? Our company doesn't want to drop 30k to upgrade to standard licenses. – joebob Jun 12 '14 at 18:28

11 Answers 11

up vote 6 down vote accepted

Easiest would be ZigGIS from Obtuse Software. Currently you have to pay for it, but word on the street is that version 3 will be open source.

share|improve this answer
Version 3 will be open source. The only issue with it right now is that it does not management through ArcCatalog - meaning you need to use PgAdmin or SQL to admin your DB. Other than that you are good – TheSteve0 Jul 23 '10 at 6:38
To add to SteveO's comments, here's the ZigGISv3 Road Map: The provider model will be a huge improvement. – Jay Cummins Jul 23 '10 at 11:34
Is thee free version 1.0 still available? – fmark Jul 30 '10 at 4:05
Yep, free version is available here: But it's oooooold, we don't support it any longer, and you can't do editing (which was the major feature introduced in version 2.0). – xanadont Aug 7 '10 at 23:58
I saw this post come through another list source recently that stated "zigGIS has officially reached its end-of-life since the next version of ArcGIS should support direct read / write interoperability with PostGIS (thereby rendering zigGIS moot)."… – RyanDalton Aug 12 '11 at 15:41

If you are using ArcGIS 10, then you can directly connect to the PostGIS Data using a Query layer, there is more information on this available here

** good to note this page does not view correctly in Chrome, so I have used IE to read

share|improve this answer
Do you know if you can edit the PostGIS data through the query layer though? – om_henners Aug 6 '10 at 5:30
I believe at this stage this is not an editing solution but works more like a database view. – CDBrown Sep 1 '10 at 4:36
Is it just me or you can't access attribute table from PG with that technique when you use * in the query ? – Etiennebr Feb 2 '11 at 13:09


Go to Start -> Control Panel -> Performance and Maintenance -> Administrative Tools -> Data Sources.

Go to the System DSN tab.

Click Add.

Scroll down in the list. You should be able to see your PostgreSQL ODBC drivers there if you installed them. Click the first PostgreSQL ODBC driver in the list.

Enter your connection details in the form. If the connection is on the same machine as the PostgreSQL database, write localhost in the server field; otherwise, the name of the computer on the network. You'll have to make some changes in the pg_hba.conf file to connect to your database on the network. Read about it in the PostgreSQL manuals in the User Authentication section. After this is done, click Finish.

Add all the PostgreSQL ODBC drivers you find in the list similarly.

Click OK. You may now connect to the PostgreSQL database through the ODBC drivers. The drivers only needed to be directed to the database with connection information.

share|improve this answer

@fmark. I have been monitoring this post and the wider web for a solution to this as I wanted a similar tool. Today I bumped into my (our) solution via RSS feed to James Fee's blog . And I believe the solution you seek is PgMap by ST-Links.

I have tried the ArcGIS 9.3 version and it's impressive. Still struggling with edits though since I'm still a PostGIS newbie (identity column thing). It also comes with a sleek ESRI to PostGIS loader and above all it's FREE! [Tested with OpenGeoSuite Community Edition 2.4.1]

share|improve this answer
I heard st-link is only free for one year. After which you need to have a license. Isn't it true? – OPENGISTECH Jun 7 '12 at 15:02

I have done this before with out too much trouble using ArcGIS 10.1 and 10.2 unfortunately it does not work with 9.3 and postgres 9.2 I think from memory.

I used the drivers from esri. Logon to the ESRI customer care site although I think this has changed since I wrote the instructions.

  1. Select your version
  2. "Software Downloads"
  3. "DMBS Support Files"
  4. Scroll down until you see "PostgreSQLQL Client Libraries (Windows)", should be 2.21 MB in size.

  5. Click Downloads

    For PostgreSQL/PostGIS in the downloaded file should be the "pg_client_windows86" client set of libraries containing the necessary 32 bit version of libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll. Copy these to your ArcGIS bin directory. On my computer using 10.1 it was: C:Program Files (x86)ArcGISDesktop10.1bin If you are using 32bit windows it would be something like: C:Program FilesArcGISDesktop10.1bin

Once you have done this you should be able to connect to and add data from your database. To use a data query layer you will first need to connect to your database. In ArcGIS 10.1 you will need to go to File>Add Data>Add Query Layer

The only thing to watch for is that the data being returned has to have a unique field that can be used as a primary key by ArcGIS. Sometimes you may need to specify it if you are using more than just a basic query and ArcGIS cannot work out which field to use. You can do this by:

  1. First validate the SQL query by clicking on the Validate button (ArcGIS needs to generate a list of fields that are in the select statement to populate the advanced options dialog box).
  2. Once the SQL had been validated then click on Show advanced options the finish button will change from Finish to Next>
  3. Click on Next> and you can then access the advanced options dialog.
  4. In the advanced options dialog you are given a list of all the fields for the table. Select one field that will act as a unique identifier field - the default is to have all the fields selected.
  5. You can also set the spatial reference system of your data if it is appropriate to do so.
  6. Click finish and then your layer will be added to your map.

You can also run the spatial queries against the postgres data base with relative ease although you have to manufacture an id field on the fly. e.g. Here is an example of doing a 100km buffer.

SELECT row_number() over(order by cities.the_geom)::integer as oid,
ST_BUFFER(cities.the_geom, 100000) AS the_geom,
FROM mygis.public.cities As cities

Not only that you can also save any query layer as a layer file and pass it through some of the standard ArcGIS tools as well. I have not tested this too much. So adding columns and stuff like that I could see that causing havoc. I think you could make spatial SQL calls with other databases like SQLServer and Oracle as well with a bit of fiddling to create the on the fly id field.

I did a full tutorial a while back at:

share|improve this answer

Using ODBC driver and instructions from ArcGIS help worked for my machine.

share|improve this answer
Does this method use the PostGIS extensions, or only the Arc SDE extensions to Postgresql? – fmark Jul 24 '10 at 4:22
For some strange reason I cant link correctly to ESRI web page. To get there try searching for 'setting postgresql' ArcGIS Desktop Help 9.3 website. To make it work you need to install PostgreSQL ODBC driver (psqlODBC) from and then add OLE DB connection from ArcCatalog. Hope that helps. – radek Jul 24 '10 at 19:16
Just to confirm, I don't want to use the ArcSDE extensions in Postgresql, I want to use ArcGIS with the PostGIS extensions to postgresql. Is this possible? The method you describe makes me think not. – fmark Jul 25 '10 at 23:25
sorry, wasn't clear for me that it's your requirement. i think you're able to use all PostGIS functionality with the method described by ESRI. not sure if there is any way to do it without ArcSDE tho. afraid we will have to wait for answers from more knowledgable people to solve that. – radek Jul 27 '10 at 14:42

GISquirrel does the job. Its a plugin which allows you to view/edit spatial data which is stored in both PostGIS and MS SQL server. A great solution for those who require multi-user editing at low cost.

share|improve this answer

PgMap was replaced by st-links spatialKit and not only supports PostGIS, but also supports SQL Server 2008. It works with ArcMap 9.3, and ArcMap 10. It just meets your requirement. Check it out at

share|improve this answer

I believe you have several options outside of using SDE (although I will point out you can use PG_Geometry in SDE, therefore accessing data via ESRI software or PostGIS compatible OS software). You have the ESRI Data Interoperability extension, ZigGIS, and you could probably install a copy of geoserver or mapserver and connect via a WMS service in ArcGIS. Similar to the previous post about zigGIS and the need to manage queries via pgAdmin, you would need to use it to create your queries with geoserver/mapserver. Ideally, if you were reusing the same queries, you could savee them as views in postgresql and access the data that way.

share|improve this answer

GISquirrel does the job very well for MSSQLserver, and I am quite sure it will work well for Postgres. I work in a mixed ESRI/Qgis environment, and I use GIS squirrel also to import shapefiles etc. into the database. In SQLserver GISsquirrel keeps track of the geometry columns, I use this information to update the geometry_columns table used by Qgis. Very handy ...

share|improve this answer

An easy way of adding PostGIS data to ArcMap is by adding an 'Interoperability Connection'. To do this, the 'Data Interoperability Extension' is required.

It's considered a good idea to add a 'Numeric Index' and 'Primary Key' to the PostGIS Database Table before creating the connection.

share|improve this answer

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.