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
19
Full OSS solution vs OSS/commercial solution mix
Filed Under GIS, PostGIS, ArcObjects, devs, .NET, Java, ZigGis, CMS | 5 Comments
I wanted to leave a comment in this Bill Dollin's post, but after that it came out to my mind to leave a trackback to it, and going with a my own post on this subject as far as I have several things to discuss about.
In the OSS jungle, it looks there are in the last times more and more solutions and projects based on commercial closed-code software. For example zigGIS, the Open Source ArcGIS connector for PostGIS, in which I am involved, is by itself an OS project tied to proprietary frameworks (Microsoft and Esri). This is many times not so good, as I cannot dig, for example, in Esri ArcObjects core code for understanding why a particular issue is coming out.
At my office we are in the process of taking an important strategic decision.
We are going to replace our actual commercial closed-source CMS (Content Managment System) - that we were using for some portals we manage for several years - for an Open Source solution.
Read more
Jan
5
Running and debugging unit tests with NUnit and Visual Studio
Filed Under GIS, ArcObjects, devs, .NET, OOAD, Unit Test | 1 Comment
For .NET developers a very usefull and free framework for unit testing is NUnit, that is a .NET implementation of the popular JUnit for Java.
I am using this for unit testing zigGIS, the Open Source ArcGis Desktop connector for PostGIS in which I am currently involved.
I will show you in this post how easy and powerfull is to create, run and debug unit test for a .NET library or application.
After installing NUnit, you can add a reference to it in your VS solution. After doing so you are ready to implement one or more classes (fixtures) for performing unit tests.
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