This project has moved and is read-only. For the latest updates, please go here.

How to get Shape type

Topics: SharpMap v0.9 / v1.x
May 10, 2011 at 5:47 PM

Hi all

i am new in sharp map development. I want to get the shape type(like point,polygon or line) of loaded shapefile. Which functionality should i use.

May 10, 2011 at 9:54 PM

Hello makreal,

use ShapeFIle provider's ShapeType property

Hth FObermaier

May 12, 2011 at 6:07 PM

Thanks for reply can you give example code to check whether a shape file has point or polygon or point shape type .

something like that

if name) then

do something

i m using 0.9 version

May 12, 2011 at 7:50 PM
if (shp.ShapeType != ShapeType.Polygon)  

Add your check for the ShapeType you are looking for where shp is your Shape File, make sure you open it before that.  That help?