当前位置:网站首页>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
边栏推荐
- Threejs Internet of things, 3D visualization of farm (III) model display, track controller setting, model moving along the route, model adding frame, custom style display label, click the model to obt
- Plasticscm enterprise crack
- Summary of scene design
- On the day 25K joined Tencent, I cried
- 长度为n的入栈顺序的可能出栈顺序
- IronXL for . NET 2022.6
- 【虚幻引擎UE】打包报错出现!FindPin错误的解决办法
- Containerd series - detailed explanation of plugins
- Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
- Interview summary: This is a comprehensive & detailed Android interview guide
猜你喜欢

Is there a sudden failure on the line? How to make emergency diagnosis, troubleshooting and recovery

laravel8 导出Excle文件

How to solve the problem that easycvr changes the recording storage path and does not generate recording files?

Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘

How to realize real-time audio and video chat function

基于TCP的移动端IM即时通讯开发仍然需要心跳保活

Wechat applet development process (with mind map)

Is "golden nine and silver ten" the best time to find a job? Not necessarily

技术教程:如何利用EasyDSS将直播流推到七牛云?

Interview summary: This is a comprehensive & detailed Android interview guide
随机推荐
官宣!第三届云原生编程挑战赛正式启动!
MindFusion. Virtual Keyboard for WPF
A應用喚醒B應該快速方法
长度为n的入栈顺序的可能出栈顺序
Ctfshow 2022 Spring Festival welcome (detailed commentary)
Three level linkage demo of uniapp uview u-picker components
Looking back on 2021, looking forward to 2022 | a year between CSDN and me
lds链接的 顺序问题
[phantom engine UE] only six steps are needed to realize the deployment of ue5 pixel stream and avoid detours! (the principles of 4.26 and 4.27 are similar)
About the recent experience of writing questions
kubernetes集群之调度系统
How to solve the problem that easycvr changes the recording storage path and does not generate recording files?
How to realize real-time audio and video chat function
Bit operation skills
As soon as I write the code, President Wang talks with me about the pattern all day
Why can't all browsers on my computer open web pages
【虚幻引擎UE】实现UE5像素流部署仅需六步操作少走弯路!(4.26和4.27原理类似)
How is the entered query SQL statement executed?
Rust区块琏开发——签名加密与私钥公钥
C语言课设:影院售票管理系统