Browse Source

道路数据更新

dev
CODE 1 year ago
parent
commit
2992963e85
  1. 247
      scripts/1.4.0/data/1_calc_village_distance_无需执行/index.js
  2. BIN
      scripts/1.4.0/data/2_update_road_data_无需执行/data/乡道(新)(1).xlsx
  3. BIN
      scripts/1.4.0/data/2_update_road_data_无需执行/data/乡道(新).xlsx
  4. BIN
      scripts/1.4.0/data/2_update_road_data_无需执行/data/县道(新).xlsx
  5. BIN
      scripts/1.4.0/data/2_update_road_data_无需执行/data/村道(新)(2).xlsx
  6. 124
      scripts/1.4.0/data/2_update_road_data_无需执行/index.js
  7. BIN
      scripts/1.4.0/data/2_update_road_data_无需执行/no_exist_village.txt
  8. 3303
      scripts/1.4.0/data/2_update_road_data_无需执行/village_update.sql
  9. 17
      scripts/1.4.0/data/3_update_village_data_无需执行/.vscode/launch.json
  10. 11
      scripts/1.4.0/data/3_update_village_data_无需执行/Dockerfile
  11. 7
      scripts/1.4.0/data/3_update_village_data_无需执行/Dockerfilenew
  12. BIN
      scripts/1.4.0/data/3_update_village_data_无需执行/data/村.xlsx
  13. 64
      scripts/1.4.0/data/3_update_village_data_无需执行/index.js
  14. 17
      scripts/1.4.0/data/3_update_village_data_无需执行/package.json
  15. 87
      scripts/1.4.0/data/3_update_village_data_无需执行/village.sql
  16. 118
      scripts/1.4.0/data/4_village.sql
  17. 4139
      scripts/1.4.0/data/5_village_distance.sql
  18. 3303
      scripts/1.4.0/data/6.village_update.sql

247
scripts/1.4.0/data/1_calc_village_distance_无需执行/index.js

