Wednesday, January 28, 2009

Fix GeoMedia WebMap 6.1 Administrator permissions error

After a new installation of GeoMedia WebMap 6.1, sometimes while using the Administrator to
configure some system settings such as the virtual cache directory, I would get an error message as shown in the figures below.


The description "Error opening registry key 'MapServer':Access is denied" is a good indicator of what went wrong. It seems that the Administrator is unable to write to the registry key and we can check this out by opening up the Registry Editor by running regedit in the Command prompt.

In the Registry Editor, if we expand the nodes \\HKLM\SOFTWARE\Intergraph\GeoMedia Web Map\06.01\ we should be able to see something like the following figure.



Click on a node such as 06.01 and select Edit > Permissions in the Registry Editor's menu.

The Permissions for 06.01 dialog box should appear as shown below.



And examining the properties tells us that the Administrator's group has no permission to write to the registry key(s). So to fix the problem, simply toggle on the Allow Full control and Read permissions and press OK.



After doing the above, you should be able to configure the GeoMedia WebMap Administrator System Settings.

Monday, January 19, 2009

Include Directories and Library for Developing PostGIS C Programs

To start developing PostgreSQL and PostGIS C/C++ programs in Microsoft Visual Studio 6.0, there are a couple of Include file directories which you should set as part of the configuration of the development environment. The directories are the following:
(a) c:\PROGRAM FILES\POSTGRESQL\8.x\INCLUDE\
(b) c:\PROGRAM FILES\POSTGRESQL\8.x\INCLUDE\LIBPQ\

These can be set in the Options dialog box which can be opened by selecting Tools > Options in Microsoft Visual Studio 6.0, as shown below.



Besides the include files setting, another useful directory to define is the Library files directories. Only one library directory - C:\PROGRAM FILES\POSTGRESQL\8.x\LIB\ need to be set in the Options dialog box, as shown in the figure below.



The PostgreSQL/PostGIS executable you are developing can be statically linked with the PostgreSQL library libpq.lib. Or if you prefer, you can link the executable to the dynamic link library libpq.dll. Select Project > Settings to open the Project Settings dialog box and type in the library to link to under the Link tab, as shown in the figure below.