user:thomas utente che ha creato il gist
user:thomas
title:mygist titolo del gist
title:mygist
filename:myfile.txt nome di file nel gist
filename:myfile.txt
extension:yml estensione del file nel gist
extension:yml
language:go linguaggio del file nel gist
language:go
topic:homelab gists with given topic
topic:homelab
Registrati
Entra
Unito 1750840855
GIS에서 가장 많이 쓰이는 전통적 방식이에요.
Shapefile (.shp, .shx, .dbf, …)
OSGeo4W와 ogr2ogr를 이용하여 Windows 환경에서 SHP 파일 여러 개를 하나의 PostGIS 테이블로 적재하는 방법 정리
shp2pgsql의 COPY 동작 방식에 대해 자세히 설명하겠습니다.
shp2pgsql
shp2pgsql -D -W "UTF-8" -s 4326 data.shp public.roads
-D 옵션의 효과:
-D
원격서버에 적재시 .pgpass파일이 필요
nano ~/.pgpass
.pgpass파일에 다음 형식으로 작성
hostname:port:database:username:password
이후 퍼미션 설정 필수
커맨드 라인에서 새 레포리지터리 생성
touch README.md git init git checkout -b main git add README.md git commit -m "first commit" git remote add origin https://gitea.rsonesoft.com/user/project.git git push -u origin main
linux에서 systemctl을 이용하여 postgres를 서비스하는 프로젝트가 있었다
성능개선을 위해 postgres의 설정값들을 변경하고 서버종료 후 시작되지 않는 문제가 발생했다.
systemctl start [email protected]
평상시에 아무렇지않게 사용하던 명령어가 갑자기 안통해서 많이 당황했다.
root계정으로 원래 안됐었나? postgres계정으로 실행시켰었나?
postgresql의 ST_Intersects()를 사용중 아래와 같이 오류가 발생했다.
오류 발생: SQLSTATE = XX000, SQLERRM = GEOSIntersects: TopologyException: side location conflict at 298600.73221767566 264940.33694780665. This can occur if the input geometry is invalid.
유효하지않은 geom이 존재한다고 한다. ST_IsValid()함수를 이용하여 어떤놈들인지 찾아본다.
select pnu from lsmd_cont_ldreg where not ST_IsValid(geom)
Creato da Opengist ⋅ Load: 253ms⋅