[Gdal-dev] OGR C# .NET

Andrew Timmins drewtimmins at gmail.com
Mon Apr 16 17:29:45 EDT 2007


Is there any way you can use the OGR lib in C# .NET ?
I downloaded FWTools and found a /csharp/ directory with a dll called
ogr_csharp.dll
But when I try and use this in a project I get errors.
[Error]
"The type initializer for 'OGR.ogr' threw an exception"

my Code


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using OGR;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {

            InitializeComponent();

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            ogr.RegisterAll();
        }
    }
}


If anyone has any ideas please reply.

Thanks,
Drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070416/f252d807/attachment.html


More information about the Gdal-dev mailing list