1. 下载并安装所需的第三方组件 1.1 Flex 和 Bison Flex 和 Bison 是安装 Grass 和 QGIS 必须的程序。 * 注意:这两个工具在安装时,安装目录不要有空格,否则在编译 QGIS 时找不到这两个文件。 1.2 PostSQL (略) 1.3 QT 的安装 可以直接选择默认安装。 1.
1. 下载并安装所需的第三方组件
1.1 Flex 和 Bison
Flex 和 Bison是安装Grass和QGIS必须的程序。
*注意:这两个工具在安装时,安装目录不要有空格,否则在编译QGIS时找不到这两个文件。
1.2 PostSQL(略)
1.3 QT的安装
可以直接选择默认安装。
1.4 Proj.4
(1)从Proj.4官方网站上下载最新的版本,解压缩到某个文件夹。
(2)使用Visual Studio 2008 command,定位到Proj.4的加压缩文件下,输入下面的命令进行编译:nmake –f makefile.vc MSVC_VER=1500 (对于MSVC_VER值的设定,可以参考nmake.opt文件里的注释)
(3)输入以下命令,将生成Proj.4的bin, include和lib目录,并将相应的文件放到各个目录下:
set PROJ_DIR=c:/lib/proj
mkdir %PROJ_DIR%/bin
mkdir %PROJ_DIR%/include
mkdir %PROJ_DIR%/lib
copy src/*.dll %PROJ_DIR%/bin
copy src/*.exe %PROJ_DIR%/bin
copy src/*.h %PROJ_DIR%/include
copysrc/*.lib %PROJ_DIR%/lib
1.5 GSL
获得GSL源码,直接编译gsl.sln文件(如果是较早版本,直接用VS2008打开即可)
1.6 GEOS
(1)获得最新版本的GEOS,(本文使用的是geos-3.1.0),使用Visual Studio 2008 command,定位到Proj.4的加压缩文件下,输入下面的命令进行编译:
nmake –f makefile.vc MSVC_VER=1500
*注意:对于MSVC_VER值的设定,可以参考nmake.opt文件里的注释
(2) GEOS 的bin, include和lib目录,及其相应文件的生成参考Proj.4的生成方法
1.7 GDAL的编译
参考CSDN上blog的说明。
1.8 PostGIS(略未支持)
1.9 Expat
下载expat-win32bin-2.0.1.exe(或更高版本),安装。*注意,安装目录名也不应该包含空格。
1.10 CMake
下载最新版本的CMake-win32.exe,安装。
2. 用CMake-gui编译QGIS程序。
设置Source Code为QGIS源文件的路径,已经要生成编译文件的路径;然后,设置以上所需的工具的LIB和INCLUDE路径,点击Configuration后,点击Generate,生成qgis1.0.2.sln文件,编译该文件,即可获得.lib和.dll文件。参考QGIS1.0.2安装版的安装后目录信息,制作我们自己的bin, include, lib和plugins目录(方法是,拷贝QGIS1.0.2安装版include文件夹生成include目录;拷贝我们生成的qgis_core.dll、qgis_gui.dll构建Bin目录—可以将sqlite3.dll, gdal16.dll一并拷到Bin目录下;到编译生成的src目录下,选择”文件搜索”工具,输入”*.dll”,选出生成providers和Plugins,拷贝到plugins目录下)。
注意事项:
(1)根据情况选择是否允许以下工具一起编译:
WITH_BINDINGS-------- Python
WITH_GRASS-------------Grass
WITH_INTERNAL_SQLITE3-----是否使用QGIS源文件提供的Sqlite3,在此要取消该项的选择,设置自己下载的最新版本的Sqlite3源文件,编译生成.dll和.lib 文件。否则编译生成的QGIS的lib库对Sqlite3的使用会报错(可能是QGIS源文件的Sqlite3有问题)。
WITH_POSTGRESQL---Postgresql
(2)GDAL的LIBRARY要使用gdal_i.lib文件,这是一个动态链接库文件(本人也不太懂),
Proj的LIBRARY也应该如此。我在编译时使用的是proj.lib文件,目前还没遇到什么错误,等下次重新编译时我尝试以下。
3. QGIS的使用例子
在使用QGIS时,要注意加上
#define CORE_EXPROT
#define GUI_EXPROT

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

MySQloffersechar, Varchar, text, Anddenumforstringdata.usecharforfixed-Lengthstrings, VarcharerForvariable-Length, text forlarger text, AndenumforenforcingdataAntegritywithaetofvalues.

Optimizing MySQLBLOB requests can be done through the following strategies: 1. Reduce the frequency of BLOB query, use independent requests or delay loading; 2. Select the appropriate BLOB type (such as TINYBLOB); 3. Separate the BLOB data into separate tables; 4. Compress the BLOB data at the application layer; 5. Index the BLOB metadata. These methods can effectively improve performance by combining monitoring, caching and data sharding in actual applications.

Mastering the method of adding MySQL users is crucial for database administrators and developers because it ensures the security and access control of the database. 1) Create a new user using the CREATEUSER command, 2) Assign permissions through the GRANT command, 3) Use FLUSHPRIVILEGES to ensure permissions take effect, 4) Regularly audit and clean user accounts to maintain performance and security.

ChooseCHARforfixed-lengthdata,VARCHARforvariable-lengthdata,andTEXTforlargetextfields.1)CHARisefficientforconsistent-lengthdatalikecodes.2)VARCHARsuitsvariable-lengthdatalikenames,balancingflexibilityandperformance.3)TEXTisidealforlargetextslikeartic

Best practices for handling string data types and indexes in MySQL include: 1) Selecting the appropriate string type, such as CHAR for fixed length, VARCHAR for variable length, and TEXT for large text; 2) Be cautious in indexing, avoid over-indexing, and create indexes for common queries; 3) Use prefix indexes and full-text indexes to optimize long string searches; 4) Regularly monitor and optimize indexes to keep indexes small and efficient. Through these methods, we can balance read and write performance and improve database efficiency.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version
Recommended: Win version, supports code prompts!
