melowntech / vts-browser-js

JavaScript WebGL 3D map rendering engine
BSD 2-Clause "Simplified" License
218 stars 42 forks source link

how to find mapConfig.json file #174

Closed stefan9955 closed 4 years ago

stefan9955 commented 4 years ago

Hi, I was researching a bit of VTS, its functionality and its eventual application. I processed my data set (DMT, DEM, trueortho, 3D shape (3d line and 3d point), 3d mesh) for two areas (two areas of the city).

I inserted tilesets into storage and created a storage view.

I encountered a problem, when I want to create an application via VTS Browser JS I need to enter a mapConfig.json file.

var browser = vts.browser('map-div', { map: ? });

The problem is, I'm not clear on where the json file is. I received the mentioned file via the var --map-config ulcinj.json command, but I don't know how to invoke the file.

storage view is: { "storage": "../stage.melown2015",

  "tilesets": [
          "ulcinj-dem"
  ],

  "credits": { },

  "boundLayers": {
        "dof":"mapproxy/melown2015/tms/ulcinj/dof/boundlayer.json"
  },

  "freeLayers": {
        "vektor_Bandere":"mapproxy/melown2015/geodata/ulcinj/vektor_Bandere/freelayer.json",
        "vektor_Zice_NN":"mapproxy/melown2015/geodata/ulcinj/vektor_Zice_NN/freelayer.json"
  },

  "view": {
          "description": "",
          "surfaces": {
                  "ulcinj-dem": ["dof"]
          },
          "freeLayers": {
                 "vektor_Bandere":{},
                 "vektor_Zice_NN":{"style":"/store/stylesheet/vektor_Zice_NN.json"}
          }
  },

  "namedViews": {},

  "position": [
          "obj",77.098897,26.527094,"float",0.000000,0.0000000,-90.000000,0.000000,1774.101391,45.000000
  ],

  "version": 1

}

