当前位置:网站首页>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
边栏推荐
- provide/inject
- Threejs rendering obj+mtl model source code, 3D factory model
- As soon as I write the code, President Wang talks with me about the pattern all day
- How to solve the problem that easycvr changes the recording storage path and does not generate recording files?
- Official announcement! The third cloud native programming challenge is officially launched!
- 【FineBI】使用FineBI制作自定义地图过程
- Seven join join queries of MySQL
- The development of mobile IM based on TCP still needs to keep the heartbeat alive
- Convert Boolean to integer value PHP - Convert Boolean to integer value PHP
- MindFusion. Virtual Keyboard for WPF
猜你喜欢
IronXL for . NET 2022.6
kubernetes集群之调度系统
【刷题】BFS题目精选
error Couldn‘t find a package. JSON file in "your path“
我国算力规模排名全球第二:计算正向智算跨越
【虚幻引擎UE】实现UE5像素流部署仅需六步操作少走弯路!(4.26和4.27原理类似)
[wp]bmzclub writeup of several questions
Learning notes 8
Test d'automatisation de l'interface utilisateur télécharger manuellement le pilote du navigateur à partir de maintenant
Interview byte, pass the exam and directly work on three sides. As a result, I found an architect to hang me?
随机推荐
JVM garbage collection
[wp]bmzclub writeup of several questions
Mixed compilation of C and CC
BDF application - topology sequence
面试字节,过关斩将直接干到 3 面,结果找了个架构师来吊打我?
Pyqt5 displays file names and pictures
Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
ClickPaaS低代码平台
The order of LDS links
Threejs realizes sky box, panoramic scene, ground grass
Three level linkage demo of uniapp uview u-picker components
线上故障突突突?如何紧急诊断、排查与恢复
Why do big companies such as Baidu and Alibaba prefer to spend 25K to recruit fresh students rather than raise wages by 5K to retain old employees?
Judge whether the stack order is reasonable according to the stack order
How to realize real-time audio and video chat function
Enterprise level: spire Office for . NET:Platinum|7.7. x
DFS and BFS concepts of trees and graphs
我就一写代码的,王总整天和我谈格局...
Interview related high-frequency algorithm test site 3
Kwai, Tiktok, video number, battle content payment