Description of Collada tags for geographic location and zoom level of model |
Model geographic location
Option 1. The model should be built and located in the EPSG 3857 coordinate system. Then there is applicable a designation of the model's geographic location by tags of the Collada format version 1.5 <geographic_location> with the following children: <longitude> - contains a floating-point number that determines the longitude of the geographic location in geodetic coordinates in degrees. Allowed values: from -180.0 to 180.0; <latitude> - contains a floating-point number that determines the latitude of the geographic location in geodetic coordinates in degrees. Allowed values: from -90.0 to 90.0; <altitude mode = ""> - defines a mode of specifying the altitude in model: absolute - at all points of model the absolute altitude is set, relativeToGround - at all points of the model, the altitude is set relative to the terrain (it goes like the default mode). This is the standard and most convenient option. The model and its geographic location become readable for any software products that work with Collada version 1.5 and higher.
Accordingly, the file will be:
<asset> ... <created>2019-01-24T11:38:25Z</created> <modified>2019-01-24T11:38:25Z</modified> <up_axis>Z_UP</up_axis> <coverage> <geographic_location> <longitude>-105.2830</longitude> <latitude>40.0170</latitude> <altitude mode="relativeToGround">0</altitude> </geographic_location> </coverage> </asset>
<!---->
Option 2. It is applicable if the model and its geographic location are made in a coordinate system other than WGS 84. Add <extra> tags into the header of the model file in Collada format: name = "EPSG" - sets the EPSG code of the model's coordinate system; name = "unit" - sets the unit of measurement for the model's geographic location (altitude is always in meters): "meter" - meters, "grad" - degrees; name = "origin" - sets the model's geographic location in the given coordinate system in the given units: X Y H or B L H. Altitude is always specified in meters; name = "height mode" - defines the mode of specifying the altitude at model's points: absolute - at all points of model the absolute altitude is set, relative - at all points of the model, the altitude is set relative to the geographic location (it goes like the default mode).
It will look like this:
<extra name="EPSG" type="32636"/> <extra name="unit" type="meter"/> <extra name="height mode" type=" relative"/> <extra name="origin">123456.123456 7654321.765432 123.123456</extra>
Accordingly, the file will be:
<?xml version="1.0" encoding="utf-8"?> <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> <asset> <contributor> <authoring_tool>ModelMaker</authoring_tool> </contributor> <created>2019-01-24T11:38:25Z</created> <modified>2019-01-24T11:38:25Z</modified> <up_axis>Z_UP</up_axis> <extra name="EPSG" type="32636"/> <extra name="unit" type="meter"/> <extra name="height mode" type=" relative"/> <extra name="origin">123456.123456 7654321.765432 123.123456</extra> </asset>
<!---->
</COLLADA>
Zoom level of model
In the model, it is necessary to transfer the number of the zoom level for which it is made. Accordingly, you will need to enter one more <extra> tag in the header:
name = " LEVELSCALE " - sets the number of zoom level in the pyramid of tiles for which the model is made.
For example, <extra name="LEVELSCALE" type="20"/>
Accordingly, the file will be:
<?xml version="1.0" encoding="utf-8"?> <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> <asset> <contributor> <authoring_tool>ModelMaker</authoring_tool> </contributor> <created>2019-01-24T11:38:25Z</created> <modified>2019-01-24T11:38:25Z</modified> <up_axis>Z_UP</up_axis> <extra name="LEVELSCALE" type="20"/> <extra name="EPSG" type="32636"/> <extra name="unit" type="meter"/> <extra name="height mode" type=" relative"/> <extra name="origin">123456.123456 7654321.765432 123.123456</extra> </asset>
<!---->
</COLLADA>
<!---->
</COLLADA>
|