@ -41,130 +41,131 @@ try {
await client.query('BEGIN')
console.log(`开始`);
// const noTownshipLoop = false
const noTownshipLoop = true
// 查南昌市下的区县
const nanchangRes =
noTownshipLoop ? [] : await request.get(`https://restapi.amap.com/v3/config/district?key=${godKey}&keywords=360100&subdistrict=1`)
let townshipList =
noTownshipLoop ? [] : nanchangRes.body.districts[0].districts
// 获取各村位置
for (let t of (noTownshipLoop ? [{}] : townshipList)) {
console.log(`${t.name}`);
// 划分 20 个矩形查询
let leftTop = [115.792048, 28.976526]
let rightBottom = [116.324981, 28.262191]
for (let i = 0; i < 5; i++) { // 纵向
let top = leftTop[1] + (rightBottom[1] - leftTop[1]) / 5 * i
let bottom = leftTop[1] + (rightBottom[1] - leftTop[1]) / 5 * (i + 1)
for (let j = 0; j < 5; j++) { // 横向
let left = leftTop[0] + (rightBottom[0] - leftTop[0]) / 5 * j
let right = leftTop[0] + (rightBottom[0] - leftTop[0]) / 5 * (j + 1)
console.log(`矩形:${left},${top},${right},${bottom}`);
let pageNum = 1
let continueSearch = true
for (; continueSearch;) {
console.log(`查询第${pageNum}`);
let pageSize = 10
/** 关键词查询 */
// const res = await request.get(`https://restapi.amap.com/v5/place/text?key=${godKey}&types=130106&region=360000&citylimit=true&page_size=25&page_num=${pageNum}&extensions=all`)
/** 区县查询 */
// const res = await request.get(`https://restapi.amap.com/v3/place/text?key=${godKey}&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&page_size=25&types=130106&citylimit=true&city=${t.adcode}&page=${pageNum}`)
/** 矩形查询 */
pageSize = 50
// const res = await request.get(`https://restapi.amap.com/v3/place/polygon?key=21c2d970e1646bb9a795900dd00093ce&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&types=130106&offset=${pageSize}&page=${pageNum}&polygon=${left},${top}|${right},${bottom}`)
/** 矩形查询 V2 */
pageSize = 25
const res = await request.get(`https://restapi.amap.com/v5/place/polygon?key=21c2d970e1646bb9a795900dd00093ce&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&types=130106&page_size=${pageSize}&page_num=${pageNum}&polygon=${left},${top}|${right},${bottom}`)
await new Promise(resolve => setTimeout(() => resolve(), 2000));
// console.log(res.body);
const data = res.body
// console.log(data);
console.log(`查得 ${data.pois.length}`);
if (data.count == 0) {
continueSearch = false
break;
} else {
pageNum++
}
for await (let p of data.pois) {
console.log(p.name);
if (p.name.includes('村委会') || p.name.includes('村民委员会')) {
let vName = p.name.replace('村委会', '').replace('村民委员会', '').replace(/\(.*?\)/g, '')
if (vName.includes('乡')) {
let townKeyIndex = vName.indexOf('乡')
if (townKeyIndex >= 0) {
vName = vName.substring(townKeyIndex + 1)
}
}
if (vName.includes('镇')) {
let townKeyIndex = vName.indexOf('镇')
if (townKeyIndex >= 0) {
vName = vName.substring(townKeyIndex + 1)
}
}
if (!vName.endsWith('村')) {
vName = vName + '村'
}
// console.log(`${vName}`);
let locationArr = p.location.split(',')
// 查询镇名是否存在
let existRes = await client.query(
`SELECT * FROM village WHERE name=$1`,
[vName]
)
if (existRes.rowCount == 0) {
existRes = await client.query(
`SELECT * FROM village WHERE name=$1`,
[vName + '委会']
)
}
if (existRes.rowCount == 0) {
} else {
let existV = existRes.rows[0]
if (existV.id < 207) {
continue
}
// console.log(existRes);
await client.query(
`UPDATE village SET longitude=$1, latitude=$2 WHERE id=$3`,
[locationArr[0], locationArr[1], existV.id]
)
}
}
}
if (data.pois.length < pageSize) {
continueSearch = false
}
}
}
}
}
// // 查南昌市下的区县
// const nanchangRes =
// noTownshipLoop ? [] : await request.get(`https://restapi.amap.com/v3/config/district?key=${godKey}&keywords=360100&subdistrict=1`)
// let townshipList =
// noTownshipLoop ? [] : nanchangRes.body.districts[0].districts
// // 获取各村位置
// for (let t of (noTownshipLoop ? [{}] : townshipList)) {
// console.log(`${t.name}`);
// // 划分 20 个矩形查询
// let leftTop = [115.792048, 28.976526]
// let rightBottom = [116.324981, 28.262191]
// for (let i = 0; i < 5; i++) { // 纵向
// let top = leftTop[1] + (rightBottom[1] - leftTop[1]) / 5 * i
// let bottom = leftTop[1] + (rightBottom[1] - leftTop[1]) / 5 * (i + 1)
// for (let j = 0; j < 5; j++) { // 横向
// let left = leftTop[0] + (rightBottom[0] - leftTop[0]) / 5 * j
// let right = leftTop[0] + (rightBottom[0] - leftTop[0]) / 5 * (j + 1)
// console.log(`矩形:${left},${top},${right},${bottom}`);
// let pageNum = 1
// let continueSearch = true
// for (; continueSearch;) {
// console.log(`查询第${pageNum}页`);
// let pageSize = 10
// /** 关键词查询 */
// // const res = await request.get(`https://restapi.amap.com/v5/place/text?key=${godKey}&types=130106&region=360000&citylimit=true&page_size=25&page_num=${pageNum}&extensions=all`)
// /** 区县查询 */
// // const res = await request.get(`https://restapi.amap.com/v3/place/text?key=${godKey}&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&page_size=25&types=130106&citylimit=true&city=${t.adcode}&page=${pageNum}`)
// /** 矩形查询 */
// pageSize = 50
// // const res = await request.get(`https://restapi.amap.com/v3/place/polygon?key=21c2d970e1646bb9a795900dd00093ce&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&types=130106&offset=${pageSize}&page=${pageNum}&polygon=${left},${top}|${right},${bottom}`)
// /** 矩形查询 V2 */
// pageSize = 25
// const res = await request.get(`https://restapi.amap.com/v5/place/polygon?key=21c2d970e1646bb9a795900dd00093ce&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&types=130106&page_size=${pageSize}&page_num=${pageNum}&polygon=${left},${top}|${right},${bottom}`)
// await new Promise(resolve => setTimeout(() => resolve(), 2000));
// // console.log(res.body);
// const data = res.body
// // console.log(data);
// console.log(`查得 ${data.pois.length} 条`);
// if (data.count == 0) {
// continueSearch = false
// break;
// } else {
// pageNum++
// }
// for await (let p of data.pois) {
// console.log(p.name);
// if (p.name.includes('村委会') || p.name.includes('村民委员会')) {
// let vName = p.name.replace('村委会', '').replace('村民委员会', '').replace(/\(.*?\)/g, '')
// if (vName.includes('乡')) {
// let townKeyIndex = vName.indexOf('乡')
// if (townKeyIndex >= 0) {
// vName = vName.substring(townKeyIndex + 1)
// }
// }
// if (vName.includes('镇')) {
// let townKeyIndex = vName.indexOf('镇')
// if (townKeyIndex >= 0) {
// vName = vName.substring(townKeyIndex + 1)
// }
// }
// if (!vName.endsWith('村')) {
// vName = vName + '村'
// }
// // console.log(`${vName}`);
// let locationArr = p.location.split(',')
// // 查询镇名是否存在
// let existRes = await client.query(
// `SELECT * FROM village WHERE name=$1`,
// [vName]
// )
// if (existRes.rowCount == 0) {
// existRes = await client.query(
// `SELECT * FROM village WHERE name=$1`,
// [vName + '委会']
// )
// }
// if (existRes.rowCount == 0) {
// } else {
// let existV = existRes.rows[0]
// if (existV.id < 219) {
// continue
// }
// // console.log(existRes);
// await client.query(
// `UPDATE village SET longitude=$1, latitude=$2 WHERE id=$3`,
// [locationArr[0], locationArr[1], existV.id]
// )
// }
// }
// }
// if (data.pois.length < pageSize) {
// continueSearch = false
// }
// }
// }
// }
// }
const allVillagesRes = await client.query(
`SELECT * FROM village`
@ -198,6 +199,7 @@ try {
[v.id, vv.id, distance]
)
} else {
if (!noTownshipLoop) {
let upSql = `UPDATE village_distance SET distance=$1 WHERE origin_village=$2 AND calc_village=$3`
await client.query(
upSql
@ -207,6 +209,7 @@ try {
}
}
}
}
// await client.query('ROLLBACK')
await client.query('COMMIT')

BIN
scripts/1.4.0/data/2_update_road_data_无需执行/data/乡道(新)(1).xlsx

Binary file not shown.

BIN
scripts/1.4.0/data/2_update_road_data_无需执行/data/乡道(新).xlsx

Binary file not shown.

BIN
scripts/1.4.0/data/2_update_road_data_无需执行/data/县道(新).xlsx

Binary file not shown.

BIN
scripts/1.4.0/data/2_update_road_data_无需执行/data/村道(新)(2).xlsx

Binary file not shown.

124
scripts/1.4.0/data/2_update_road_data_无需执行/index.js

@ -21,24 +21,130 @@ try {
await client.query('BEGIN')
console.log(`开始`);
let allVillageRes = (await client.query(`SELECT * FROM village`)).rows
// console.log(allVillageRes);
// 读取数据文件
let workbook = XLSX.readFile(path.join(__dirname, './data/乡道(新)(1).xlsx'));
let workbook = XLSX.readFile(path.join(__dirname, './data/村道(新)(2).xlsx'));
let firstSheetName = workbook.SheetNames[0];
let worksheet = workbook.Sheets[firstSheetName];
let res = XLSX.utils.sheet_to_json(worksheet, {
defval: ''
});
for (let r of res) {
let workbook2 = XLSX.readFile(path.join(__dirname, './data/县道(新).xlsx'));
let firstSheetName2 = workbook2.SheetNames[0];
let worksheet2 = workbook2.Sheets[firstSheetName2];
let res2 = XLSX.utils.sheet_to_json(worksheet2, {
defval: ''
});
let workbook3 = XLSX.readFile(path.join(__dirname, './data/乡道(新).xlsx'));
let firstSheetName3 = workbook3.SheetNames[0];
let worksheet3 = workbook3.Sheets[firstSheetName3];
let res3 = XLSX.utils.sheet_to_json(worksheet3, {
defval: ''
});
let villageSql = ''
let noExistVillage = ''
let noExistVillageObj = {}
for (let r of [...res, ...res2, ...res3]) {
console.log(r);
fs.writeFileSync('AnswerOld.sql', `;\n`, 'utf-8');
// let time = generateRandomTimeString()
// console.log(time);
// await client.query(
// `INSERT INTO report (report_type, project_type, road, time,content,user_id) VALUES($1, $2, $3, $4, $5, $6) `,
// ['conserve', 'road', r['养护道路'], time, r['养护内容'], userId])
// // break
// if (r.id == 3259) {
// console.log(r);
// }
let villageId = null
if (r['所属行政村']) {
let v = r['所属行政村']
v = v.split(' ')[0]
v = v.trim()
if (v) {
let noExist = false
let corV = allVillageRes.find(village => village.name === v)
if (corV) {
villageId = corV.id
} else {
if (!v.endsWith('村')) {
v += '村'
let corV = allVillageRes.find(village => village.name === v)
if (corV) {
villageId = corV.id
} else {
noExist = true
}
} else {
noExist = true
}
}
if (noExist) {
if (!noExistVillageObj[v]) {
noExistVillage += `${v}\n`
noExistVillageObj[v] = true
}
}
}
}
let del = false
let spot = true
let isDel = r['isdelete']
if (isDel) {
isDel = isDel.toString()
isDel = isDel.trim()
if (isDel) {
if (isDel == 1) {
del = true
} else if (isDel == 2) {
spot = false
}
}
}
let rId = r.id
if (rId) {
rId = rId.toString()
rId = rId.trim()
if (rId) {
r.id = rId
}
}
if (r.id) {
villageSql += `UPDATE road SET village_id = ${villageId}, "del" = ${del}, spot = ${spot} WHERE id = ${r.id};\n`
} else {
villageSql += `
INSERT INTO road (
route_name,
village_id,
"del",
spot,
route_code,
section_no,
township_code,
stop_station,
section_type
) VALUES (
'${r.route_name}',
${villageId || `null`},
${del},
${spot},
${r.route_code ? `'${r.route_code}'` : `null`},
${r.section_no ? `'${r.section_no}'` : `null`},
${r.township_code ? `'${r.township_code}'` : `null`},
${r.stop_station ? `'${r.stop_station}'` : `null`},
${r.section_type ? `'${r.section_type}'` : `null`}
);\n`
}
}
fs.writeFileSync('village_update.sql', villageSql, 'utf-8');
fs.writeFileSync('no_exist_village.txt', noExistVillage, 'utf-8');
// await client.query('ROLLBACK')
await client.query('COMMIT')

BIN
scripts/1.4.0/data/2_update_road_data_无需执行/no_exist_village.txt

Binary file not shown.

3303
scripts/1.4.0/data/2_update_road_data_无需执行/village_update.sql

File diff suppressed because it is too large

17
scripts/1.4.0/data/3_update_village_data_无需执行/.vscode/launch.json

@ -0,0 +1,17 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "启动程序",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\index.js"
}
]
}

