MapWinGIS:Shapefile QuickExtents
From MapWindow GIS
QuickExtents
Gets the extents of the specified shape. Note: Use this function to get the extents of a shape in a shapefile when speed is essential.
See also Extents
VB.NET Usage
Function QuickExtents(ShapeIndex As Integer) As MapWinGIS.Extents
Parameters
|
ShapeIndex | The index of the shape for which the extents are required. |
| ReturnValue | The Extents object representing the extents of the specified shape in the shapefile. |
Sample Code
Private Sub QuickExtents()
Dim sf As New MapWinGIS.Shapefile()
Dim extents As New MapWinGIS.Extents
'Get the extents for shape 0 in the shapefile using the fastest method available
extents = sf.QuickExtents(0)
'Get the extents for shape 0 in the shapeifle using the slowest method avaiable
extents = sf.Shape(0).Extents()
End Sub
VB 6 Usage
Function QuickExtents(ShapeIndex As Long) As Extents
Parameters
|
ShapeIndex | The index of the shape for which the extents are required. |
| ReturnValue | The Extents object representing the extents of the specified shape in the shapefile. |
Sample Code
Private Sub QuickExtents()
Dim sf As New MapWinGIS.Shapefile
Dim extents As New MapWinGIS.extents
'Get the extents for shape 0 in the shapefile using the fastest method available
Set extents = sf.QuickExtents(0)
'Get the extents for shape 0 in the shapeifle using the slowest method avaiable
Set extents = sf.shape(0).extents()
End Sub
















