0

I am looking for a opensource tool to display spatial data. I found MapWinGis. There a lot of examples how to open a shape, but what i want is top open a Oracle table and display it.

This is what i have (and does not work and the LastErrorCode doesn't say anything):

private void button1_Click(object sender, EventArgs e)
        {
            string connectionString = "host=ubuntu:1521/test dbname=MYTESTDATABASE user=TEST_USRER password=TEST_USER"; 
            var layer = new OgrLayer();
            if (layer.OpenFromDatabase(connectionString, "OEFEN_TABEL_GEOM"))
            {
                // only layer handle for the first layer being added is returned
                int layerHandle = axMap1.AddLayer(layer, true);
            }
            else
            {
                MessageBox.Show("Failed to open: " + layer.get_ErrorMsg(layer.LastErrorCode));
            }
        }
APC
  • 144,005
  • 19
  • 170
  • 281
Hansvb
  • 113
  • 1
  • 1
  • 13
  • So does the table contain spatial data? – APC Dec 10 '17 at 14:43
  • Yes, but there are 2 spatial columns. 1 with geometry and one empty. – Hansvb Dec 10 '17 at 15:27
  • This is an old question but did you solve it? The latest versions of MapWinGIS have improvements in this area. I wonder if it also solves your problem. The latest version can be downloaded from https://github.com/MapWindow/MapWinGIS/releases – Paul Meems Feb 26 '19 at 08:09

0 Answers0