| | |
| | | string dirPath = GetTerrainPath(args.dircode); |
| | | |
| | | string gdal_data = string.Format("set GDAL_DATA={0}\\data", ctbPath); |
| | | // -N 顶点法线, -C 强制创建缺失根瓦片, -R 不覆盖现有文件 |
| | | string createMesh = string.Format("{0}\\ctb-tile.exe -R -C -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode); |
| | | string createLayer = string.Format("{0}\\ctb-tile.exe -l -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode); |
| | | |
| | |
| | | if (!ids.Contains(m.id)) PubDBHelper.InsertMetaPub(m.id, pubid, args.userId); |
| | | } |
| | | string geom = GetPointZ(args); |
| | | if (!string.IsNullOrEmpty(geom)) PubDBHelper.UpdatePublishGeom(pubid, geom); |
| | | //if (!string.IsNullOrEmpty(geom)) PubDBHelper.UpdatePublishGeom(pubid, geom); |
| | | PubDBHelper.UpdatePublish(pubid, args.name, args.userId, geom); |
| | | |
| | | return pubid; |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新发布数据的坐标 |
| | | /// 更新发布数据 |
| | | /// </summary> |
| | | public static int UpdatePublishGeom(int pid, string geom) |
| | | public static int UpdatePublish(int pubid, string name, int userId, string geom) |
| | | { |
| | | string sql = string.Format("update lf.sys_publish set geom = {0} where id = {1}", string.IsNullOrEmpty(geom) ? "null" : geom, pid); |
| | | //DbParameter dp = new NpgsqlParameter("@geom", geom); |
| | | string str = null == geom ? "" : string.Format(", geom={0}", geom); |
| | | string sql = string.Format("update lf.sys_publish set name=@name, update_user=@userId, create_time=now(), update_time=now(){0} where id=@id", str); |
| | | |
| | | return Tools.DBHelper.ExecuteNonQuery(sql); |
| | | DbParameter dp1 = new NpgsqlParameter("@name", name); |
| | | DbParameter dp2 = new NpgsqlParameter("@userId", userId); |
| | | DbParameter dp3 = new NpgsqlParameter("@id", pubid); |
| | | |
| | | return Tools.DBHelper.ExecuteNonQuery(sql, dp1, dp2, dp3); |
| | | } |
| | | |
| | | /// <summary> |