railway_tool:railway_tool

Railway tools

To create a storage layer for TIN and upload TIN from the SHP file you should follow the next steps:

1.Create database table by using query (please, replace placeholder LAYER_NAME by real layer name):

CREATE TABLE public.LAYER_NAME
(
    fid bigserial,
    geom geometry(MultiPolygonZ,4326) NOT NULL,
    ts TIMESTAMP WITH TIME zone NOT NULL DEFAULT now(),
    qkey CHARACTER VARYING(128) COLLATE pg_catalog."default" NOT NULL,
    sourcename CHARACTER VARYING(128) COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT LAYER_NAME_pkey PRIMARY KEY (fid)
        USING INDEX TABLESPACE mv_main,
    CONSTRAINT LAYER_NAME_ukey UNIQUE (qkey, sourcename)
 
        USING INDEX TABLESPACE mv_main
)
 
TABLESPACE mv_main;
 
ALTER TABLE public.LAYER_NAME
    OWNER TO geoserver;
 
CREATE INDEX LAYER_NAME_ts
    ON public.LAYER_NAME USING btree
    (ts)
    TABLESPACE mv_main;
 
CREATE INDEX spatial_LAYER_NAME_geom
    ON public.LAYER_NAME USING gist
    (geom)
    TABLESPACE mv_main;

2. Create layer on the geoserver (you should know how to do it, if you are reading this article)

2.a Add data READ/WRITE access to the layer in GeoServer under admin account

3. Create layer in Multiviewer by using layer definition (please, replace placeholders WORKSPACE/LAYER_NAME by real GeoServer workspace/layer name):

{
	"Group": "raster_layer",
	"Type": "tp_wms_layer",
	"Version": "1.0",
	"Settings": {
		"VisibleLevel": {
			"Min": 0,
			"Max": 2500000
		},
		"IsHiddenByDefault": true,
		"DtmSettings": {
			"Type": "GeoJsonTin",
			"TileSize": 256,
			"ZoomLevel": 18,
			"WfsUrl": "DEFAULT_GEOSERVER_URL/wfs",
			"NamespaceUrl": "DEFAULT_GEOSERVER_URL/WORKSPACE"
		},
		"ImageProvider": {
			"ProviderDescription": {
				"url": "DEFAULT_GEOSERVER_URL/gwc/service/wms",
				"layers": [
					"WORKSPACE:LAYER_NAME"
				],
				"parameters": {
					"Username": "",
					"Password": "",
					"SRS": "EPSG:4326",
					"VERSION": "1.1.1",
					"REQUEST": "GetMap",
					"SERVICE": "WMS",
					"FORMAT": "image/png",
					"TRANSPARENT": "true",
					"VIEWPARAMS": "",
					"CIM_Renderer": "MinMax",
					"CIM_MinMaxRenderingMinimum": 0,
					"CIM_MinMaxRenderingMaximum": 128
				}
			},
			"ProviderAdditionalOptions": {
				"enablePickFeatures": false,
				"pickFeatureProxy": null
			}
		},
		"AdditionalOptions": {
			"alpha": 1,
			"brightness": 1,
			"gamma": 1,
			"hue": 0
		},
		"LayerSettings": {
			"filterParameters": []
		},
		"IsForceBasicAuth": true
	}
}

4. Open web-page in browser SHP TIN Loader

4.1 Select 3 files .SHP, .DBF, .PRJ which are belong to the one dataset (multiple uploading is not supported!!!)

4.2 Set the GeoServer connection details

4.3 Press button “refresh” list & select storage layer for uploading

4.4 Press button “upload” to initiate uploading

4.5 You can see a progress in the log section

Multiviewer is able to visualize georeferenced video files. If project contains the layers with video files - you will see section “Video” in the layer menu.

By default, track of the video file is hidden, make it visible to start work with video. Click on the trajectory to open video viewer.

Each video viewport has 2 markers:

  • blue one(background map only) - camera position
  • red one - helper for identification same position on the map/video

You can change quality of the video by using slider “Quality” in the settings.

There are video navigation functionality:

  • left mouse click on the video trajectory - open video viewport (with CTRL - open one more viewport)
  • left mouse click in the video viewport - pause/play
  • mouse scroll when video is playing - change paly rate
  • mouse scroll when video is paused - change current time +/- 1 second
  • keyboard arrow up/down (when mouse cursor inside the video viewport) - increase/decrease distance between blue and red markers (without CTRL - 0.5m, with CTRL - 5m)
  • keyboard key “s” - start tracking of the cursor position
  • keyboard key “s” + CTRL - start sync of the 2 video tracks (they should be in the same direction)
  • keyboard key “d” - stop cursor tracking/video sync

