![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Utility class providing some useful functions.
Static Public Member Functions | |
static bool | appendData (TSLStandardDataLayer *layer, const char *filename, const char *filter, const TSLFeatureCodeMapping *featureCodeMapping, int noFeatures, double xscale, double yscale, double xoffset=0, double yoffset=0, const char *configfile="", bool expandMultiPartObjects=true, bool decomplexifyOnImport=false) |
static bool | convertTMFTileToHostFormat (const char *inFilename, const char *outFilename) |
static bool | exportData (TSLStandardDataLayer *layer, const char *filename, const char *filter, const TSLFeatureCodeMapping *featureCodeMapping, int noFeatures, double xscale, double yscale, double xoffset=0, double yoffset=0, const char *configfile="") |
static const char * | getMapLinkHome () |
static const char * | getMapLinkUserHome () |
static const char * | getMapLinkVersion (int *majorVersionNumber, int *minorVersionNumber) |
static unsigned int | getThreadedOptions () |
static void | setMaxThreads (unsigned int max) |
static int | getMaxThreads () |
static bool | importData (TSLStandardDataLayer *layer, const char *filename, const char *filter, const TSLFeatureCodeMapping *featureCodeMapping, int noFeatures, double xscale, double yscale, double xoffset=0, double yoffset=0, const char *configfile="", bool expandMultiPartObjects=true, bool decomplexifyOnImport=false) |
static bool | nearestPointOnLine (const TSLCoordSet &coordSet, bool closed, TSLCoord &s1, TSLCoord &s2, TSLCoord &pt) |
static bool | rotateEnvelope (TSLEnvelope *env, double rotation, TSLTMC cx, TSLTMC cy) |
static void | setMapLinkHome (const char *newHome, bool setDefault=false) |
static void | setThreadedOptions (unsigned int flags) |
static int | sizeOfEntity (const TSLEntity *entity) |
static bool | unlockSupport (TSLKeyedOption option, const char *key) |
static bool | validateEntityUpdates (TSLMapDataLayer *map, const TSLEntitySet *updatedData, const TSLPolygon *boundary, TSLSLMEntityRefHandler *refHandler, const int *featuresToIgnore=NULL, int numberToIgnore=0, const char *brokenFeatureAttributeKey="BK") |
static bool | tslsupported (TSLKeyedOption opt) |
|
static |
Import a data file from the named file using the specified import filter.
Any data imported will be appended to the current contents of the data layer.
layer | Standard Data Layer to import data into. |
filename | Name of file to append. |
filter | Import filter to use. |
featureCodeMapping | defines how to map Native Feature Codes defined in the source data to MapLink Feature IDs used in the system. |
noFeatures | number of features in the featureCodeMapping array. |
xscale | Number of TMC units per import unit |
yscale | Number of TMC units per import unit |
xoffset | Offset to use in import units |
yoffset | Offset to use in import units |
configfile | Any special info |
expandMultiPartObjects | If true, will flatten multi-part objects on import. If false multi-part objects are imported as is. Default is true for compatibility. |
decomplexifyOnImport | If true, polygons will be decomplexified on import. Note that this can have a significant impact on import performance. |
|
static |
Convert the specified file to use the byte order of the host platform.
This method allows the user to load in a TMF file in either Windows NT or UNIX byte-order format and save it out using the byte-order of the host platform. This will obviate the need for the byte-swapping to be done when loading the tiles from disk which will improve the performance of system.
inFilename | the name of the TMF file to load |
outFilename | the name to save the byte-swapped file to. |
|
static |
Export a layer to the named file using the specified import filter.
layer | Standard Data Layer to export data from |
filename | Name of file to export to |
filter | Export filter to use |
featureCodeMapping | defines how to map MapLink Feature IDs used in the system to Native Feature Codes to be defined in the destination data |
noFeatures | number of features in the featureCodeMapping array |
xscale | Number of TMC units per export unit |
yscale | Number of TMC units per export unit |
xoffset | Offset to use in export units |
yoffset | Offset to use in export units |
configfile | Configuration file that is passed to the import filter. How this file is used is a detail specific to the filter. If an absolute path name is given then this is used verbatim. If only the filename is given then the standard locations (depending on OS) are searched, including the MapLink installation bin directory. An absolute path name should be used to guarantee the correct file is used for both import and export. |
|
static |
Return the path to the home directory of MapLink, dependent on the version of the library.
|
static |
Returns the path to the current user's local home directory of MapLink, dependent on the version of the library.
|
static |
Return version information for the library.
Returns a pointer to static memory containing a string description of the version.
|
static |
MapLink is capable of executing certain processes in parallel.
This method allows the user to query the maximum number of parallel threads.
|
static |
MapLink is thread safe when used in particular scenarios. Please refer to the Developers Guide for additional information.
This method allows the user to query the thread locks settings.
Returns a set of bits as defined by TSLThreadedOptionsEnum.
|
static |
Import a data file from the named file using the specified import filter.
The current contents of the data layer will be destroyed.
layer | Standard Data Layer to import data into |
filename | Name of file to import |
filter | Import filter to use. This corresponds to the name of the library you wish to use, without its file extension. For example, to use the ShapeFile filter, this should be listed as 'shpfilter' as this is the name of the library as it appears in the MapLink bin directory. |
featureCodeMapping | defines how to map Native Feature Codes defined in the source data to MapLink Feature IDs used in the system |
noFeatures | number of features in the featureCodeMapping array |
xscale | Number of TMC units per import unit |
yscale | Number of TMC units per import unit |
xoffset | Offset to use in import units |
yoffset | Offset to use in import units |
configfile | Configuration file that is passed to the import filter. How this file is used is a detail specific to the filter. If an absolute path name is given then this is used verbatim. If only the filename is given then the standard locations (depending on OS) are searched, including the MapLink installation bin directory. An absolute path name should be used to guarantee the correct file is used for both import and export. |
expandMultiPartObjects | If true, will flatten multi-part objects on import. If false multi-part objects are imported as is. Default is true for compatibility. |
decomplexifyOnImport | If true, polygons will be decomplexified on import. Note that this can have a significant impact on import performance. |
|
static |
Calculates the nearest point within the coordinate set.
coordSet | The coordinate set. |
closed | Set to true, if the coordinate set is closed; false for an open set. |
s1 | The points defining the start of the line segment which will contain the required point. |
s2 | The points defining the end of the line segment which will contain the required point. |
pt | The nearest point. |
|
static |
Updates an envelope with the extent of its rotated rectangle.
The angle specified is in radians, +ve anti-clockwise from the x-axis. Rotates about specified centre, in TMC.
Returns true if ok, false if the maths would blow (ie. resultant coordinate would not fit into TMC space.).
|
static |
Sets the path of the MapLink home directory.
This is intended for use by applications, which are deployed without a MapLink installation. MapLink uses this path to locate plugins and configuration files, when not otherwise specified by the application.
The directory provided should contain the 'bin' and 'config' directories of the application.
newHome | The directory to use as the MapLink home directory |
setDefault | Reserved for future use. |
|
static |
MapLink is capable of executing certain processes in parallel.
This method allows the user to set the maximum number of parallel threads.
max | Maximum number of threads |
|
static |
MapLink is thread safe when used in particular scenarios. Please refer to the Developers Guide for additional information.
This method allows the user to set or unset the use of thread locks. This is required in certain situations where we are unable to detect the particular user scenario.
flags | a set of bits as defined by TSLThreadedOptionsEnum. |
|
static |
Returns the in-memory size in bytes of the provided entity. If the entity is a TSLEntitySet then the returned size will include any entities within the set. If the entity has a TSLDataSet then this will also be included in the returned size.
|
static |
Deprecated methods. Use the new methods which allow feature code mapping to occur.
|
static |
Enables extended support features protected by license keys, such as File Format Interoperability and JPEG2000 file support.
Important Notes: The license key to unlock support needs to be obtained directly from Envitia. This is not the MapLink Studio filter license key. To obtain a key, contact suppo.nosp@m.rt@e.nosp@m.nviti.nosp@m.a.co.nosp@m.m. Please be aware that acquiring a key may increase the cost of your runtime license.
option | the option being enabled. |
key | the license key to enable the option. |
|
static |
Checks the areas of entities within the given entity set against the original versions of those entities within the map in order to check that replacement, addition and removal of these entities would not cause a hole or overlapping features to be created in the map.
This validation uses the following rules: 1) The combined area of all entities within the given entity set should equal the combined area of the original entities in the map. Entities which have a negative feature ID are assumed to be departing from the map. Entities with positive feature IDs will be treated as either modifications to an existing entity if the map contains an entity with the same entity ID, otherwise they will be considered to be new additions to the map.
Any entities that have the broken attribute (defined by the brokenFeatureAttributeKey parameter, default BK) set to true in their TSLDataSet will not be included in the area calculation. For these entities, both the original entity in the map and the entity in the given entity set will not be counted, even if only one of the entities has the broken attribute.
Entities which are departing from the map in the given entity set but which are not present in the map will not cause the validation to fail. An information note will be placed on the TSLErrorStack for each of these entities.
2) The area of the boundary of the update should equal the combined area of the entities within the set. If no boundary polygon is provided then this rule is ignored. Note that the boundary polygon provided must include any holes present in the update for this rule to pass. If any broken entities were detected when processing rule 1 a different error will be placed on the TSLErrorStack if this rule fails. This allows for an update which passes rule 1 but fails this rule due to the presence of the broken features to be detected.
map | The map against which the update is to be validated. |
updatedData | An entity set containing the update to validate. |
boundary | A polygon that defines the boundary of the update. |
refHandler | The entity reference handler to use in conjunction with the map. |
featuresToIgnore | An optional list of feature codes to ignore. Entities with this feature code will not have their area included in the validation process. |
numberToIgnore | The size of the previous array. |
brokenFeatureAttributeKey | The two-character key code that represents the entry in an entity's dataset that indicates whether the entity is broken or not. By default this is BK (the default setting for imported OSMasterMap data as defined by the OSMastetMap.ini configuration file). |