User Tools

Site Tools


12.0:apis:thinkgeo.core.maputil

ThinkGeo.Core.MapUtil

Inheritance Hierarchy

  • System.Object
    • ThinkGeo.Core.MapUtil

Members Summary

Public Constructors

Protected Constructors

Public Methods

GetType()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Type
  • Description:N/A
Parameters

ToString()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters

Equals(Object)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters
  • obj
    • Type:Object
    • Description:N/A

GetHashCode()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetResolutionFromScale(Double,GeographyUnit,Single)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters
  • scale
    • Type:Double
    • Description:N/A
  • dpi
    • Type:Single
    • Description:N/A

GetResolution(RectangleShape,Double,Double)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters
  • widthInPixel
    • Type:Double
    • Description:N/A
  • heightInPixel
    • Type:Double
    • Description:N/A

GetScale(RectangleShape,Single,GeographyUnit,Single)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters
  • screenWidth
    • Type:Single
    • Description:N/A
  • dpi
    • Type:Single
    • Description:N/A

GetScale(GeographyUnit,RectangleShape,Double,Double,Single)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters
  • widthInPixel
    • Type:Double
    • Description:N/A
  • heightInPixel
    • Type:Double
    • Description:N/A
  • dpi
    • Type:Single
    • Description:N/A

GetSnappedScale(RectangleShape,Single,GeographyUnit,ZoomLevelSet)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters
  • screenWidth
    • Type:Single
    • Description:N/A

GetSnappedScale(Double,ZoomLevelSet)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters
  • scale
    • Type:Double
    • Description:N/A

CalculateExtent(PointShape,Double,GeographyUnit,Double,Double)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • scale
    • Type:Double
    • Description:N/A
  • mapWidth
    • Type:Double
    • Description:N/A
  • mapHeight
    • Type:Double
    • Description:N/A

AdjustExtentByRestrictions(RectangleShape,Single,Single,RectangleShape,Double,Double,GeographyUnit)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • width
    • Type:Single
    • Description:N/A
  • height
    • Type:Single
    • Description:N/A
  • maximumScale
    • Type:Double
    • Description:N/A
  • minimumScale
    • Type:Double
    • Description:N/A

ToWorldCoordinate(RectangleShape,Double,Double,Double,Double)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • screenX
    • Type:Double
    • Description:N/A
  • screenY
    • Type:Double
    • Description:N/A
  • screenWidth
    • Type:Double
    • Description:N/A
  • screenHeight
    • Type:Double
    • Description:N/A

GetDistance(PointShape,PointShape)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters

GetSnappedZoomLevelIndex(RectangleShape,GeographyUnit,Collection<Double>,Double,Double)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters
  • zoomLevelScales
    • Type:Collection<Double>
    • Description:N/A
  • actualWidth
    • Type:Double
    • Description:N/A
  • actualHeight
    • Type:Double
    • Description:N/A

GetSnappedZoomLevelIndex(Double,ZoomLevelSet)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters
  • scale
    • Type:Double
    • Description:N/A

GetSnappedZoomLevelIndex(Double,IEnumerable<Double>,Double,Double)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters
  • scale
    • Type:Double
    • Description:N/A
  • zoomLevelScales
    • Type:IEnumerable<Double>
    • Description:N/A
  • minimumScale
    • Type:Double
    • Description:N/A
  • maximumScale
    • Type:Double
    • Description:N/A

GetRotatedScreenPoint(Double,Double,Single,ScreenPointF)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • x
    • Type:Double
    • Description:N/A
  • y
    • Type:Double
    • Description:N/A
  • rotatedAngle
    • Type:Single
    • Description:N/A

GetRotatedPoint(Double,Double,Single,PointShape)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • x
    • Type:Double
    • Description:N/A
  • y
    • Type:Double
    • Description:N/A
  • rotatedAngle
    • Type:Single
    • Description:N/A

GetRotatedExtent(RectangleShape,Single,PointShape)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • rotatedAngle
    • Type:Single
    • Description:N/A

