当前位置:网站首页>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
边栏推荐
- Behavior perception system
- Pyqt5 displays file names and pictures
- NetSetMan pro (IP fast switching tool) official Chinese version v5.1.0 | computer IP switching software download
- Looking back on 2021, looking forward to 2022 | a year between CSDN and me
- [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)
- EasyCVR平台出现WebRTC协议视频播放不了是什么原因?
- 灵魂三问:什么是接口测试,接口测试怎么玩,接口自动化测试怎么玩?
- Rome链分析
- Test d'automatisation de l'interface utilisateur télécharger manuellement le pilote du navigateur à partir de maintenant
- Open graph protocol
猜你喜欢

Scheduling system of kubernetes cluster

【虚幻引擎UE】打包报错出现!FindPin错误的解决办法

Threejs realizes the drawing of the earth, geographical location annotation, longitude and latitude conversion of world coordinates threejs coordinates

Learning notes 8

阿里云ECS使用cloudfs4oss挂载OSS

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

Rome chain analysis

小程序中实现文章的关注功能

Seven join join queries of MySQL

Looking back on 2021, looking forward to 2022 | a year between CSDN and me
随机推荐
JVM garbage collection
[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)
北京程序员的真实一天!!!!!
Looking back on 2021, looking forward to 2022 | a year between CSDN and me
ActiveReportsJS 3.1 VS ActiveReportsJS 3.0
@The problem of cross database query invalidation caused by transactional annotation
Resolved (sqlalchemy+pandas.read_sql) attributeerror: 'engine' object has no attribute 'execution_ options‘
Test d'automatisation de l'interface utilisateur télécharger manuellement le pilote du navigateur à partir de maintenant
As soon as I write the code, President Wang talks with me about the pattern all day
Common features of ES6
Interview related high-frequency algorithm test site 3
输入的查询SQL语句,是如何执行的?
【虛幻引擎UE】實現UE5像素流部署僅需六步操作少走彎路!(4.26和4.27原理類似)
UI自動化測試從此告別手動下載瀏覽器驅動
UI automation test farewell to manual download of browser driver
[brush questions] BFS topic selection
【虚幻引擎UE】实现UE5像素流部署仅需六步操作少走弯路!(4.26和4.27原理类似)
Sequelize. JS and hasmany - belongsto vs hasmany in serialize js
What is test development? Why do so many companies hire test developers now?
error Couldn‘t find a package. JSON file in "your path“