1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 21:31:47 -05:00
sdrangel/plugins/feature/map/Cesium/ThirdParty/google-earth-dbroot-parser.js

1 line
203 KiB
JavaScript
Raw Normal View History

2022-02-04 15:41:22 -05:00
window.cesiumGoogleEarthDbRootParser=function(e){"use strict";var r,t,o=e.Reader,a=(e.Writer,e.util),n=[],i=e.roots.default||(e.roots.default={});return i.keyhole=((t={}).dbroot=((r={}).StringEntryProto=function(){function r(e){if(e)for(var r=Object.keys(e),t=0;t<r.length;++t)this[r[t]]=e[r[t]]}return r.prototype.stringId=0,r.prototype.stringValue="",r.decode=function(e,r){e instanceof o||(e=o.create(e));for(var t=void 0===r?e.len:e.pos+r,a=new i.keyhole.dbroot.StringEntryProto;e.pos<t;){var n=e.uint32();switch(n>>>3){case 1:a.stringId=e.fixed32();break;case 2:a.stringValue=e.string();break;default:e.skipType(7&n)}}return a},r.verify=function(e){return"object"!=typeof e||null===e?"object expected":a.isInteger(e.stringId)?a.isString(e.stringValue)?null:"stringValue: string expected":"stringId: integer expected"},r.fromObject=function(e){if(e instanceof i.keyhole.dbroot.StringEntryProto)return e;var r=new i.keyhole.dbroot.StringEntryProto;return void 0!==e.stringId&&null!==e.stringId&&(r.stringId=e.stringId>>>0),void 0!==e.stringValue&&null!==e.stringValue&&(r.stringValue=String(e.stringValue)),r},r.from=r.fromObject,r.toObject=function(e,r){r||(r={});var t={};return r.defaults&&(t.stringId=0,t.stringValue=""),void 0!==e.stringId&&null!==e.stringId&&e.hasOwnProperty("stringId")&&(t.stringId=e.stringId),void 0!==e.stringValue&&null!==e.stringValue&&e.hasOwnProperty("stringValue")&&(t.stringValue=e.stringValue),t},r.prototype.toObject=function(e){return this.constructor.toObject(this,e)},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r}(),r.StringIdOrValueProto=function(){function r(e){if(e)for(var r=Object.keys(e),t=0;t<r.length;++t)this[r[t]]=e[r[t]]}return r.prototype.stringId=0,r.prototype.value="",r.decode=function(e,r){e instanceof o||(e=o.create(e));for(var t=void 0===r?e.len:e.pos+r,a=new i.keyhole.dbroot.StringIdOrValueProto;e.pos<t;){var n=e.uint32();switch(n>>>3){case 1:a.stringId=e.fixed32();break;case 2:a.value=e.string();break;default:e.skipType(7&n)}}return a},r.verify=function(e){return"object"!=typeof e||null===e?"object expected":void 0===e.stringId||a.isInteger(e.stringId)?void 0===e.value||a.isString(e.value)?null:"value: string expected":"stringId: integer expected"},r.fromObject=function(e){if(e instanceof i.keyhole.dbroot.StringIdOrValueProto)return e;var r=new i.keyhole.dbroot.StringIdOrValueProto;return void 0!==e.stringId&&null!==e.stringId&&(r.stringId=e.stringId>>>0),void 0!==e.value&&null!==e.value&&(r.value=String(e.value)),r},r.from=r.fromObject,r.toObject=function(e,r){r||(r={});var t={};return r.defaults&&(t.stringId=0,t.value=""),void 0!==e.stringId&&null!==e.stringId&&e.hasOwnProperty("stringId")&&(t.stringId=e.stringId),void 0!==e.value&&null!==e.value&&e.hasOwnProperty("value")&&(t.value=e.value),t},r.prototype.toObject=function(e){return this.constructor.toObject(this,e)},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r}(),r.PlanetModelProto=function(){function r(e){if(e)for(var r=Object.keys(e),t=0;t<r.length;++t)this[r[t]]=e[r[t]]}return r.prototype.radius=6378.137,r.prototype.flattening=.00335281066474748,r.prototype.elevationBias=0,r.prototype.negativeAltitudeExponentBias=0,r.prototype.compressedNegativeAltitudeThreshold=0,r.decode=function(e,r){e instanceof o||(e=o.create(e));for(var t=void 0===r?e.len:e.pos+r,a=new i.keyhole.dbroot.PlanetModelProto;e.pos<t;){var n=e.uint32();switch(n>>>3){case 1:a.radius=e.double();break;case 2:a.flattening=e.double();break;case 4:a.elevationBias=e.double();break;case 5:a.negativeAltitudeExponentBias=e.int32();break;case 6:a.compressedNegativeAltitudeThreshold=e.double();break;default:e.skipType(7&n)}}return a},r.verify=function(e){return"object"!=typeof e||null===e?"object expected":void 0!==e.radius&&"number"!=typeof e.radius?"radius: number expected":void 0!==e.flattening&&"number"!=typeof e.flattening?"flattening: number expected":void 0!==e.elevationBias&&"number"!=typeof e.elevationBias?"elevationBias: number expected":void 0===e.negativeAltitudeExponentB