Create new Shapefile

Jun 13, 2011 at 8:58 PM

I want to create a shape file of an airplane but do not know how to create such a thing.  I want to then draw the shape file of the airplane on a map and be able to orient it to any degree (0 to 359).

 

Can anyone show via code how to create such a shape file.

Thanks in advance

Developer
Jun 14, 2011 at 4:06 PM

Why not to use point shapefile and an icon (icons) of airplane? There is build-in functionality to rotate point icons.

See Shapefile.DefaultDrawingOptions.Pciture

See Shapefile.DefaultDrawingOptions.PcitureRotation.

To draw airplane as shape, you need to define coordinates of its outline and write you own code for rotation, which is more difficult.

Hope it'll help,

Sergei

Jun 15, 2011 at 7:51 PM

Thanks for the advice.  I have used the following code but I do not see the airplane icon show up anywhere?  The maps that I am trying to show this airplane upon are geo referenced tiff files.

Dim sf As New MapWinGIS.Shapefile

sf.DefaultDrawingOptions.Picture = _AirplaneImage ' Airplane image as bitmap

sf.DefaultDrawingOptions.PointRotation = theBearing

 _ChartLayout.RouteHandle = myChart.AddLayer(sf, True)

myChart.MoveLayerTop(_ChartLayout.RouteHandle)

myChart.Redraw()

Developer
Jun 17, 2011 at 12:32 AM

Try to set Shapefile.DefaultDrawingOptions.PointType = ptSymbolPicture

See some more info on this class here: http://mapwingis.codeplex.com/wikipage?title=Class%20schemes