and mapConfig.json is: { "bodies" : { "Earth" : { "atmosphere" : { "colorHorizon" : [ 158, 206, 255, 255 ], "colorZenith" : [ 62, 120, 229, 255 ], "thickness" : 100000, "visibility" : 100000 }, "class" : "planet", "comment" : "Earth, Sol III, M-class planet.", "defaultGeoidGrid" : "egm96_15.gtx", "parent" : "Sun" }, "Sun" : { "class" : "star", "comment" : "Sol, G2V main-sequence star." } }, "boundLayers" : { "dof" : "mapproxy/melown2015/tms/ulcinj/dof/boundlayer.json" }, "credits" : {}, "freeLayers" : { "vektor_Bandere" : "mapproxy/melown2015/geodata/ulcinj/vektor_Bandere/freelayer.json", "vektor_Zice_NN" : "mapproxy/melown2015/geodata/ulcinj/vektor_Zice_NN/freelayer.json" }, "glue" : [], "namedViews" : {}, "params" : {}, "position" : [ "obj", 77.098896999999994, 26.527094000000002, "float", 0, 0, -90, 0, 1774.1013909999999, 45 ], "referenceFrame" : { "body" : "Earth", "description" : "Earth, global geographic reference frame (Melown 2015)", "division" : { "extents" : { "ll" : [ -7500000, -7500000, -7500000 ], "ur" : [ 7500000, 7500000, 7500000 ] }, "heightRange" : [ -12000, 9500 ], "nodes" : [ { "extents" : { "ll" : [ -20037508.342789002, -10018754.171394 ], "ur" : [ 20037508.342789002, 10018754.171394 ] }, "id" : { "lod" : 0, "position" : [ 0, 0 ] }, "partitioning" : { "00" : { "ll" : [ -20037508.342799999, -9467848.3472000007 ], "ur" : [ 20037508.342799999, 9467848.3472000007 ] }, "01" : { "ll" : [ -20037508.342799999, 9467848.3471611794 ], "ur" : [ 20037508.342799999, 10018754.171399999 ] }, "10" : { "ll" : [ -20037508.342799999, -10018754.171399999 ], "ur" : [ 20037508.342799999, -9467848.3471611794 ] } }, "srs" : "eqc-wgs84" }, { "extents" : { "ll" : [ -20037508.342789002, -20037508.342789002 ], "ur" : [ 20037508.342789002, 20037508.342789002 ] }, "externalTexture" : true, "id" : { "lod" : 1, "position" : [ 0, 0 ] }, "partitioning" : "bisection", "srs" : "pseudomerc" }, { "extents" : { "ll" : [ 278600, 278600 ], "ur" : [ 3721400, 3721400 ] }, "externalTexture" : true, "id" : { "lod" : 1, "position" : [ 0, 1 ] }, "partitioning" : "bisection", "srs" : "steren-wgs84" }, { "extents" : { "ll" : [ 278600, 278600 ], "ur" : [ 3721400, 3721400 ] }, "externalTexture" : true, "id" : { "lod" : 1, "position" : [ 1, 0 ] }, "partitioning" : "bisection", "srs" : "steres-wgs84" } ] }, "extensions" : { "wmts" : { "content" : "pseudomerc", "projection" : "urn:ogc:def:crs:EPSG::3857", "wellKnownScaleSet" : "urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible" } }, "id" : "melown2015", "model" : { "navigationSrs" : "geographic-wgs84", "physicalSrs" : "geocentric-wgs84", "publicSrs" : "geographic-wgs84-egm96" }, "parameters" : { "metaBinaryOrder" : 5 }, "version" : 1 }, "rois" : [], "srses" : { "eqc-wgs84" : { "comment" : "Projected, wgs84 equidistant cylindrical (epsg:4087)", "srsDef" : "+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "type" : "projected" }, "geocentric-wgs84" : { "comment" : "Geocentric, WGS84 (epsg:4978)", "srsDef" : "+proj=geocent +datum=WGS84 +units=m +no_defs", "type" : "cartesian" }, "geographic-wgs84" : { "comment" : "Geographic, WGS84 (epsg:4326)", "srsDef" : "+proj=longlat +datum=WGS84 +no_defs", "type" : "geographic" }, "geographic-wgs84-egm96" : { "comment" : "Geographic, WGS84 with EGM96 vertical (epsg:4326+5773)", "geoidGrid" : { "definition" : "geographic-wgs84-egm96-geoidgrid.jpg", "extents" : { "ll" : [ -180, -90 ], "ur" : [ 180, 90 ] }, "srsDefEllps" : "+proj=longlat +datum=WGS84 +no_defs", "valueRange" : [ -107, 85.400000000000006 ] }, "srsDef" : "+proj=longlat +datum=WGS84 +geoidgrids=egm96_15.gtx +vunits=m +no_defs", "type" : "geographic" }, "pseudomerc" : { "comment" : "Projected, Web/Pseudo Mecator (epsg:3857)", "periodicity" : { "period" : 40075016.685578004, "type" : "X" }, "srsDef" : "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs", "type" : "projected" }, "steren-wgs84" : { "comment" : "Projected, UPS north (epsg:32661)", "srsDef" : "+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs", "type" : "projected" }, "steres-wgs84" : { "comment" : "Projected, UPS south (epsg:32761)", "srsDef" : "+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs", "type" : "projected" } }, "surfaces" : [ { "2d" : { "creditsUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}.credits?0", "maskUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}.mask?0", "metaUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}.2dmeta?0", "orthoUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}-{sub}.ortho?0" }, "id" : "ulcinj-dem", "lodRange" : [ 15, 25 ], "meshUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}.bin?0", "metaUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}.meta?0", "navUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}.nav?0", "textureUrl" : "http://127.0.0.1:8070/mapproxy/melown2015/surface/ulcinj/dem/{lod}-{x}-{y}-{sub}.jpg?0", "tileRange" : [ [ 11700, 6938 ], [ 11701, 6939 ] ] } ], "textureAtlasReady" : false, "version" : 1, "view" : { "description" : "", "freeLayers" : { "vektor_Bandere" : {}, "vektor_Zice_NN" : { "style" : "/store/stylesheet/vektor_Zice_NN.json" } }, "surfaces" : { "ulcinj-dem" : [ "dof" ] } }, "virtualSurfaces" : [] }

I don't know if you understood what the problem was. It would mean a lot to me to answer.

TeapoyYinYue commented 4 years ago

@stefan9955 I have been trying to deal with the mapconfig. Can you share how you are able to create the mapconfig for usage? and where to store the mapconfig on the backend?