Use PostGIS 2.x in manifold GIS 8.0.x

Solution applies to manifold 8.0.29 and older versions.

In PostGIS 2.x some spatial functions changed names and so far manifold has not been updated to reflect that. When linking the PostGIS data with AOI windowing, manifold tries to call a function called SetSRID - the equivalent is now st_setstrid. This pretty much may prevent users from using newest pgsql/postgis combo with manifold as obviously a db reports an exception.

In order to make things work, it is required to add a fake SetSRID function to PostGIS, so manifold is happy again. To do so, just review the code of the native st_setsrid function and create its SetSRID equivalent:

CREATE OR REPLACE FUNCTION SetSrid(geometry, integer)
  RETURNS geometry AS
'$libdir/postgis-2.0', 'LWGEOM_set_srid'
  COST 1;
ALTER FUNCTION SetSrid(geometry, integer)
  OWNER TO postgres;
COMMENT ON FUNCTION SetSrid(geometry, integer) IS 'args: geom, srid - Sets the SRID on a geometry to a particular integer value.';

Debugging Corel X7 .NET AddOn

There are 2 ways of debugging an X7 AddOn I am aware of:

  • Attach to a running Corel process: Debug\Attach to Process - find Corel.exe

  • Set the debug options in the project's properties, so when hitting F5 CorelDRAW is launched first

The expected behavior is now pretty obvious:

Note: When going for the latter option, make sure the path in the AppUI.xslt points to a dll that is created when compiling the project. Otherwise VS will not see the dll being loaded and debugger will not hit any breakpoints (when going for the former option, in order to avoid a need to copy a dll over and over again do debug it, it is worth adjusting the path too ;)

Corel X7 .NET AddOn

Shelbym wrote some nice guides on how to create custom .NET dockers for CorelDRAW x6. There where some changes in X7 described here.

This post is pretty much about putting the above together, so one can quickly start playing with custom tools in X7.

The content of the attached archive is as follows:

  • TestAddOn - a ready to go X7 addon; just coy it to the CorelDRAW Graphics Suite X7\Programs64\Addons and review the Window\Dockers
  • TestAddOnSolution - an extremely simplistic project to give an idea on how to start with the addon customisation
  • TestAddonTemplate - UserUI and AppUI xslts that make orel create Window\Dockers entry and load the custom dll (64.5KB)

Installing mongodb as a service on windows

  1. Get the latest version of mongodb from here.
  2. Unpack the content of the archive wherever you need.
    1. [edit] looked at v3 at some point and could not find the binary - only msi available. in order to unpack msi use 7zip or type the following in the cmd (you may need admin rights); instaling msi will also extract it ;)
    2. msiexec /a filepath to MSI file /qb TARGETDIR=filepath to target folder
  3. Create a directory for the db data
  4. Prepare a mongodb config, for example:
  5. systemLog:
        destination: file
        path: "h:\\ere\\goes\\path\\to\\the\\logfile.log"
        quiet: true
        logAppend: true
            enabled: true
        port: 10005
        bindIp: 1270.0.0.1
        dbPath: h:\\ere\\goes\\db\\path\\
    • starting with 2.6 cfg is in yaml, the old syntax is compatible though
    • spaces are used for indentation, tabs will not do (see)
    • paths need to be escaped
  6. Install mongodb as a service:
  7. mongod.exe --config h:\ere\goes\the\cfg\path --install
    • By default --install command will create a service named MongoDB; in order to adjust it have a look at the --serviceName, --serviceDisplayName and --serviceDescription params
    • By default the service will be configured to be runned under the ".\LocalSystem" not the "NT AUTHORITY\NetworkService" account as one coulde expect; If you want to specify a service user / pass use the --serviceUser and --servicePassword args

  8. And start it either through the services tab of the task manager or from the command line:
  9. net start serviceName

The service can be stopped through the services tab or from the command line:

net stop serviceName

To uninstall the service run:

mongod.exe --remove --serviceName sName

OpenLayers 2.12 high res display chrome rendering problems

Since ol3 is almost ready, perhaps this post a bit outdated already... I expect though some ol 2.x based apps will not migrate so soon and will be out there for a while.

Anyway, there is a chrome bug described here, here and here, that may affect some apps runned in chrome when using higher res displays. In order to make the map rendering better, some css overrides are needed:

svg {
	-webkit-transform: none !important;

.olTileImage {
	-webkit-backface-visibility: visible !important;
	-webkit-transform: none !important;

.olLayerGrid .olTileImage {
	-webkit-transition: none !important;