![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This utility class provides interoperability between MapLink and GDAL/OGR
This includes functionality to convert between OGR geometry/Coordinate systems and MapLink geometry/coordinate systems, without needing to convert through wkt/wkb.
Static Public Member Functions | |
static TSLEntity * | ogrGeometryToTSLEntity (const OGRGeometry *ogrGeometry, double TMCPerMU, double mapOffsetX=0.0, double mapOffsetY=0.0, bool multiAsEntitySet=false, double maxCurveAngle=0.0) |
static TSLMUGeometry * | ogrGeometryToTSLMUGeometry (const OGRGeometry *ogrGeometry, double maxCurveAngle=0.0) |
static TSLMUGeometry * | ogrFeatureToTSLMUGeometry (OGRFeature *ogrFeature, OGRFeatureDefn *ogrFeatureDefinition, double maxCurveAngle=0.0) |
static TSLCoordinateSystem * | ogrSpatialReferenceToTSLCoordinateSystem (OGRSpatialReference *spatialReference, unsigned int id=0) |
static bool | transferAttributes (OGRFeature *ogrFeature, OGRFeatureDefn *ogrFeatureDefinition, TSLDataSet *result) |
|
static |
Convert an OGR feature to a TSLMUGeometry hierarchy
The geometry of this feature will be converted using ogrGeometryToTSLMUGeometry
In addition the fields and their values will be transferred from the feature, and will be present in the attributes of the created TSLMUGeometry
ogrFeature | The OGR feature to convert. The application is responsible for construction/deletion of this object. |
ogrFeatureDefinition | The feature definition, which defines the fields available on the feature. |
maxCurveAngle | The largest step in degrees along an arc when converting curved geometry. |
|
static |
Convert OGR geometry to a TSLEntity hierarchy
The following WKB types will be converted:
The coordinate system of the data will not be modified, but the coordinates of each geometry will be scaled according to the TMCPerMU value.
Any invalid geometry will be ignored, and will not be present in the output entity.
ogrGeometry | The OGR geometry hierarchy to convert. The application is responsible for construction/deletion of this object. |
TMCPerMU | The TMC per Map Unit conversion value to use when converting the geometry. |
mapOffsetX | The x coordinate of the MapLink TMC coordinate space for the projected coordinate system, in map units. This can be queried from the TSLCoordinateSystem::getMapOffsets method when creating geometry compatible with a MapLink coordinate system. |
mapOffsetY | The y coordinate of the MapLink TMC coordinate space for the projected coordinate system, in map units. This can be queried from the TSLCoordinateSystem::getMapOffsets method when creating geometry compatible with a MapLink coordinate system. |
multiAsEntitySet | If true, all multi geometry types will be converted to entity sets. If false the TSLMultiXXX types will be used. |
maxCurveAngle | The largest step in degrees along an arc when drawing curved geometry |
|
static |
Convert OGR geometry to a TSLMUGeometry hierarchy
The following WKB types will be converted:
The coordinate system of the data will not be modified.
Any invalid geometry will be ignored, and will not be present in the output geometry set. Unsupported geometry types will add an error to the MapLink error stack.
ogrGeometry | The OGR geometry hierarchy to convert. The application is responsible for construction/deletion of this object. |
maxCurveAngle | The largest step in degrees along an arc when converting curved geometry. |
|
static |
Convert an OGRSpatialReference to an equivalent TSLCoordinateSystem
This method will create a new coordinate system with the specified id. This coordinate system will not automatically be added to the global list,
spatialReference | The OGRSpatialReference to convert |
id | The ID for the created coordinate system |
|
static |
This method copies the attributes from the OGRFeature into the Dataset provided
ogrFeature | The OGR feature to copy attributes from. The application is responsible for construction/deletion of this object. |
ogrFeatureDefinition | The feature definition, which defines the fields available on the feature. |
result | The dataset to copy the attributes to. |