Purpose
Returns any and all attributes that were set on a connection using the Set Connection Isogram statement. Includes attributes to handle the maximum number of records for server, time, and distance values. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
IsogramInfo( connection_handle, attribute )
connection_handle is an integer signifying the number of the connection returned from the Open Connection statement.
attribute is an Integer code, indicating which type of information should be returned.
Return Value
Float, Logical, or String, depending on the attribute parameter.
Description
This function returns the properties defaulted by the connection or the properties that have been changed using the Set Connection Isogram statement.
There are several attributes that IsogramInfo() can return. Codes are defined in MAPBASIC.DEF.
attribute setting | ID | IsogramInfo() Return Value |
---|---|---|
ISOGRAM_BANDING | 1 | Logical representing the Banding option. |
ISOGRAM_MAJOR_ROADS_ONLY | 2 | Logical representing the MajorRoadsOnly option. |
ISOGRAM_RETURN_HOLES | 3 | Logical representing the choice of returning regions with holes or not. |
ISOGRAM_MAJOR_POLYGON_ONLY | 4 | Logical representing the choice of returning only the main polygon of a region. |
ISOGRAM_MAX_OFF_ROAD_DISTANCE | 5 | Float value representing the Maximum off Road Distance value. |
ISOGRAM_MAX_OFF_ROAD_DISTANCE_UNITS | 6 | The unit string associated with the value |
ISOGRAM_SIMPLIFICATION_FACTOR | 7 | Float value representing the Simplification Factor. (a percent value represented as a value between 0 and 1. |
ISOGRAM_DEFAULT_AMBIENT_SPEED | 8 | Float value representing the default ambient speed. |
ISOGRAM_DEFAULT_AMBIENT_SPEED_DISTANCE_UNIT | 9 | String value representing the distance unit ("mi", "km"). |
ISOGRAM_DEFAULT_AMBIENT_SPEED_TIME_UNIT | 10 | String value representing the time unit ("hr", "min", "sec"). |
ISOGRAM_DEFAULT_PROPAGATION_FACTOR | 11 | Determines the off-road network percentage of the remaining cost (distance) for which off network travel is allowed when finding the Distance boundary. Roads not identified in the network can be driveways or access roads, among others. The propagation factor is a percentage of the cost used to calculate the distance between the starting point and the Distance. The default value for this property is 0.16. |
ISOGRAM_BATCH_SIZE | 12 | Integer value representing the maximum number of records that are sent to the service at one time. |
ISOGRAM_POINTS_ONLY | 13 | Logical representing the whether or not records that contain non-point objects should be skipped. |
ISOGRAM_RECORDS_INSERTED | 14 | Integer value representing the number of records inserted in the last command. |
ISOGRAM_RECORDS_NOTINSERTED | 15 | Integer value representing the number of records NOT inserted in the last command. |
ISOGRAM_MAX_BATCH_SIZE | 16 | Integer value representing the maximum number of records (for example, points) that the server will permit to be sent to the service at one time. |
ISOGRAM_MAX_BANDS | 17 | Integer value representing the maximum number of Iso bands (for example, distances or times) allowed. |
ISOGRAM_MAX_DISTANCE | 18 | Float value representing the maximum distance permitted for an Isodistance request. The distance units are specified by ISOGRAM_MAX_DISTANCE_UNITS. |
ISOGRAM_MAX_DISTANCE_UNITS | 19 | String value representing the units for ISOGRAM_MAX_DISTANCE. |
ISOGRAM_MAX_TIME | 20 | Float value representing the maximum time permitted for an Isochrone request. The time units are specified by ISOGRAM_MAX_TIME_UNITS. |
ISOGRAM_MAX_TIME_UNITS | 21 | String value representing the units for ISOGRAM_MAX_TIME. |
Example
The following MapBasic snippet will print the Envinsa Routing Constraints to the message window in MapInfo Pro:
Include "MapBasic.Def"
declare sub main
sub main
dim iConnect as integer
Open Connection Service Isogram
URL "http://envinsa_server:8062/Route/services/Route"
User "john"
Password "green"
into variable iConnect
Print "Isogram_Max_Batch_Size: " +
IsogramInfo(iConnect,Isogram_Max_Batch_Size)
Print "Isogram_Max_Bands: " + IsogramInfo(iConnect, Isogram_Max_Bands)
Print "Isogram_Max_Distance: " + IsogramInfo(iConnect,
Isogram_Max_Distance)
Print "Isogram_Max_Distance_Units: " + IsogramInfo(iConnect,
Isogram_Max_Distance_Units)
Print "Isogram_Max_Time: " + IsogramInfo(iConnect,Isogram_Max_Time)
Print "Isogram_Max_Time_Units: " +
IsogramInfo(iConnect,Isogram_Max_Time_Units)
Close Connection iConnect
end sub
See Also:
Create Object statement, Open Connection statement, Set Connection Isogram statement