Feb
21
PostGis WorkspaceFactory
Filed Under GIS, PostGIS, ArcObjects, ArcGis Desktop, devs, .NET, COM, ZigGis | 2 Comments
In my previous post I have showed you how to install and using zigGIS for adding PostGIS data into ArcMap.
From the ArcMap user interface you just need to press the zigGIS button and an "Add PostGIS data" dialog will be shown to you. From there you can set a zig File path, where PostGIS connections settings are stored, and then a PostGIS layers list will be shown and you can check which layer(s) add to the map.

In this post I will show how to programmatically use zigGIS and ArcObjects to add PostGIS data into ArcMap.
zigGIS is a Microsoft .NET 2.0 library that can be used from .NET clients and also from COM clients.
You could use it in your ArcObjects .NET applications/library to manage PostGIS data, in any .NET language like VB .NET and C#.
As zigGIS it is obviously exposed to COM (ArcObjects are in COM), you could also use it in your COM applications/library, for example in applications developed with Visual Basic 6 and ArcMap's VBA (Visual Basic for Application).
Read more
Feb
14
Installing zigGIS 1.1 for connecting ArcMap to PostGIS layers
Filed Under GIS, PostGIS, ArcObjects, ArcGis Desktop, devs, .NET, COM, ZigGis | 1 Comment
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.

This is a very interesting project, but still in a very early phase, in fact there are still important issues that are planned to be solved in the next future, like:
- edit features (edit PostGIS layer from ArcMap is still not implemented, and it is read-only)
- symbology not working (only simple symbol rendering is currently working)
- selections are not supported
Read more
Jan
4
COM ArcObject passed to .NET library: how to cast, access and debug it
Filed Under GIS, ArcObjects, ArcGis Desktop, devs, .NET, COM | Comments Off
Generally when developing your .NET ArcObjects library you are managing all .NET objects, because the ArcObjects are wrapped by the RCW, Runtime Callable Wrapper (preferably created by Esri, using the Primary Interoperability Assemblies, PIA, installed with ArcGIS desktop in the GAC).
You can then expose your .NET library to COM by a CCW, COM callable wrapper, creating a tlb with regasm (automatically done using Visual Studio if you check the 'Register for COM interop' option, under the Build tag of project's property dialog).
Using the RCW ArcObjects we are always using Managed code, so we don't get in troubles.
But what if a COM ArcObject is calling a method, sinking an event, or setting/getting a property from our .NET library?
Read more