You can use extra attributes to change default visualization/editing of the vector layer in the Viewport 3D. Extra attributes should be placed under “Settings” attribute.

Visualization3D

Type, can be: “wall” (relevant: “WidthStart”, “WidthEnd”, “HeightStart”, “HeightEnd”), “trackway” (relevant: “Width”). For the Width* and Height* can be setup exact/constant number or name of the feature's attribute where is stored value.

EXAMPLE:

"Visualization3D": {
	"Type": "wall",
	"WidthStart": 0.5,
	"WidthEnd": 1.5,
	"HeightStart": "width",
	"HeightEnd": "height"
}
"Visualization3D": {
	"Type": "trackway",
	"Width": 1.5,
        "IdAttributeName": "rclname"
}
"Visualization3D": {
	"Type": "covermap"
}

Сache3D

Type, can be: “allinmemory” - dataset requests all features from the server during initialization and keeps it in memory, further interacts with this cache (for static datasets only!!!)

"Сache3D": {
	"Type": "allinmemory"
}

Correction3D

Defines set of the spatial corrections. 
 
"Correction3D": [
	{
		"Attribute": "direction",
		"Type": "rz",
		"Value": "Opposite",
		"Delta": 180,
		"Scale": 1
	},
	{
		"Attribute": "x_offset",
		"Type": "tx",
		"Value": "PoleArm_Right_02",
		"Delta": 0.5,
		"Scale": 1
	},
	{
		"Attribute": "x_offset",
		"Type": "ty",
		"Value": "PoleArmFront_01",
		"Delta": -0.5,
		"Scale": 1
	},
	{
		"Attribute": "trajectory",
		"Type": "rotatealongline",
		"Value": null,
		"Delta": null,
		"Scale": 1
	}
]

Dem3D

Type, can be: “dem” - objects from this layer will be used during dropping; “depends” - vertices of the objects from this layer will be dropped to the dem during rendering; “none” - render like it is/no how affect to other objects. ZCorrection (optional) - defines set of rules to increase/decrease offset from the dem. There are 3 types of the rule definition:

1) Add 0.75 to Z coordinate if feature's attribute “classname” has value “p”

}
	"Attribute": "classname",
	"Value": "p",
	"Delta": 0.75
}

2) Add to Z coordinate value from the feature's attribute “comment” if this value can be converted to the float

}
	"Attribute": "commect",
	"Value": null,
	"Delta": "itself",
        "Scale": 1.0
}

3) Add 1.0 to Z coordinate

}
	"Attribute": null,
	"Value": null,
	"Delta": 1
}

EXAMPLE:

"Dem3D": {
	"Type": "depends",
	"ZCorrection": [
		{
			"Attribute": "classname",
			"Value": "p",
			"Delta": 0.75
		},
		{
			"Attribute": "commect",
			"Value": null,
			"Delta": "itself",
                        "Scale": 1.0
		},
		{
			"Attribute": null,
			"Value": null,
			"Delta": 1
		}
	]
}

IsElevationAdjustment

If project contains TIN layer, app will try to get Z coordinate for the captured features from TIN.

"IsElevationAdjustment": true

Transform3D

Update, can be: null - transformation is denied for this axis; “geom” - any changes will be applied to the vertices of the vector feature (allowed in the section “Translate”); mesh - any changes will be applied to the 3D model (allowed in the section “Translate”, “Rotate” and “Scale”); prop:[PROPERTY NAME] - any changes will be stored as feature's property value (allowed in the section “Translate”, “Rotate” and “Scale”)

Hotkeys:

  • left mouse click in the 3D Viewport - start transformation
  • ESC - finish transformation and save changes
  • +/- - increase/decrease size of the transformation control
  • space - deactivate/activate transformation
  • s - in the 3D Viewport, switch transform control to the “scale” mode
  • r - in the 3D Viewport, switch transform control to the “rotation” mode
  • t - in the 3D Viewport, switch transform control to the “translation” mode

EXAMPLE:

"Transform3D": {
	"Translate": {
		"X": {
			"Update": "geom"
		},
		"Y": {
			"Update": "geom"
		},
		"Z": {
			"Update": "geom"
		}
	},
	"Rotate": {
		"X": {
			"Update": null
		},
		"Y": {
			"Update": null
		},
		"Z": {
			"Update": "prop:text"
		}
	},
	"Scale": {
		"X": {
			"Update": "mesh"
		},
		"Y": {
			"Update": "mesh"
		},
		"Z": {
			"Update": "mesh"
		}
	}
}
  • railway_tool/railway_tool.txt
  • Last modified: 4 years ago
  • by cmvadmin