I’ve recently completed my first custom tool for CadCorp’s Map Modeller. CadCorp is most used in the UK, and it is apparently also big in Japan. The main benefit is that it reads many different spatial data formats directly, it can connect to SQL Server and Oracle without middleware (i.e. an SDE type application), and it is a leader in the open standards espoused by the Open Geospatial Consortium.

cadcorp

In terms of development the main issue is that there appear to be very few people developing tools around CadCorp’s products apart from CadCorp themselves. This means that the only code samples are in the help system installed with the tool, and a PDF file. Straying outside these samples I found involves a lot of trial and error. There is a forum on the CadCorp site – annoyingly registration is required to read the posts, and there are very few programming related posts. The CadCorp staff do however get back to you on any questions you pose.

Continue reading »

I use Visio for a number of tasks. For creating geodatabase models in ArcGIS, for system architecture diagrams, and for data flow models. It may not be the easiest program to use, but the alternatives are often too simplistic, or worse.

I wanted to generate a nice diagram of a SQL Server database I had created, and automatically create hyperlinks that would pop up an Ajax box with sample records directly from the database. In order to do this each hyperlink had to have a variable based on the table/entity name. However it soon became apparent that there is no easy way to access the entity name in VBA from its associated shape object. The solution to this is the VisioModelingEngine library which provides access to the UML, but does not provide access to the shapes.
Continue reading »

An often required function is to get a specific layer from a current map document. The code below is for VB.NET and requires a map document and uses the alias name of the feature class. The first function returns all IGeoFeature layers in a map – these are layers based on vector geographic data. The second loops through these layers and compares the layer names.

Continue reading »

I’ve recently been working again with Intergraph’s Geomedia WebMap 5.2. Development can be done in .NET, which seemed very advanced a few years ago when ESRI’s flagship product was ArcIMS..

However it seems that line features can only be rendered as solid lines (no dots or dashes)..a very strange oversight, especially when it appears the outlines of polygons can have linear styling!

I’m going to be installing version 6 soon to see if it has been resolved, and see if there are any new features.

It can be frustrating when a code sample that seems to do exactly what you want is written in C#, and your application is in VB.Net. http://www.kamalpatel.net/ConvertCSharp2VB.aspx solves this problem by converting the C# code directly into its VB.Net equivalent – all online and for free for code up to 6.15KB in size, and for larger amounts of code a tool can be downloaded for free.

It does the majority of the conversion well but I ran into a few minor problems where line breaks were not taken into account.

This tool will be even more useful when the ESRI samples, the majority of which are only available in VB6, are updated to .NET…

Aug 172007

I recently added some Lorem Ipsum text to fill in some space on a prototype ASP.NET website I made recently, which lead to a few questions from the client (a person not a machine) such as “what language is all this text in?!” A handy generator and a history of Lorem Ipsum can be found here.

However far more amusingly is the generator at http://www.malevole.com/mv/misc/text/. There are some real classics in there…

Mutley

“Mutley, you snickering, floppy eared hound. When courage is needed, you’re never around. Those medals you wear on your moth-eaten chest should be there for bungling at which you are best. So, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon, stop that pigeon. Howwww! Nab him, jab him, tab him, grab him, stop that pigeon now.”

Aug 132007

I’ve been listening recently to “.NET Rocks!” twice weekly .NET development podcasts. It is very easy to listen to, mainly due to the personalities of the presenters, and it gives a good overview of .NET develpment and related technologies. Software development as a whole is often discussed – test driven development, agile programming, management, spaghetti code…

A full archive of previous episodes is available for download (for free), and I found an epsiode that gives a good introduction to Python – it can be downloaded here. I’m still not convinced of the use of Python and ArcObjects as explaining how to run scripts with parameters to GIS users, or creating custom toolboxes, takes as much time as creating a nice UI in Visual Studio. In the show one of the presenters asks “but don’t you miss the Visual Studio environment and intellisense?”, which I couldn’t agree more with. However there is also mention of IronPython, which I knew had something to do with .NET, but it can also apparently be used within the Visual Studio environment which could make life a whole lot easier.

I’m off to download IronPython now…

Python