11
scripts/1.4.0/data/3_update_village_data_无需执行/Dockerfile

@ -0,0 +1,11 @@
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
COPY . /var/app
WORKDIR /var/app
RUN npm cache clean -f
RUN rm -rf package-lock.json
RUN npm install --registry http://10.8.30.22:7000
CMD ["node", "index.js"]

7
scripts/1.4.0/data/3_update_village_data_无需执行/Dockerfilenew

@ -0,0 +1,7 @@
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
COPY ./scripts/1.3.1/data/1_insert_report_data /var/app
WORKDIR /var/app
RUN npm cache clean -f
RUN rm -rf package-lock.json
RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/
CMD ["node", "index.js"]

BIN
scripts/1.4.0/data/3_update_village_data_无需执行/data/村.xlsx

Binary file not shown.

64
scripts/1.4.0/data/3_update_village_data_无需执行/index.js

@ -0,0 +1,64 @@
try {
const { Pool, Client } = require('pg')
const XLSX = require('xlsx')
const path = require('path')
const fs = require("fs");
// 测试环境
const pool = new Pool({
user: 'postgres',
host: '10.8.30.32',
database: 'highways4good',
password: '123',
port: 5432,
})
const fun = async () => {
// note: we don't try/catch this because if connecting throws an exception
// we don't need to dispose of the client (it will be undefined)
const client = await pool.connect()
try {
await client.query('BEGIN')
console.log(`开始`);
let allVillageRes = (await client.query(`SELECT * FROM village`)).rows
// console.log(allVillageRes);
// 读取数据文件
let workbook = XLSX.readFile(path.join(__dirname, './data/村.xlsx'));
let firstSheetName = workbook.SheetNames[0];
let worksheet = workbook.Sheets[firstSheetName];
let res = XLSX.utils.sheet_to_json(worksheet, {
defval: ''
});
let insertSql = ''
for (let r of res) {
console.log(r);
if (r.v_n) {
let village = allVillageRes.find(v => v.name === r.v_n)
if (!village) {
insertSql += `INSERT INTO village (name,township_code) VALUES ('${r.v_n}',${r.t_c});\n`
}
}
}
fs.writeFileSync('village.sql', insertSql, 'utf-8');
// await client.query('ROLLBACK')
await client.query('COMMIT')
console.log('执行完毕~')
} catch (e) {
await client.query('ROLLBACK')
console.log('执行错误~')
throw e
} finally {
client.release();
}
}
fun()
} catch (error) {
console.error(error)
}

17
scripts/1.4.0/data/3_update_village_data_无需执行/package.json

