라벨이 Spatial DBMS인 게시물 표시

[PostGIS] Custom Function for Reprojecting Geometry Table

이미지
PostGIS를 사용하면서 약 300여개의 레이어(Geometry Table)의 좌표계를 한꺼번에 변환할 일이 생겨서 하나씩 작업하려다 좌표를 변환하는 함수( UpdateGeometrySRID 함수처럼 단순히 좌표를 정의하는 함수가 아니고 물리적으로 좌표변환를 수행)를 하나 만들어 봤습니다. PostGIS 2.0 이상부터는 다음과 같은 DDL 함수를 이용하여 좌표를 변환할 수 있으나 아래 붉은색으로 표시된 부분을 각각의 레이어마다 지정해야 주어야 하는 번거로움이 있습니다.    ALTER TABLE roads       ALTER COLUMN geom TYPE geometry( MultiLineString , 3857 )          USING ST_Transform( geom , 3857 ); 아래 과정을 따라 하면 데이터베이스 내의 모든 레이어에 대한 좌표변환을 수행할 수 있습니다. ▣ Download  - PostGIS_TransformGeometryTable.sql  - PostGIS_TransformGeometryTable_All.sql ▣ Install Functions  - pgAdmin을 실행한 후 적용할 Database에 연결  - Query Tool(Ctrl-E) 실행 후 다운로드한 SQL(2개 파일)을 각각 실행하여 함수 등록  - 등록된 함수 화면 ▣ Usages  ⊙  TransformGeometryTable  - 하나의 레이어에 대해서 좌표변환 수행  - 아래 예에서 public은 스키마, roads는 테이블, 3857(구글 좌표계)은 변환할 EPSG 코드이며, 스키마를 생략하면 현재 활성화된 스키마를 사용함  - SELECT TransformGeometryTable( 'public'...

FOSS4G Korea 2013 망고시스템 발표자료

FOSS4G Korea 2013 망고시스템(김기웅, 임영현) 발표자료! Java기반의 오픈소스 GIS(GeoServer, uDig)를 지원하는 국내 공간DBMS 드라이버 개발 정보통신산업진흥원(NIPA)의 2013년 공개SW 개발지원 사업의 일환으로 개발된 국내 공간 DBMS를 지원하는 오픈소스 GIS(GeoServer, uDig)드라이버 개발  GeoTools, GeoServer에서 Altibase, Tibero, Kairos 공간 DBMS를 지원하고 NGI 파일을 다양한 포맷으로 변환도 가능하게 되었죠!

[PostGIS] Shapefile and DBF Loader 2

이미지
pgAdmin은 오픈 소스 데이터베이스인 PostgreSQL을 위한 가장 인기있고 기능이 풍부한 오픈소스 관리 및 개발 플랫폼 Linux, FreeBSD, Solaris, Mac OSX, Windows 플랫폼에서 모두 사용 pgAdmin III Plug-In Architecture version 1.9+ ~ 1.12.x 까지는 pgAdmin III 인스톨 폴더의 plugins.ini 파일로 관리 version 1.13 이후부터는 pgAdmin III 인스톨 폴더 내에 plugins.d 폴더 아래 plugin*.ini 다중 파일들로 관리 만약 PostGIS Shapefile and DBF Loader PostGIS GUI 플러그인을 등록하는 경우 1.12 이하 버전에서는 plugins.ini 파일에, 1.13 버전 부터는 plugins.d 폴더 내에 postgis.shp2pgsql-gui.ini 파일을 생성 또는 편집해서 등록할 수 있음 두 버전 모두 다음의 내용을 등록하면 됨 ; ;PostGIS shp2pgsql-gui (Windows): ; Title=PostGIS Shapefile and DBF Loader Command="$$PGBINDIR\postgisgui\shp2pgsql-gui.exe" -h "$$HOSTNAME" -p $$PORT -U "$$USERNAME" -d "$$DATABASE" -W "$$PASSWORD" Description=Open a PostGIS ESRI Shapefile or Plain dbf loader console to the current database. KeyFile=$$PGBINDIR\postgisgui\shp2pgsql-gui.exe Platform=windows ServerType=postgresql Database=Yes SetPassword=Yes 더 자세한 내용은 다음...

Altibase Spatial SQL Quick Reference

ALTIBASE Technical Center( http://atc.altibase.com )의 자료실에 등록된 [Spatial SQL User’s Manual Release 5.5.1] 문서에서 발췌했습니다. ============================================ ◎ Geometry Reference Table ============================================ 1. How to Install You can add $ALTIBASE_HOME/thirdparty/ArcGIS/geometry_colums.sql to ALTIBASE package by running iSQL. $ isql -u sys -p manager -f $ALTIBASE_HOME/thirdparty/ArcGIS/geometry_columns.sql 2. How to Use SPATIAL_REF_SYS and GEOMETRY_COLUMNS are PUBLIC SYNONYM tables. You can only look up them. ADDGEOMETRYCOLUMNS and DROPGEOMETRYCOLUMNS are PUBLIC SYNONYM procedures. You can insert and delete information in GEOMETRY_COLUMNS table by executing them. You can add extra information to geometry reference table besides information of geometry reference system by modifying $ALTIBASE_HOME/thirdparty/ArcGIS/geometry_colums.sql. 3. GEOMETRY_COLUMNS You can use this to define and mange SRID (Spatial Reference ID) in GEOMETRY column. Column name ...