This project is read-only.

Doing DotSpatial in Microsoft Visual C# 2010: How can I get GIS Points, Polylines, & Polygons of Vectors drawn in DataSpatial.Data? Do I need GDAL Extension?

Feb 7, 2011 at 9:36 PM

Hi all,

I have set up the DotSpatial Legend and Map Layers in my first project in Microsoft Visual C# 2010 Express.  I plan to draw GIS points, polylines, and polygons of Vectors in the DotSpatial Legend and Map Layers project. I read the Sample Codes in Wiki, but I do not know how to execute them.  Please help and advise me how to do them and whether I need GDAL Extension to do these tasks. If I need GDAL Extension, how can I get it?


Scott Chang  

Feb 7, 2011 at 10:05 PM

GDAL is used for opening rasters, so you won't need it for those operations.

See for some sample code

Feb 8, 2011 at 3:12 PM

Hi mudnug, Thanks for your response.

I read the documents of "Getting Started Sample Code" in MapWindow Six you mentioned and I launched my "Creat Random Points in C#" programming in my "DotSpatial_Legend-MapLayers" project.  In the MapWindow Six, there are using MapWindow.Data, using MapWindow.Geometries, and using MapWindow.Projections.  In my project, I used  using DotSpatial.Data, using DotSpatial.Geometries, and using DotSpatial.Projections and tried to do "Add Reference" for these .dll files from the "DotSpatial 12-15-2010" dll library in my C: Drive. I can not find DotSpatial.Geometries.dll in the "DotSpatial 12-15-2010" dll library.  Please tell me which dll file in the "DotSpatial 12-15-2010" dll library is corresponding to the "MapWindow.Geometries.dll" file.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms; 
using DotSpatial.Data;
using DotSpatial.Geometries;
using DotSpatial.Projections;

namespace scDotSpatial_1
    public partial class Form1 : Form
        public Form1()


Error 1 The type or namespace name 'Geometries' does not exist in the namespace 'DotSpatial' (are you missing an assembly reference?) C:\Documents and Settings\e1enxshc\my documents\visual studio 2010\Projects\scDotSpatial-1\scDotSpatial-1\Form1.cs 10 18 scDotSpatial-1


After I am done with the projects for "Create New Vectors", I will proceed to do the "Map" of "Getting Started Sample Code".  I saw: using MapWindow.Drawing, using MapWindow.Map, using Point=MapWindow.Geometries.Point in MapWindow Six. But I did not see the coressponding dll file in the "DotSpatial 12015-2010" dll library.  Could you please tell me the right dll files in the "DotSpatial 12-15-2010" dll library to use for the "Map" and other programmings in DotSpatial or let me know where I can find the description of all the dll files of DotSpatial 12-15-2010?   

Please respond.


Scott Chang 

Feb 9, 2011 at 6:22 PM

Hi Scott,

Instead of MapWindow.Geometries you have to use "DotSpatial.topology.dll".

Some of the tutorials on are not up to date. If you're getting started with DotSpatial programming, please also check out the new tutorials on the DotSpatial Tutorials page.