当前位置:网站首页>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
边栏推荐
- Get to know MySQL connection query for the first time
- Rome chain analysis
- FFmepg使用指南
- C语言课设:影院售票管理系统
- [moteur illusoire UE] il ne faut que six étapes pour réaliser le déploiement du flux de pixels ue5 et éviter les détours! (4.26 et 4.27 principes similaires)
- Seven join join queries of MySQL
- [Chongqing Guangdong education] 2408t Chinese contemporary literature reference test in autumn 2018 of the National Open University
- 北京程序员的真实一天!!!!!
- Fuel consumption calculator
- 在线文本行固定长度填充工具
猜你喜欢

Looking back on 2021, looking forward to 2022 | a year between CSDN and me

What is the reason why the webrtc protocol video cannot be played on the easycvr platform?

行为感知系统

3. Package the bottom navigation tabbar

UI自動化測試從此告別手動下載瀏覽器驅動

在线文本行固定长度填充工具

Why can't all browsers on my computer open web pages

laravel8 导出Excle文件

“金九银十”是找工作的最佳时期吗?那倒未必

25K 入职腾讯的那天,我特么哭了
随机推荐
Pyqt5 displays file names and pictures
[数组]566. 重塑矩阵-简单
Ctfshow 2022 Spring Festival welcome (detailed commentary)
UI自動化測試從此告別手動下載瀏覽器驅動
Threejs rendering obj+mtl model source code, 3D factory model
Laravel8 export excel file
How to solve the problem that easycvr changes the recording storage path and does not generate recording files?
【看完就懂系列】一文6000字教你从0到1实现接口自动化
[Chongqing Guangdong education] 2408t Chinese contemporary literature reference test in autumn 2018 of the National Open University
Clickhouse synchronization MySQL (based on materialization engine)
How to use jedis of redis
DFS and BFS concepts of trees and graphs
What is test development? Why do so many companies hire test developers now?
Pyqt pyside custom telescopic menu bar sharing (including tutorial)
WGS84 coordinate system, web Mercator, gcj02 coordinate system, bd09 coordinate system - brief introduction to common coordinate systems
Rust blockchain development - signature encryption and private key public key
Threejs Internet of things, 3D visualization of farms (II)
行为感知系统
An elegant program for Euclid‘s algorithm
Un réveil de l'application B devrait être rapide