@ -0,0 +1,17 @@
{
"name": "appkey-generator",
"version": "1.0.0",
"description": "tool",
"main": "index.js",
"scripts": {
"test": "mocha",
"start": "set NODE_ENV=development&&node index"
},
"author": "liu",
"license": "ISC",
"dependencies": {
"crypto-js": "^4.1.1",
"pg": "^7.18.2",
"xlsx": "^0.17.1"
}
}

87
scripts/1.4.0/data/3_update_village_data_无需执行/village.sql

@ -0,0 +1,87 @@
INSERT INTO village (name,township_code) VALUES ('协城村',360121103000);
INSERT INTO village (name,township_code) VALUES ('后曲',360121206000);
INSERT INTO village (name,township_code) VALUES ('若岗村',360121204000);
INSERT INTO village (name,township_code) VALUES ('张坊村',360121204000);
INSERT INTO village (name,township_code) VALUES ('南溪村',360121108000);
INSERT INTO village (name,township_code) VALUES ('沙港村',360121108000);
INSERT INTO village (name,township_code) VALUES ('宋洲村',360121108000);
INSERT INTO village (name,township_code) VALUES ('广福村',360121108000);
INSERT INTO village (name,township_code) VALUES ('荷山村',360121108000);
INSERT INTO village (name,township_code) VALUES ('官塘村',360121108000);
INSERT INTO village (name,township_code) VALUES ('漳溪村',360121108000);
INSERT INTO village (name,township_code) VALUES ('北头村',360121108000);
INSERT INTO village (name,township_code) VALUES ('万洲村',360121108000);
INSERT INTO village (name,township_code) VALUES ('吴石村',360121108000);
INSERT INTO village (name,township_code) VALUES ('木山村',360121108000);
INSERT INTO village (name,township_code) VALUES ('江家村',360121108000);
INSERT INTO village (name,township_code) VALUES ('潭岗村',360121108000);
INSERT INTO village (name,township_code) VALUES ('板湖村',360121108000);
INSERT INTO village (name,township_code) VALUES ('北旺村',360121105000);
INSERT INTO village (name,township_code) VALUES ('塔田村',360121000000);
INSERT INTO village (name,township_code) VALUES ('樟栖',360121000000);
INSERT INTO village (name,township_code) VALUES ('流芳村',360121200000);
INSERT INTO village (name,township_code) VALUES ('埂头村',360121100000);
INSERT INTO village (name,township_code) VALUES ('街上村',360121100000);
INSERT INTO village (name,township_code) VALUES ('墨山村',360121100000);
INSERT INTO village (name,township_code) VALUES ('定岗村',360121100000);
INSERT INTO village (name,township_code) VALUES ('小蓝村',360121100000);
INSERT INTO village (name,township_code) VALUES ('丰州村',360121201000);
INSERT INTO village (name,township_code) VALUES ('南坊村 ',360121106000);
INSERT INTO village (name,township_code) VALUES ('璜溪村',360121101000);
INSERT INTO village (name,township_code) VALUES ('荆山',360121101000);
INSERT INTO village (name,township_code) VALUES ('丁坊村',360121101000);
INSERT INTO village (name,township_code) VALUES ('南店村',360121101000);
INSERT INTO village (name,township_code) VALUES ('山背村',360121101000);
INSERT INTO village (name,township_code) VALUES ('沙潭',360121101000);
INSERT INTO village (name,township_code) VALUES ('高田',360121101000);
INSERT INTO village (name,township_code) VALUES ('合乞村',360121101000);
INSERT INTO village (name,township_code) VALUES ('剑霞',360121101000);
INSERT INTO village (name,township_code) VALUES ('梁西',360121101000);
INSERT INTO village (name,township_code) VALUES ('黄堂',360121101000);
INSERT INTO village (name,township_code) VALUES ('棠墅',360121101000);
INSERT INTO village (name,township_code) VALUES ('河头',360121101000);
INSERT INTO village (name,township_code) VALUES ('黄山',360121101000);
INSERT INTO village (name,township_code) VALUES ('西洛村',360121101000);
INSERT INTO village (name,township_code) VALUES ('浃溪村',360121101000);
INSERT INTO village (name,township_code) VALUES ('东风社区',360121101000);
INSERT INTO village (name,township_code) VALUES ('向塘村',360121101000);
INSERT INTO village (name,township_code) VALUES ('东风路社区',360121101000);
INSERT INTO village (name,township_code) VALUES ('新村村',360121101000);
INSERT INTO village (name,township_code) VALUES ('新村',360121101000);
INSERT INTO village (name,township_code) VALUES ('辜坊村',360121101000);
INSERT INTO village (name,township_code) VALUES ('翠林村',360121101000);
INSERT INTO village (name,township_code) VALUES ('敷林村',360121471000);
INSERT INTO village (name,township_code) VALUES ('棠左村',360121471000);
INSERT INTO village (name,township_code) VALUES ('浒南村',360121471000);
INSERT INTO village (name,township_code) VALUES ('万湖村',360121471000);
INSERT INTO village (name,township_code) VALUES ('春溪村',360121471000);
INSERT INTO village (name,township_code) VALUES ('翠林村',360121471000);
INSERT INTO village (name,township_code) VALUES ('蛟溪村',360121471000);
INSERT INTO village (name,township_code) VALUES ('江陂村',360121104000);
INSERT INTO village (name,township_code) VALUES ('新庄村',360121104000);
INSERT INTO village (name,township_code) VALUES ('灌溪村',360121104000);
INSERT INTO village (name,township_code) VALUES ('流芳村',360121104000);
INSERT INTO village (name,township_code) VALUES ('南山村',360121104000);
INSERT INTO village (name,township_code) VALUES ('南湖村',360121104000);
INSERT INTO village (name,township_code) VALUES ('潭林村',360121104000);
INSERT INTO village (name,township_code) VALUES ('田坪村',360121104000);
INSERT INTO village (name,township_code) VALUES ('黄坊村',360121104000);
INSERT INTO village (name,township_code) VALUES ('杨树村',360121104000);
INSERT INTO village (name,township_code) VALUES ('牌坊村',360121104000);
INSERT INTO village (name,township_code) VALUES ('胡陶村',360121104000);
INSERT INTO village (name,township_code) VALUES ('涂村村',360121104000);
INSERT INTO village (name,township_code) VALUES ('少城村',360121104000);
INSERT INTO village (name,township_code) VALUES ('青塘村',360121104000);
INSERT INTO village (name,township_code) VALUES ('竹林村',360121104000);
INSERT INTO village (name,township_code) VALUES ('东田村',360121104000);
INSERT INTO village (name,township_code) VALUES ('厚田村',360121104000);
INSERT INTO village (name,township_code) VALUES ('幽兰村',360121104000);
INSERT INTO village (name,township_code) VALUES ('马游村',360121104000);
INSERT INTO village (name,township_code) VALUES ('枫林村',360121104000);
INSERT INTO village (name,township_code) VALUES ('渡头村',360121104000);
INSERT INTO village (name,township_code) VALUES ('新荣村',360121104000);
INSERT INTO village (name,township_code) VALUES ('东联村',360121104000);
INSERT INTO village (name,township_code) VALUES ('亭山村',360121104000);
INSERT INTO village (name,township_code) VALUES ('桃岭村',360121104000);
INSERT INTO village (name,township_code) VALUES ('涂洲村',360121104000);
INSERT INTO village (name,township_code) VALUES ('罗舍村',360121104000);

