如何将多个Geopackages合并到一个文件中
我有一系列的地理包,代表了整个英格兰的每包土地。每个地理包都是一个局部区域,我想将它们结合起来,为整个英格兰创建一个文件。
每个地理包都在50至1500 MB之间,其中约有300个
我想组合创建一个MSSQL空间,
我认为Ogr2ogr是最好的选择,但是我有点麻烦,
我尝试了此代码。下面是一个.bat,我承认我不太熟悉,并且已从以前的同事复制了,他不再可用,
set "MSSQLSPATIAL_USE_GEOMETRY_COLUMNS=NO"
ogr2ogr -f "MSSQLSpatial" "MSSQL:server=x;database=y;trusted_connection=yes" "File1.gpkg" -update -append -nln "SQLTableName" -gt 1000 -t_srs "EPSG:27700" -s_srs "EPSG:27700"
for %%a in ("Folder\*.gpkg") Do (
ogr2ogr -f "MSSQLSpatial" "MSSQL:server=x;database=y;trusted_connection=yes" "%%a" -update -append -nln "SQLTableName" -gt 100000 -t_srs "EPSG:27700" -s_srs "EPSG:27700"
)
但这在SQL中创建了桌子,但并未将其填充到任何数据中,
GPKG都很好,就像我一样可以在GIS中打开它们,看看内容都在那里
I have got a series of geopackages which represent every single packet of land across England. Each geopackage is one local area and i want to combine them to create one single file for all of england.
Each geopackage is between 50 and 1500 MB and there are ~300 of them
I would like to combine the to create one single MSSQL Spatial
I think that ogr2ogr is a best bet for this, but I am having a little trouble
I have tried this code below as a .bat, which i confess i'm not that familiar with and has been copied from a previous colleague who is no longer available
set "MSSQLSPATIAL_USE_GEOMETRY_COLUMNS=NO"
ogr2ogr -f "MSSQLSpatial" "MSSQL:server=x;database=y;trusted_connection=yes" "File1.gpkg" -update -append -nln "SQLTableName" -gt 1000 -t_srs "EPSG:27700" -s_srs "EPSG:27700"
for %%a in ("Folder\*.gpkg") Do (
ogr2ogr -f "MSSQLSpatial" "MSSQL:server=x;database=y;trusted_connection=yes" "%%a" -update -append -nln "SQLTableName" -gt 100000 -t_srs "EPSG:27700" -s_srs "EPSG:27700"
)
But this creates the table in SQL but doesnt fill it with any data
The gpkg are all fine as I can open them in GIS and see the content is all there
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论