Thinking in GIS
a blog about GIS from a urban geogeek living at the countryside
Installing zigGIS 1.1 for connecting ArcMap to PostGIS layers
Posted: February 14, 2007Categories: GIS, .NET, ArcObjects, devs, PostGIS, ArcGis Desktop, ZigGis, COM
Feedback: View Comments
zigGIS is an Open Source PostGIS connector for ArcGIS Desktop, that enables ArcMap to add PostGIS layers in the map. Differently from other kinds of connectors, like for example PgArc, the very nice feature of zigGIS is the direct-read of PostGIS data, without the needs of proxy shapefiles. This meaning that the PostGIS features are directly readed and displayed in ArcMap from the PostGIS data source without a previous conversion to a Shapefile or personal GDB.

Briefly you have to check two main things:
1) your computer has the .NET 2.0 framework installed There are many ways to check this:
-You can check this by verifying that the following folder exists: C:WINNTMicrosoft.NETFrameworkv2.0.50727 (or something like this still starting with v2.0.xxxxx)
-You can go (only from Internet Explorer!) to this page. They will check if you already are ready to install ASP .NET Web Matrix. If yes this means that .NET 2.0 framework is already on your computer, if not there is a link from where you can eventually download .NET Framework Redistributable
2) your computer has the ArcObjects assembies installed (.NET support installed) On ArcGIS 9.2 you should not have problems, as .NET ArcObjects assemblies are installed by default (according to this thread on Esri support forum). If you are with 8.3, 9.0 and 9.1 it is very possibly that these assemblies were not installed in the original ArcGIS installation, as they are by default not checked at the ArcGIS desktop installer. You can check if Esri assemblies are in the .NET GAC by looking at this folder 'C:WINNTassembly' for Windows NT and 2000, and at this folder 'C:WINNTassembly' for Windows XP. If in this folder you can see that there are the Esri entries, like Esri.ArcGIS.Geodatabase, then you are all right and you can install without problems zigGIS. If you have not these assemblies at this folder, you have to install the .NET support for ArcGIS desktop, and AFAIK the best way to do so is to install them from the ArcGIS Desktop Developer KIT DVD.
After having succesfully checked these two main things, you can proced with installing zigGIS. Download the latest zigGIS installer from the zigGIS google code web site. At this date the latest available release is 1.1.0 (build 20768). After downloading the installer open the zip file and procede with installations. Before starting ArcMap and adding PostGIS data, you have to configure your zigGIS connection in zig file.
A sample zigGIS file, example.zig, is provided with the installation, under the zigGIS installation path (default is: C:Program FilesPulpZigGis). You can use this example.zig file or copy it and rename it as you think.
Now open and edit the zig file with your PostGIS settings:
; Your PostgreSQL server.
server = localhost
; Your PostgreSQL server's port.
port = 5432
; Your PostGIS database.
database = TUTORIAL
; Your PostGIS user.
user = myuser
; Your PostGIS password.
password = mypassword
Now open ArcMap and go to menu Tools>Customize. In the Customize dialog box browse to Commands tab, and from there select the zigGIS category. Select the 'Add PostGIS layer' and drag & drop it on any ArcMap's toolbar. Close the dialog and click on the new botton you have in the toolbar. You will need to provide a zig file (the one you have previously edited), where there are the settings for your PostGis connections. Browse to the zig file you just created/modified. In the layer list check the PostGis layer(s) you want to add in ArcMap. Press ok, and if everything is fine the PostGis layer should be added in ArcMap.
Happy PostGis data browsing with ArcMap!