118
scripts/1.4.0/data/4_village.sql

@ -15,14 +15,18 @@
Date: 13/12/2023 11:19:37
*/
-- ----------------------------
-- Records of village
-- ----------------------------
-- ----------------------------
-- Records of village
-- ----------------------------
INSERT INTO "public"."village" VALUES (72, '大浦村', '360121200000', 116.214237, 28.628771);
INSERT INTO "public"."village" VALUES (179, '新庄村委会', '360121104000', 116.184029, 28.577882);
INSERT INTO "public"."village" VALUES (183, '南湖村委会', '360121104000', 116.173834, 28.571146);
INSERT INTO "public"."village" VALUES (18, '雄溪', '360121100000', 115.906383, 28.527645);
INSERT INTO "public"."village" VALUES (20, '樟溪', '360121100000', 115.888085, 28.533192);
INSERT INTO "public"."village" VALUES (27, '院前', '360121000000', 115.983445, 28.580009);
INSERT INTO "public"."village" VALUES (16, '岗前', '360121000000', 115.912766, 28.504385);
INSERT INTO "public"."village" VALUES (31, '若冈村', '360121204000', 115.858428, 28.481393);
INSERT INTO "public"."village" VALUES (34, '冈上镇', '360121107000', 115.867404, 28.416402);
INSERT INTO "public"."village" VALUES (37, '晋安村', '360121107000', 115.864062, 28.452018);
@ -30,14 +34,11 @@ INSERT INTO "public"."village" VALUES (48, '北望村', '360121105000', 116.0269
INSERT INTO "public"."village" VALUES (98, '上徐村', '360121201000', 115.602051, 28.827248);
INSERT INTO "public"."village" VALUES (201, '东联村委会', '360121104000', 116.113818, 28.555688);
INSERT INTO "public"."village" VALUES (112, '高田村', '360121101000', 116.005288, 28.440317);
INSERT INTO "public"."village" VALUES (22, '新坊村', '360121100000', 115.98868, 28.577955);
INSERT INTO "public"."village" VALUES (23, '涂埠村', '360121100000', 115.990438, 28.568502);
INSERT INTO "public"."village" VALUES (94, '程湖村', '360121201000', 116.125333, 28.869139);
INSERT INTO "public"."village" VALUES (104, '建新村', '360121201000', 116.112269, 28.877653);
INSERT INTO "public"."village" VALUES (79, '山头村', '360121200000', 116.274073, 28.643894);
INSERT INTO "public"."village" VALUES (35, '曲湖村', '360121107000', 115.849092, 28.459471);
INSERT INTO "public"."village" VALUES (36, '石湖村', '360121107000', 115.839205, 28.424433);
INSERT INTO "public"."village" VALUES (17, '柏林村', '360121100000', 115.880543, 28.529444);
INSERT INTO "public"."village" VALUES (40, '蚕石村', '360121107000', 115.870111, 28.414157);
INSERT INTO "public"."village" VALUES (51, '垾上村', '360121105000', 115.977852, 28.766188);
INSERT INTO "public"."village" VALUES (210, '岭前村', '360121203000', 115.981315, 28.352234);
@ -49,7 +50,7 @@ INSERT INTO "public"."village" VALUES (217, '罗渡村', '360121203000', 116.000
INSERT INTO "public"."village" VALUES (215, '南安村', '360121203000', 116.045806, 28.346124);
INSERT INTO "public"."village" VALUES (207, '徐家村', '360121203000', 116.025723, 28.344863);
INSERT INTO "public"."village" VALUES (213, '官田村', '360121203000', 116.048015, 28.302216);
INSERT INTO "public"."village" VALUES (219, '冯家村', '360121203000', 116.014752, 28.345062);
INSERT INTO "public"."village" VALUES (258, '剑霞', '360121101000', 116.008095, 28.414172);
INSERT INTO "public"."village" VALUES (110, '荆山村', '360121101000', 115.969413, 28.476892);
INSERT INTO "public"."village" VALUES (46, '黄台村', '360121107000', 115.923932, 28.487954);
INSERT INTO "public"."village" VALUES (214, '丰林村', '360121203000', 116.07343, 28.29544);
@ -60,7 +61,12 @@ INSERT INTO "public"."village" VALUES (212, '白城村', '360121203000', 116.080
INSERT INTO "public"."village" VALUES (6, '新坊村', '360121206000', 115.98868, 28.577955);
INSERT INTO "public"."village" VALUES (57, '山尾村', '360121105000', 116.048296, 28.763889);
INSERT INTO "public"."village" VALUES (120, '山下村', '360121102000', 115.004337, 28.868673);
INSERT INTO "public"."village" VALUES (18, '雄溪村', '360121000000', 115.906383, 28.527645);
INSERT INTO "public"."village" VALUES (20, '樟溪村', '360121000000', 115.888085, 28.533192);
INSERT INTO "public"."village" VALUES (22, '新坊村', '360121000000', 115.98868, 28.577955);
INSERT INTO "public"."village" VALUES (87, '中徐村', '360121201000', 116.037935, 28.781373);
INSERT INTO "public"."village" VALUES (23, '涂埠村', '360121000000', 115.990438, 28.568502);
INSERT INTO "public"."village" VALUES (17, '柏林村', '360121000000', 115.880543, 28.529444);
INSERT INTO "public"."village" VALUES (5, '涂埠村', '360121206000', 115.990438, 28.568502);
INSERT INTO "public"."village" VALUES (45, '东坛村', '360121107000', 115.921248, 28.471955);
INSERT INTO "public"."village" VALUES (111, '沙潭村', '360121101000', 115.98285, 28.457658);
@ -70,7 +76,7 @@ INSERT INTO "public"."village" VALUES (47, '柏岗山村', '360121105000', 116.0
INSERT INTO "public"."village" VALUES (106, '友好村', '360121201000', 116.005304, 28.805869);
INSERT INTO "public"."village" VALUES (76, '创业村', '360121200000', 116.249903, 28.713182);
INSERT INTO "public"."village" VALUES (62, '小莲村', '360121200000', 116.222127, 28.705666);
INSERT INTO "public"."village" VALUES (27, '院前', '360121100000', 115.983445, 28.580009);
INSERT INTO "public"."village" VALUES (244, '街上', '360121100000', 115.936044, 28.587515);
INSERT INTO "public"."village" VALUES (202, '亭山村委会', '360121104000', 116.068404, 28.562518);
INSERT INTO "public"."village" VALUES (203, '桃岭村委会', '360121104000', 116.098351, 28.571411);
INSERT INTO "public"."village" VALUES (83, '东阳村', '360121200000', 115.633671, 28.85576);
@ -79,7 +85,6 @@ INSERT INTO "public"."village" VALUES (200, '新荣村委会', '360121104000', 1
INSERT INTO "public"."village" VALUES (73, '杨芳村', '360121200000', 116.164655, 28.624465);
INSERT INTO "public"."village" VALUES (67, '岗背村', '360121200000', 116.17774, 28.634743);
INSERT INTO "public"."village" VALUES (64, '大沙村', '360121200000', 116.19281, 28.628351);
INSERT INTO "public"."village" VALUES (16, '岗前村', '360121100000', 115.912766, 28.504385);
INSERT INTO "public"."village" VALUES (115, '棠墅村', '360121101000', 116.00075, 28.496959);
INSERT INTO "public"."village" VALUES (114, '黄堂村', '360121101000', 116.004542, 28.450622);
INSERT INTO "public"."village" VALUES (13, '南江村', '360121206000', 115.970667, 28.532563);
@ -87,6 +92,24 @@ INSERT INTO "public"."village" VALUES (14, '钱溪村', '360121206000', 115.9862
INSERT INTO "public"."village" VALUES (11, '板联村', '360121206000', 115.958076, 28.539083);
INSERT INTO "public"."village" VALUES (10, '南邓村', '360121206000', 115.987479, 28.539869);
INSERT INTO "public"."village" VALUES (173, '郭上村', '360121106000', 116.06449, 28.48128);
INSERT INTO "public"."village" VALUES (245, '墨山村', '360121100000', 115.942045, 28.57656);
INSERT INTO "public"."village" VALUES (246, '定岗村', '360121100000', 115.920104, 28.580791);
INSERT INTO "public"."village" VALUES (250, '璜溪村', '360121101000', 115.736186, 28.627513);
INSERT INTO "public"."village" VALUES (257, '合乞村', '360121101000', 125.556694, 44.00721);
INSERT INTO "public"."village" VALUES (248, '丰州村', '360121201000', 118.542326, 24.950797);
INSERT INTO "public"."village" VALUES (249, '南坊村 ', '360121106000', 116.055924, 39.734435);
INSERT INTO "public"."village" VALUES (251, '荆山', '360121101000', 115.969413, 28.476892);
INSERT INTO "public"."village" VALUES (255, '沙潭', '360121101000', 119.375376, 27.4306);
INSERT INTO "public"."village" VALUES (256, '高田', '360121101000', 115.703341, 24.114605);
INSERT INTO "public"."village" VALUES (259, '梁西', '360121101000', 116.020828, 28.39533);
INSERT INTO "public"."village" VALUES (240, '塔田村', '360121000000', 115.914125, 28.532476);
INSERT INTO "public"."village" VALUES (239, '北旺村', '360121105000', 116.026992, 28.732745);
INSERT INTO "public"."village" VALUES (232, '北头村', '360121108000', 115.920872, 28.372506);
INSERT INTO "public"."village" VALUES (223, '若岗村', '360121204000', 115.858605, 28.481234);
INSERT INTO "public"."village" VALUES (222, '后曲', '360121206000', 115.95901, 28.579489);
INSERT INTO "public"."village" VALUES (221, '协城村', '360121103000', 116.130294, 28.660133);
INSERT INTO "public"."village" VALUES (243, '埂头村', '360121100000', 115.945279, 28.586714);
INSERT INTO "public"."village" VALUES (241, '樟栖', '360121000000', 115.888085, 28.533192);
INSERT INTO "public"."village" VALUES (116, '河头村', '360121101000', 116.02505, 28.477677);
INSERT INTO "public"."village" VALUES (137, '塔城乡', '360121202000', 116.10004, 28.50293);
INSERT INTO "public"."village" VALUES (164, '南坊村', '360121106000', 116.050391, 28.513534);
@ -150,13 +173,14 @@ INSERT INTO "public"."village" VALUES (90, '大港村', '360121201000', 115.8844
INSERT INTO "public"."village" VALUES (125, '源溪村', '360121102000', 115.963609, 28.336145);
INSERT INTO "public"."village" VALUES (123, '竹山村', '360121102000', 115.961125, 28.319372);
INSERT INTO "public"."village" VALUES (118, '岗坊村', '360121102000', 115.971352, 28.337746);
INSERT INTO "public"."village" VALUES (25, '后曲村', '360121000000', 115.95901, 28.579489);
INSERT INTO "public"."village" VALUES (85, '西江村', '360121201000', 115.976179, 28.798273);
INSERT INTO "public"."village" VALUES (21, '虎山村', '360121000000', 115.85741, 28.521369);
INSERT INTO "public"."village" VALUES (49, '滁北村', '360121105000', 116.09154, 28.769882);
INSERT INTO "public"."village" VALUES (55, '联圩村', '360121105000', 116.107338, 28.818752);
INSERT INTO "public"."village" VALUES (54, '立新村', '360121105000', 116.144869, 28.807526);
INSERT INTO "public"."village" VALUES (143, '西河村', '360121103000', 116.136048, 28.71975);
INSERT INTO "public"."village" VALUES (161, '新光村', '360121103000', 116.258028, 28.735727);
INSERT INTO "public"."village" VALUES (25, '后曲村', '360121100000', 115.95901, 28.579489);
INSERT INTO "public"."village" VALUES (75, '东方村', '360121200000', 116.285848, 28.711096);
INSERT INTO "public"."village" VALUES (9, '甫下村', '360121206000', 115.95245, 28.585884);
INSERT INTO "public"."village" VALUES (105, '团结村', '360121201000', 116.055043, 28.859536);
@ -178,11 +202,11 @@ INSERT INTO "public"."village" VALUES (88, '新洲村', '360121201000', 115.8140
INSERT INTO "public"."village" VALUES (33, '富山村', '360121204000', 115.856603, 28.509353);
INSERT INTO "public"."village" VALUES (29, '东亘村', '360121204000', 115.879845, 28.50452);
INSERT INTO "public"."village" VALUES (195, '厚田村委会', '360121104000', 115.800113, 28.459796);
INSERT INTO "public"."village" VALUES (21, '虎山村', '360121100000', 115.85741, 28.521369);
INSERT INTO "public"."village" VALUES (44, '合山村', '360121107000', 115.883344, 28.437271);
INSERT INTO "public"."village" VALUES (24, '莲溪村', '360121100000', 115.947686, 28.54992);
INSERT INTO "public"."village" VALUES (206, '罗舍村委会', '360121104000', 116.084295, 28.591173);
INSERT INTO "public"."village" VALUES (26, '甫下村', '360121100000', 115.95245, 28.585884);
INSERT INTO "public"."village" VALUES (24, '莲溪村', '360121000000', 115.947686, 28.54992);
INSERT INTO "public"."village" VALUES (26, '甫下村', '360121000000', 115.95245, 28.585884);
INSERT INTO "public"."village" VALUES (19, '唐村', '360121000000', 115.853631, 28.537015);
INSERT INTO "public"."village" VALUES (63, '北山村', '360121200000', 116.243644, 28.656736);
INSERT INTO "public"."village" VALUES (82, '北湖村', '360121200000', 116.226098, 28.656859);
INSERT INTO "public"."village" VALUES (65, '东风村', '360121200000', 116.274513, 28.681892);
@ -202,7 +226,6 @@ INSERT INTO "public"."village" VALUES (145, '和丰村', '360121103000', 116.181
INSERT INTO "public"."village" VALUES (59, '五丰村', '360121105000', 116.158872, 28.808749);
INSERT INTO "public"."village" VALUES (32, '三山村', '360121204000', 115.893122, 28.497787);
INSERT INTO "public"."village" VALUES (148, '民主村', '360121103000', 116.177652, 28.697873);
INSERT INTO "public"."village" VALUES (19, '唐村', '360121100000', 115.853631, 28.537015);
INSERT INTO "public"."village" VALUES (142, '新图村', '360121103000', 116.275179, 28.750562);
INSERT INTO "public"."village" VALUES (43, '万舍村', '360121107000', 115.90522, 28.473154);
INSERT INTO "public"."village" VALUES (172, '西游村', '360121106000', 116.043611, 28.493506);
@ -235,5 +258,72 @@ INSERT INTO "public"."village" VALUES (109, '梁西村', '360121101000', 116.020
INSERT INTO "public"."village" VALUES (68, '东岗村', '360121200000', 116.145755, 28.322438);
INSERT INTO "public"."village" VALUES (86, '周坊村', '360121201000', 116.137633, 28.26251);
INSERT INTO "public"."village" VALUES (199, '渡头村委会', '360121104000', 116.121168, 28.268048);
INSERT INTO "public"."village" VALUES (292, '涂村村', '360121104000', 116.129867, 28.580834);
INSERT INTO "public"."village" VALUES (262, '河头', '360121101000', 116.025032, 28.477444);
INSERT INTO "public"."village" VALUES (260, '黄堂', '360121101000', 116.005232, 28.4505);
INSERT INTO "public"."village" VALUES (247, '小蓝村', '360121100000', 115.930271, 28.567357);
INSERT INTO "public"."village" VALUES (306, '涂洲村', '360121104000', 116.078901, 28.595668);
INSERT INTO "public"."village" VALUES (307, '罗舍村', '360121104000', 116.084295, 28.591173);
INSERT INTO "public"."village" VALUES (280, '江陂村', '360121104000', 116.099043, 28.593743);
INSERT INTO "public"."village" VALUES (304, '亭山村', '360121104000', 116.068404, 28.562518);
INSERT INTO "public"."village" VALUES (305, '桃岭村', '360121104000', 116.098351, 28.571411);
INSERT INTO "public"."village" VALUES (287, '田坪村', '360121104000', 116.070029, 28.556592);
INSERT INTO "public"."village" VALUES (302, '新荣村', '360121104000', 116.09247, 28.557884);
INSERT INTO "public"."village" VALUES (261, '棠墅', '360121101000', 116.001175, 28.496784);
INSERT INTO "public"."village" VALUES (291, '胡陶村', '360121104000', 116.142484, 28.620004);
INSERT INTO "public"."village" VALUES (289, '杨树村', '360121104000', 116.156207, 28.600436);
INSERT INTO "public"."village" VALUES (242, '流芳村', '360121200000', 116.158095, 28.599718);
INSERT INTO "public"."village" VALUES (283, '流芳村', '360121104000', 116.156739, 28.600497);
INSERT INTO "public"."village" VALUES (296, '东田村', '360121104000', 116.153311, 28.592166);
INSERT INTO "public"."village" VALUES (293, '少城村', '360121104000', 116.185345, 28.595351);
INSERT INTO "public"."village" VALUES (269, '新村村', '360121101000', 115.929829, 28.400931);
INSERT INTO "public"."village" VALUES (300, '枫林村', '360121104000', 116.158061, 28.579663);
INSERT INTO "public"."village" VALUES (298, '幽兰村', '360121104000', 116.15259, 28.580465);
INSERT INTO "public"."village" VALUES (290, '牌坊村', '360121104000', 116.117641, 28.604719);
INSERT INTO "public"."village" VALUES (281, '新庄村', '360121104000', 116.184029, 28.577882);
INSERT INTO "public"."village" VALUES (285, '南湖村', '360121104000', 116.173834, 28.571146);
INSERT INTO "public"."village" VALUES (299, '马游村', '360121104000', 116.202666, 28.579327);
INSERT INTO "public"."village" VALUES (284, '南山村', '360121104000', 116.154644, 28.566458);
INSERT INTO "public"."village" VALUES (294, '青塘村', '360121104000', 116.139433, 28.569839);
INSERT INTO "public"."village" VALUES (295, '竹林村', '360121104000', 116.124181, 28.573113);
INSERT INTO "public"."village" VALUES (303, '东联村', '360121104000', 116.113818, 28.555688);
INSERT INTO "public"."village" VALUES (297, '厚田村', '360121104000', 115.800113, 28.459796);
INSERT INTO "public"."village" VALUES (253, '南店村', '360121101000', 115.950883, 28.470086);
INSERT INTO "public"."village" VALUES (272, '翠林村', '360121101000', 115.95253, 28.497041);
INSERT INTO "public"."village" VALUES (277, '春溪村', '360121471000', 115.979341, 28.486629);
INSERT INTO "public"."village" VALUES (254, '山背村', '360121101000', 115.972963, 28.453097);
INSERT INTO "public"."village" VALUES (273, '敷林村', '360121471000', 115.971463, 28.503556);
INSERT INTO "public"."village" VALUES (279, '蛟溪村', '360121471000', 115.969086, 28.514135);
INSERT INTO "public"."village" VALUES (267, '向塘村', '360121101000', 115.962987, 28.434532);
INSERT INTO "public"."village" VALUES (276, '万湖村', '360121471000', 115.944118, 28.519695);
INSERT INTO "public"."village" VALUES (252, '丁坊村', '360121101000', 115.928493, 28.437135);
INSERT INTO "public"."village" VALUES (274, '棠左村', '360121471000', 115.991403, 28.506457);
INSERT INTO "public"."village" VALUES (275, '浒南村', '360121471000', 115.961891, 28.523762);
INSERT INTO "public"."village" VALUES (271, '辜坊村', '360121101000', 115.910023, 28.443012);
INSERT INTO "public"."village" VALUES (224, '张坊村', '360121204000', 115.903734, 28.513144);
INSERT INTO "public"."village" VALUES (286, '潭林村', '360121104000', 116.060203, 28.536342);
INSERT INTO "public"."village" VALUES (288, '黄坊村', '360121104000', 116.084316, 28.541112);
INSERT INTO "public"."village" VALUES (282, '灌溪村', '360121104000', 116.06865, 28.545034);
INSERT INTO "public"."village" VALUES (231, '漳溪村', '360121108000', 115.866621, 28.324453);
INSERT INTO "public"."village" VALUES (226, '沙港村', '360121108000', 115.883986, 28.337158);
INSERT INTO "public"."village" VALUES (229, '荷山村', '360121108000', 115.898257, 28.337377);
INSERT INTO "public"."village" VALUES (227, '宋洲村', '360121108000', 115.894921, 28.314877);
INSERT INTO "public"."village" VALUES (233, '万洲村', '360121108000', 115.886263, 28.29415);
INSERT INTO "public"."village" VALUES (238, '板湖村', '360121108000', 115.938817, 28.331931);
INSERT INTO "public"."village" VALUES (234, '吴石村', '360121108000', 115.936669, 28.348525);
INSERT INTO "public"."village" VALUES (225, '南溪村', '360121108000', 115.925335, 28.334098);
INSERT INTO "public"."village" VALUES (230, '官塘村', '360121108000', 115.92636, 28.317559);
INSERT INTO "public"."village" VALUES (236, '江家村', '360121108000', 115.95328, 28.363577);
INSERT INTO "public"."village" VALUES (237, '潭岗村', '360121108000', 115.907506, 28.328445);
INSERT INTO "public"."village" VALUES (228, '广福村', '360121108000', 115.915451, 28.358356);
INSERT INTO "public"."village" VALUES (235, '木山村', '360121108000', 115.907038, 28.363441);
INSERT INTO "public"."village" VALUES (265, '浃溪村', '360121101000', 115.953169, 28.392931);
INSERT INTO "public"."village" VALUES (264, '西洛村', '360121101000', 115.967963, 28.396111);
INSERT INTO "public"."village" VALUES (278, '翠林村', '360121471000', 115.95253, 28.497041);
INSERT INTO "public"."village" VALUES (219, '冯家村', '360121203000', 116.014752, 28.345062);
INSERT INTO "public"."village" VALUES (270, '新村', '360121101000', 116.108607, 28.327266);
INSERT INTO "public"."village" VALUES (301, '渡头村', '360121104000', 116.121168, 28.268048);
INSERT INTO "public"."village" VALUES (268, '东风路社区', '360121101000', 115.972524, 28.427657);
INSERT INTO "public"."village" VALUES (266, '东风社区', '360121101000', 115.972524, 28.427657);
INSERT INTO "public"."village" VALUES (263, '黄山', '360121101000', 116.008802, 28.477287);
SELECT setval('village_id_seq', (SELECT MAX(id) FROM village));

4139
scripts/1.4.0/data/5_village_distance.sql

File diff suppressed because it is too large

3303
scripts/1.4.0/data/6.village_update.sql

File diff suppressed because it is too large
Loading…
Cancel
Save