| | |
| | | /// </summary> |
| | | public static string GetReleaseUrl(SysMeta meta) |
| | | { |
| | | return "http://{host}/LFData/3d/3dtiles/osgb/" + meta.id + "/tileset.json"; |
| | | return "{host}/LFData/3d/3dtiles/osgb/" + meta.id + "/tileset.json"; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | string srs = findSRS(osgbPath); |
| | | if (null != srs) writeSRS(osgbPath, getSRS(srs)); |
| | | |
| | | string cmd = string.Format("{0}\\3dtile.exe -f osgb -i \"{1}\" -o \"{2}\" -c \"{{\\\"offset\\\": {3}}}\"", d3tilesPath, osgbPath, outPath, args.z); |
| | | err = Tools.ExecCmd(cmd, false, false); |
| | | int idx = args.ids.IndexOf(meta.id); |
| | | string cmd = string.Format("{0}\\3dtile.exe -f osgb -i \"{1}\" -o \"{2}\" -c \"{{\\\"offset\\\": {3}}}\"", d3tilesPath, osgbPath, outPath, args.zs[idx]); |
| | | SysTask task = TaskDBHelper.CreateTask(args, meta, "OSGB", "倾斜数据(OSGB)"); |
| | | err = Tools.ExecCmd(task, cmd, false); |
| | | err = null; |
| | | |
| | | if (null != srs) writeSRS(osgbPath, srs); |
| | |
| | | /// </summary> |
| | | private static int InsertToDB(SysMeta meta, XYZArgs args, string path) |
| | | { |
| | | if (PubDBHelper.IsPublish(meta.id)) return 0; |
| | | //if (PubDBHelper.IsPublish(meta.id)) return 1; |
| | | int pubid = PubDBHelper.GetPushlishId(meta.id); |
| | | if (pubid > 0) |
| | | { |
| | | PubDBHelper.UpdatePublish(pubid, meta.name, args.userId, null); |
| | | return pubid; |
| | | } |
| | | |
| | | SysPublish sys = Tools.NewPublish(meta, args, GetReleaseUrl(meta), path); |
| | | |
| | | int pubid = PubDBHelper.InsertPublish(sys); |
| | | pubid = PubDBHelper.InsertPublish(sys); |
| | | if (pubid > 0) |
| | | { |
| | | sys.id = pubid; |