GetRotatedPolygon(RectangleShape,Single,PointShape)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • rotatedAngle
    • Type:Single
    • Description:N/A

ApplyDrawingMarginToExtent(RectangleShape,Single,Single,Single)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • marginInPixel
    • Type:Single
    • Description:N/A
  • screenWidth
    • Type:Single
    • Description:N/A
  • screenHeight
    • Type:Single
    • Description:N/A

CenterAt(RectangleShape,PointShape,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns an adjusted extent centered on a point.
Parameters
  • worldExtent
    • Description:This parameter is the current extent you want to center.
  • worldPoint
    • Description:This parameter is the world point you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

CenterAt(RectangleShape,Feature,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns an adjusted extent centered on a point.
Parameters
  • worldExtent
    • Description:This parameter is the current extent you want to center.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the world point you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

CenterAt(RectangleShape,Single,Single,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns an adjusted extent centered on a point.
Parameters
  • worldExtent
    • Description:This parameter is the current extent you want to center.
  • screenX
    • Type:Single
    • Description:This parameter is the X coordinate on the screen to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the Y coordinate on the screen to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetBoundingBoxOfItems(IEnumerable<BaseShape>)

  • N/A
Remarks
  • N/A
Return Value
  • Description:The BoundingBox that contains all of the shapes you passed in.
Parameters
  • shapes
    • Type:IEnumerable<BaseShape>
    • Description:The target group of BaseShapes to get the BoundingBox for.

GetBoundingBoxOfItems(IEnumerable<Feature>)

  • N/A
Remarks
  • N/A
Return Value
  • Description:The BoundingBox that contains all the features you passed in.
Parameters
  • features
    • Type:IEnumerable<Feature>
    • Description:The target group of Features to get the BoundingBox for.

GetDrawingExtent(RectangleShape,Single,Single)

  • N/A
Remarks
  • This function is used because the extent to draw must be the rame ratio as the screen width and height. If they are not, then the image drawn will be stretched or compressed. We always adjust the extent upwards to ensure that no matter how we adjust it, the original extent will fit within the new extent. This ensures that everything you wanted to see in the first extent is visible and maybe a bit more.
Return Value
  • Description:This method returns an adjusted extent based on the ratio of the screen width and height.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to adjust for drawing.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetScreenDistanceBetweenTwoWorldPoints(RectangleShape,PointShape,PointShape,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Type:Single
  • Description:This method returns the number of pixels between two world points.
Parameters
  • worldExtent
  • worldPoint1
    • Description:This parameter is the first point – the one you want to measure from.
  • worldPoint2
    • Description:This parameter is the second point – the one you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetScreenDistanceBetweenTwoWorldPoints(RectangleShape,Feature,Feature,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Type:Single
  • Description:This method returns the number of pixels between two features.
Parameters
  • worldExtent
  • worldPointFeature1
    • Type:Feature
    • Description:This parameter is the first feature – the one you want to measure from.
  • worldPointFeature2
    • Type:Feature
    • Description:This parameter is the second feature – the one you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

GetSnappedExtent(RectangleShape,GeographyUnit,Single,Single,ZoomLevelSet)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • screenWidth
    • Type:Single
    • Description:N/A
  • screenHeight
    • Type:Single
    • Description:N/A

GetWorldDistanceBetweenTwoScreenPoints(RectangleShape,ScreenPointF,ScreenPointF,Single,Single,GeographyUnit,DistanceUnit)

  • N/A
Remarks
  • None
Return Value
  • Type:Double
  • Description:This method returns the distance in world units between two screen points.
Parameters
  • worldExtent
  • screenPoint1
    • Description:This is the screen point you want to measure from.
  • screenPoint2
    • Description:This is the screen point you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.
  • worldExtentUnit
    • Description:This is the geographic unit of the world extent rectangle.
  • distanceUnit
    • Description:This is the geographic unit you want the result to show in.

GetWorldDistanceBetweenTwoScreenPoints(RectangleShape,Single,Single,Single,Single,Single,Single,GeographyUnit,DistanceUnit)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double
  • Description:N/A
Parameters
  • worldExtent
  • screenPoint1X
    • Type:Single
    • Description:This parameter is the X of the point you want to measure from.
  • screenPoint1Y
    • Type:Single
    • Description:This parameter is the Y of the point you want to measure from.
  • screenPoint2X
    • Type:Single
    • Description:This parameter is the X of the point you want to measure to.
  • screenPoint2Y
    • Type:Single
    • Description:This parameter is the Y of the point you want to measure to.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.
  • worldExtentUnit
    • Description:This is the geographic unit of the world extent you passed in.
  • distanceUnit
    • Description:This is the geographic unit you want the result to show in.

Pan(RectangleShape,PanDirection,Int32)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns a panned extent.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to pan.
  • direction
    • Description:This parameter is the direction in which you want to pan.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to pan.

Pan(RectangleShape,Single,Int32)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns a panned extent.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to pan.
  • degree
    • Type:Single
    • Description:This parameter is the degree you want to pan.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to pan.

ToScreenCoordinate(BaseShape,RectangleShape,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Type:BaseShape
  • Description:This method returns BaseShape in screen coordinates from BaseShape in world coordinates.
Parameters
  • shape
    • Type:BaseShape
    • Description:This parameter is the shape in world coordinate you want converted to a shape in screen coordinate.
  • worldExtent
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToScreenCoordinate(RectangleShape,RectangleShape,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns Rectangle in screen coordinates from RectangleShape in world coordinates.
Parameters
  • worldExtent
  • targetWorldExtent
    • Description:This parameter is the rectangle shape in world coordinate you want converted to a rectangle in screen coordinate.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToScreenCoordinate(RectangleShape,Double,Double,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns screen coordinates from world coordinates.
Parameters
  • worldExtent
  • worldX
    • Type:Double
    • Description:This parameter is the world X you want converted to screen points.
  • worldY
    • Type:Double
    • Description:This parameter is the world Y you want converted to screen points.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToScreenCoordinate(RectangleShape,PointShape,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns screen coordinates from world coordinates.
Parameters
  • worldExtent
  • worldPoint
    • Description:This parameter is the world point you want converted to a screen point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToScreenCoordinate(RectangleShape,Feature,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns screen coordinates from world coordinates.
Parameters
  • worldExtent
  • worldPointFeature
    • Type:Feature
    • Description:This parameter is the feature you want converted to a screen point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToWorldCoordinate(RectangleShape,Single,Single,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns world coordinates from screen coordinates.
Parameters
  • worldExtent
  • screenX
    • Type:Single
    • Description:This parameter is the X of the point you want converted to world coordinates.
  • screenY
    • Type:Single
    • Description:This parameter is the Y of the point you want converted to world coordinates.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ToWorldCoordinate(RectangleShape,ScreenPointF,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns world coordinates from screen coordinates.
Parameters
  • worldExtent
  • screenPoint
    • Description:This parameter is the screen point you want converted to a world point.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomIn(RectangleShape,Int32)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns a new extent that is zoomed in by the percentage provided.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to zoom to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.

ZoomIntoCenter(RectangleShape,Int32,PointShape,Single,Single)

  • N/A
Remarks
  • The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
  • Description:This method returns an extent that is centered and zoomed in.
Parameters
  • worldExtent
    • Description:This parameter is the world extent that you want centered and zoomed to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • worldPoint
    • Description:This parameter is the world point you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width in screen coordinates.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height in screen coordinates.

ZoomIntoCenter(RectangleShape,Int32,Feature,Single,Single)

  • N/A
Remarks
  • The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
  • Description:This method returns an extent that is centered and zoomed in.
Parameters
  • worldExtent
    • Description:This parameter is the world extent that you want centered and zoomed to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the feature you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width in screen coordinates.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height in screen coordinates.

ZoomIntoCenter(RectangleShape,Int32,Single,Single,Single,Single)

  • N/A
Remarks
  • The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
  • Description:This method returns an extent that is centered and zoomed in.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom in.
  • screenX
    • Type:Single
    • Description:This parameter is the screen X you want to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the screen Y you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomOut(RectangleShape,Int32)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns a new extent that is zoomed out by the percentage provided.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to zoom out to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.

ZoomOutToCenter(RectangleShape,Int32,PointShape,Single,Single)

  • N/A
Remarks
  • The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
  • Description:This method returns an extent that is centered and zoomed out.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom out to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • worldPoint
    • Description:This parameter is the world point you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomOutToCenter(RectangleShape,Int32,Feature,Single,Single)

  • N/A
Remarks
  • The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterwards.
Return Value
  • Description:This method returns an extent that is centered and zoomed out.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom out to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • centerFeature
    • Type:Feature
    • Description:This parameter is the feature you want the extent to be centered on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomOutToCenter(RectangleShape,Int32,Single,Single,Single,Single)

  • N/A
Remarks
  • The resulting rectangle will already be adjusted for the ratio of the screen. You do not need to call GetDrawingExtent afterward.
Return Value
  • Description:This method returns an extent that is centered and zoomed out.
Parameters
  • worldExtent
    • Description:This parameter is the world extent you want to center and zoom out to.
  • percentage
    • Type:Int32
    • Description:This parameter is the percentage by which you want to zoom out.
  • screenX
    • Type:Single
    • Description:This parameter is the screen X you want to center on.
  • screenY
    • Type:Single
    • Description:This parameter is the screen Y you want to center on.
  • screenWidth
    • Type:Single
    • Description:This parameter is the width of the screen.
  • screenHeight
    • Type:Single
    • Description:This parameter is the height of the screen.

ZoomToScale(Double,RectangleShape,GeographyUnit,Single,Single)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns a extent that has been zoomed into a certain scale.
Parameters
  • targetScale
    • Type:Double
    • Description:This parameter is the scale you want to zoom into.
  • worldExtent
    • Description:This parameter is the world extent you want zoomed into the scale.
  • worldExtentUnit
    • Description:This parameter is the geographic unit of the world extent parameter.
  • screenWidth
    • Type:Single
    • Description:This parameter is the screen width.
  • screenHeight
    • Type:Single
    • Description:This parameter is the screen height.

ZoomToScale(Double,RectangleShape,GeographyUnit,Single,Single,ScreenPointF)

  • N/A
Remarks
  • None
Return Value
  • Description:This method returns a extent that has been zoomed into a certain scale.
Parameters
  • targetScale
    • Type:Double
    • Description:This parameter is the scale you want to zoom into.
  • worldExtent
    • Description:This parameter is the world extent you want zoomed into the scale.
  • worldExtentUnit
    • Description:This parameter is the geographic unit of the world extent parameter.
  • screenWidth
    • Type:Single
    • Description:This parameter is the screen width.
  • screenHeight
    • Type:Single
    • Description:This parameter is the screen height.
  • offsetScreenPoint
    • Description:This parameter is the offsetScreenPoint.

ToWorldCoordinate(PolygonShape,RectangleShape,Single,Single)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • canvasWidth
    • Type:Single
    • Description:N/A
  • canvasHeight
    • Type:Single
    • Description:N/A

GetVersion()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:A string representing the file version of MapSuiteCore.dll.
Parameters

BuildFourColorColumn(String,Collection<Feature>)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<Feature>
  • Description:This method returns four color features in the FeatureSource.
Parameters
  • columnName
    • Type:String
    • Description:N/A
  • features
    • Type:Collection<Feature>
    • Description:N/A

Protected Methods

MemberwiseClone()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters

Finalize()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

Public Properties

Protected Properties

Public Events

12.0/apis/thinkgeo.core.maputil.txt · Last modified: 2019/09/26 09:34 (external edit)