Show/Hide Toolbars

TMO is a database system developed by Trafikverket. TMO is used to store data of various types amont them ground water data, surveying data and environmental data.

Note: The Redbex TMO import is implemented as a one-time-only import. I.e. the import is meant to be used to convert data from TMO databases to Redbex but not for regular updates of data from TMO to Redbex.

There are two slightly different version of TMO that are both supported by Redbex: Hasp and Regular Before importing the user has to define the dialect. The import procedure will then parse the data according to the selected dialect.

Preparing the TMO database

This only applies to TMO databases of dialect regular

Redbex imports data from TMO databases by directly connecting to these databases. However, TMO systems use a second independent database for Geographic data. To make this data available to the TMO import you must fist create views in the TMO database (typically called WebDB) that creates a bridge to the geographic data.

Listing 1 shows the SQL commands to create these views. Note that you have to change the script in order to match your database name.

CREATE VIEW ByggnadSpatial
    AS
    SELECT
        [OBJECTID_1]
        ,[OBJECTID]
        ,[X_Centroid]
        ,[Y_Centroid]
        ,[Name]
        ,[ByggnadID]
        ,[area]
        ,[len]
        ,[SHAPE]
        FROM [<Name Of Tmo GeoDB>].[dbo].[SBK_BYGGNADER]
GO
CREATE VIEW DubbgrupperSpatial
    AS
    SELECT T1.SHAPE, T1.GruppNamn, T1.Grupp AS GroupId
        FROM [<Name Of Tmo GeoDB>].dbo.DUBBGRUPPER_BYGGNAD T1
    UNION ALL
    SELECT T2.SHAPE, T2.GRUPP_NAMN, T2.GRUPP As GroupId
        FROM [<Name Of Tmo GeoDB>].dbo.DUBBGRUPPER_KONSTRUKTION T2
    UNION ALL
        SELECT T3.SHAPE, T3.Grupp_Namn, T3.GRUPP AS GroupId
    FROM [<Name Of Tmo GeoDB>].dbo.DUBBGRUPPER_MARK T3

GO

Listing 1: Script for creating the views

Other buildings in the database

Since the TMO import is a one time operation, the TMO import does not update and existing buildings in the Redbex database.

© 2021 AFRY Austria GmbH, www.redbex.com