MapWinGIS:Shapefile BeginPointInShapefile

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

BeginPointInShapefile

Loads all points from all shapes in the shapefile into memory to allow better performance when calling the shapefile function PointInShapefile. If you are making extensive use of the PointInShapefile function you should notice improved performance in your application when you call BeginPointInShapefile before calling PointInShapefile.
See also PointInShapefile and EndPointInShapefile


VB.NET Usage

Function BeginPointInShapefile() As Boolean

            Parameters

ReturnValue

A boolean value representing the success or failure of loading all points in all shapes in the shapefile.

Sample Code

    Private Sub BeginPtInSf()
        Dim sf As New MapWinGIS.Shapefile()
        Dim shapeindex As Integer
        'Load all points in all shapes in the shapefile into memory
        sf.BeginPointInShapefile()
        'See if a point is in the shapefile, returning the index of the shape or -1 if point doesn't lie in shapefile
        shapeindex = sf.PointInShapefile(100, 200)
    End Sub
  

VB 6 Usage
Function BeginPointInShapefile() As Boolean
            Parameters

ReturnValue

A boolean value representing the success or failure of loading all points in all shapes in the shapefile.

Sample Code

    Private Sub BeginPtInSf()
        Dim sf As New MapWinGIS.Shapefile
        Dim shapeindex As Long
        'Load all points in all shapes in the shapefile into memory
        sf.BeginPointInShapefile
        'See if a point is in the shapefile, returning the index of the shape or -1 if point doesn't lie in shapefile
        shapeindex = sf.PointInShapefile(100, 200)
    End Sub

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:Shapefile_BeginPointInShapefile"

This page has been accessed 3,038 times. This page was last modified on 9 November 2005, at 18:26.