随笔分类 - GDAL/OGR
摘要:1. OSQPOSQP(Operator Splitting Quadratic Programming)是一个用于求解凸二次规划(Convex Quadratic Programming)问题的求解器。它基于“算子分裂”的优化方法,将二次规划问题分解为一系列小的子问题,并通过迭代的方式逐步求解
阅读全文
摘要:1.设置环境变量VCPKG_ROOT D:\vcpkg Path 中加入 %VCPKG_ROOT%2. 在CMakeLists.txt文件中加入vcpkg工具支持cmake_minimum_required(VERSION 3.7) # 设置 vcpkg 的工具链文件 set(CMAKE_TOOLC
阅读全文
摘要:/************************************************************************/ /* OGRFromOGCGeomType() */ /***********************************************
阅读全文
摘要:GIS开源组件编译系列 (01)CentOS7环境中编译GDAL3.5 其编译的组件有sqlite、libiconv、protobuf、libdeflate、LZMA2、zstd、pcre2、tiff、openssl、curl、Proj、Geos、swig、Hadoop、hdf5、netcdf、po
阅读全文
摘要:参考:https://blog.csdn.net/wangqinghao/article/details/7245851https://www.codenong.com/7241871/1. std::stringstream转换为std::vector<char>// std::stringstr
阅读全文
摘要:"Tiny Well-known Binary" or "TWKB"VersionRelease0.23May 1, 2015AbstractTWKB is a multi-purpose format for serializing vector geometry data into a byte buffer, with an emphasis on minimizing size of th...
阅读全文
摘要:转自: https://www.giserdqy.com/database/postgresql/25838/对于大范围矢量数据,由于类型众多范围广泛往往数据量极大,加载渲染会造成平台卡顿。因此对矢量数据进行四叉树索引切片可以高效加载当前区域矢量,提高效率。常见的矢量数据为shapefile,可以通过GDAL读取shp范围进行四叉树划分,构建某一层级瓦块。以下为C#调用GDAL进行矢量四叉树切片算...
阅读全文
摘要:1.PostgreSQL的安装1.1 下载并安装PostgreSQL官方yum源配置文件dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm1.2 禁用系统内置yum源的PostgreSQL安装模块PostgreSQL官方的y...
阅读全文
摘要:转自: https://www.giserdqy.com/database/postgresql/25838/参考:https://my.oschina.net/u/1464512/blog/1631972https://github.com/mapbox/tippecanoehttps://github.com/mapbox/tile-coverhttps://github.com/mapbox...
阅读全文
摘要:在路网操作中,会遇到将首尾相连的多条道路合并成一条道路的情况,使用JTS中的LineMerger类,可以很好的完成这个操作,代码:WKTReader reader = new WKTReader();Geometry geom_1 = reader.read("LINESTRING (116.96832000000000562 36.64882000000000062, 116.968490000...
阅读全文
摘要:有时候我们需要将多个相邻的多边形合并成一个多边形,常规用法是使用union方法,将其合并,当待合并的多边形个数较多时,效率就会非常的低,这里我们可以使用计算缓冲区的方法进行处理,效率会提升很多。待合并多边形合并结果图代码://蓝色多边形char* szWKT_1 = "POLYGON ((113.885 22.6815, 113.9425 22.6585, 113.91 22.7, 113.885...
阅读全文
摘要:libspatialindex是一种高效的C++空间索引库。支持复杂查询,如范围查询、点位置查询、 最近邻查询、K邻近查询以及参数化查询。创建内存空间索引示例代码:IStorageManager* diskfile = StorageManager::createNewMemoryStorageManager();StorageManager::IBuffer* file = StorageMan...
阅读全文
摘要:Exenetcoreapp2.1.\bin\Debug\ -->D:\Project\CSharp\Test\GDAL\Encoder\bin\gdalconst_wrap.dllD:\Project\CSharp\Test\GDAL\Encoder\bin\gdalconst_csharp.dllD:\Project\CSharp\Test\GDAL\Encoder\bin\osr_wrap.d...
阅读全文
摘要:--------------------------------------------------------------------------------------#include #include GDALAllRegister();OGRDataSource* poDS;const char* pszDriverName = "ESRI Shapefile";//GDALDriverM...
阅读全文
摘要:// -----------------------------------------------------------auto combineCallbackLambda = [](GLdouble coords[3], void* vertex_data[4], GLfloat weight[4], void** dataOut) mutable -> void CALLBACK{ GL...
阅读全文
摘要:1. MSYS2 shell# pacman –Syuu2. Reopen MSYS2# pacman –Syuu3.添加国内源msys64\etc\pacman.d 目录下有三个文件1. mirrorlist.msysServer = http://mirrors.ustc.edu.cn/msys2/msys/$arch/2. mirrorlist.mingw64Server = http://...
阅读全文
摘要:8. mongo-cxx-driverpacman -S mingw-w64-x86_64-cyrus-saslpacman -S mingw-w64-x86_64-extra-cmake-modulesexport OS_BUILD=64cd mongo-c-driver-1.14.0/mkdir cmake-buildcd cmake-buildcmake -G "MSYS Makefiles...
阅读全文
摘要:shp2pgsql -s 4326 /var/www/apps/map/data/ShaanXi/station.shp postgis.station | psql -d geodb -U username
阅读全文
摘要:update station set shape = ST_GeomFromText(CONCAT( 'POINT(', x, ' ', y, ')' )); CONCAT( 'POINT(', x, ' ', y, ')' ) select * from station
阅读全文