当前位置:网站首页>MacBook installation postgresql+postgis
MacBook installation postgresql+postgis
2022-07-05 04:09:00 【Sun batian】
MacBook install postgreSQL+postgis
Recently started using macbook Pro, Make a special note of mac Under the postgreSQL setup script
install PostgreSQL
Use brew install
brew install postgres
start-up postgres
brew services restart postgresql
# or
/opt/homebrew/opt/postgresql/bin/postgres -D /opt/homebrew/var/postgres
Check the status
pg_ctl -D /opt/homebrew/var/postgres -l /opt/homebrew/var/postgres/server.log status
see
pg_ctl -D /opt/homebrew/var/postgres -l /opt/homebrew/var/postgres/server.log stop -s -m fast
Create user
createuser postgres -P
install PostGIS
brew install postgis
Create database
createdb test
createdb test -O username -E UTF8 -e
Connect to database
psql test
establish postgis plug-in unit
CREATE EXTENSION postgis;
SELECT PostGIS_Version();
Import tiff image
Data needs to be installed first postgis and postgis_raster plug-in unit
windows Next use
Get into postgresql Of bin Catalog
C:\Program Files\PostgreSQL\12\bin
Direct write postgresql
raster2pgsql -s 4326 -C D:\data\20211008data\hulan\new\2020_hulan_corn_yield.tif -F -t 256x256 public.2020_hulan_corn_yield | psql -h localhost -p 5432 -U postgres -d raster -W
Mr Into sql, Reuse psql Import database
raster2pgsql -s 4326 -I -M -C D:\data\20211008data\jingxian\2020_jx_wheat_yield.tif -F -t 256x256 public.2020_jx_wheat_yield > D:\2020_jx_wheat_yield.sql
psql -d raster -U postgres -f D:\2020_jx_wheat_yield.sql
边栏推荐
- Convert Boolean to integer value PHP - Convert Boolean to integer value PHP
- Official announcement! The third cloud native programming challenge is officially launched!
- Alibaba cloud ECS uses cloudfs4oss to mount OSS
- Ctfshow 2022 Spring Festival welcome (detailed commentary)
- 阿里云ECS使用cloudfs4oss挂载OSS
- UI自动化测试从此告别手动下载浏览器驱动
- Clickhouse materialized view
- 官宣!第三届云原生编程挑战赛正式启动!
- Soul 3: what is interface testing, how to play interface testing, and how to play interface automation testing?
- About the project error reporting solution of mpaas Pb access mode adapting to 64 bit CPU architecture
猜你喜欢
3. Package the bottom navigation tabbar
The scale of computing power in China ranks second in the world: computing is leaping forward in Intelligent Computing
EasyCVR平台出现WebRTC协议视频播放不了是什么原因?
[数组]566. 重塑矩阵-简单
Containerd series - what is containerd?
Rust blockchain development - signature encryption and private key public key
Test d'automatisation de l'interface utilisateur télécharger manuellement le pilote du navigateur à partir de maintenant
Seven join join queries of MySQL
Clickhouse materialized view
Soul 3: what is interface testing, how to play interface testing, and how to play interface automation testing?
随机推荐
【虚幻引擎UE】打包报错出现!FindPin错误的解决办法
【看完就懂系列】一文6000字教你从0到1实现接口自动化
Realize the attention function of the article in the applet
How to realize real-time audio and video chat function
Threejs rendering obj+mtl model source code, 3D factory model
输入的查询SQL语句,是如何执行的?
Laravel8 export excel file
[数组]566. 重塑矩阵-简单
Rust blockchain development - signature encryption and private key public key
Number of possible stack order types of stack order with length n
Plasticscm enterprise crack
面试汇总:这是一份全面&详细的Android面试指南
C language course setting: cinema ticket selling management system
Pyqt5 displays file names and pictures
ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
Soul 3: what is interface testing, how to play interface testing, and how to play interface automation testing?
About the recent experience of writing questions
Deep learning - LSTM Foundation
MindFusion. Virtual Keyboard for WPF
灵魂三问:什么是接口测试,接口测试怎么玩,接口自动化测试怎么玩?