May
3
A day with FeatureServer #2
Filed Under GIS, PostGIS, devs, Windows, Ubuntu, FeatureServer, Python, WFS, WMS, OpenStreetMap, Web2.0, Flickr, Twitter, OpenLayers | 2 Comments
In the previous post we have seen an introduction to FeatureServer, and we were just playing with the base edit sample, with the scribble layer.
Now it is time to use FeatureServer with our datasets: I am assuming that you will want to create FeatureServer services for shapefiles, PostGis layers, OpenStreetMap, Twitter and Flickr.
Feb
29
Do you get errors in the mapscript c# tutorial?…
Filed Under GIS, MapServer, PostGIS, devs, .NET, Tutorials, MapServer Tutorial for C# mapscript (ASP .NET), Windows | 6 Comments
…well, this is the solution to your problems (at least I hope so).
I am continuing receiving emails from people in despair that cannot successfully use this tutorial. I am sorry but I cannot answer to all this emails, so I thought to write this post in order to allow people to configure it correctly.
BTW, this demo is still working since 2 years without any problems, and the code there is just the same you can download from this blog. So it must work also for you
So if you just cannot use it, this is a check list:
If you receive the "Unable to load dll (mapscript)" error, look at this article from Tamas Szekeres (the mapscript c# mantainer).
Feb
21
A day with FeatureServer #1
Filed Under GIS, PostGIS, devs, Windows, Ubuntu, Apache, FeatureServer, QGIS, uDig, gvSIG, Python, WFS, WMS | 6 Comments
Some friends already spoke me well about FeatureServer by MetaCarta in the last weeks, so I already was waiting for having a bit of time to get started with it. Then James posted this on his blog, and my curiosity was definitely fired.
So I decided to spend a day for installing and testing it, without thinking of the lack of documentation (FeatureServer is still a young project, so no wonder here if the only way to get infos is digging in the source code and posting to the mailing list). The day I considered to spend on it then spawned to more and more hours that I could imagine, and given my actually very busy schedule at my job, I had to find free hours during the night and the weekend. I then decided to write this post to help people in getting started with FeatureServer in a quicker way that was for me.
FeatureServer is a simple and powerfull RESTful-Pythonic WFS server.
Only from this last sentence there are 3 very important things that made me like (and you should - also) FeatureServer before even getting started with it:
- Its RESTful architecture
- It is written in Python, and having chosen Plone as our CMS here at my office I am starting to like this language very much
- I truly believe that WFS is the way to go for remotely editing GIS data
Jan
30
Installing PostGIS on Ubuntu
Filed Under GIS, PostGIS, devs, Ubuntu, QGIS, uDig, gvSIG | 9 Comments
With this post I will show how to install PostGIS 1.2.1 on Postgres 8.2.5 in Ubuntu 7.10 (but this procedure should work also for previous PostGIS/Postgres/Ubuntu versions) from repositories.
I will also show you how to load and secure GIS data and how to access them with some cool OS GIS Client (QGIS, UDig and gvSIG).
If you use this instructions together with my previous post, you will have a fully functional GIS Server Open Source Ubuntu workstation!
-1- Install Postgres
If you haven't Postgres, you need to install it (PostGIS runs on top of it). Open an Ubuntu terminal, and type:
sudo apt-get install postgresql postgresql-client postgresql-contrib pgadmin3 sudo apt-get install postgresql pgadmin3
Postgres (8.2.5) will be now on your Ubuntu box.
Mar
30
For people not familiar with the Spatial SQL, I post this quick sample showing its beauty and simplicity at the same time.
We will go using PostGIS, but this could be performed in a similiar way with any GIS Database compliant with OGC Simple Feature Access - SQL Option.
The geomunion function
The geomunion Open GIS function make it possible to combine two geometries and getting from these a single geometry.
FUNCTION geomunion(geometry, geometry) RETURNS geometry
It is very easy to generate a geoprocessed layer from an original layer, making an union of its polygons based on a common attribute.
I will show you how to use the geomunion PostGIS function with a quick sample.
Mar
21
zigGis 1.2 released
Filed Under GIS, PostGIS, ArcGis Desktop, ZigGis | 7 Comments
zigGIS 1.2, the Open Source ArcGis Desktop's connector to PostGIS, has just been released and you can download it here.

This is a major release, as far it implements new important features like selections and rendering. At this time editing is still not supported (so it is still a read only connector).
Also ArcMap documents persistence is now fully supported, meaning that you can save your mxd document with your PostGIS layer in them, and then open them again without problems.
zigGis should correctly work with ArcGis 9.0 (sp3), 9.1 and 9.2. Before installing it don't forget to install .NET support for ArcGis.

Here is a list of supported and unsupported features in ArcMap with zigGis 1.2:
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
Sep
20
MapServer Tutorial for C# mapscript (ASP .NET)
Filed Under GIS, MapServer, PostGIS, devs, .NET, Tutorials, MapServer Tutorial for C# mapscript (ASP .NET) | 71 Comments
This tutorial will try to guide you step by step in implementing a GIS (Geographic Information Systems) web solution, based on Open Source software (MapServer), within the .NET Framework.
The tutorial is designed to work with Visual Studio 2003 and .NET 1.1, but you will easily be able to perform all the necessary steps to complete it using another version of Visual Studio (ie: Visual Studio 2005) or other IDEs (like Visual Web Developer 2005 Express Edition or even the notepad). It will work also using .NET 2 as c# mapscript is .NET 2 compatible.
The tutorial is focused to people with knowledge of C# (but can be easily implemented with .NET Visual Basic) and the .NET framework, and with some background in GIS. If you are new to GIS, a good place to start is here.
This tutorial could be easily adapted for other languages and frameworks rather than C# (or VB) and Microsoft .NET Framewok. In fact the Open Source component we are going to use (MapServer) is also available for PHP, Java and Python, and other languages.
The whole tutorial is downloadable at this address, where you can find the data (shapefiles) necessary to complete the tutorial (but you can easily adapt your data), and a complete working Visual Studio 2003 solution with this tutorial's code.
You can take a look at a working online demo of this tutorial here.
As we will implement a C# ASP .NET Application, take care about this issue (that should be solved in the future): MapServer thread safety and about plans to solve this issue.
Index of Tutorial
Introduction
1. Introduction to MapServer Web GIS development environment
2. Installing MapServer
3. Creating the MapFile and data configuration
4. Designing the tutorial user interface
5. Implementing the C# mapscript code
6. Migrating shapefiles to PostGIS
7. Connection MapFile layer to PostGIS
8. Adapting C# code to work indifferently with shapefile or PostGIS layers
And if the tutorial is not working for you (you get compilation errors, maps are not displayed, editing is not working…), please take a look here
