본문 바로가기

develop/web GIS

geoserver SLD를 이용한 차트 올리기 image/png20 *기존 geoserver 예제는 chart plugin을 이용한 차트이지만 이건 구글 이미지 차트를 이용한 것으로 차이는 없다 그대신 기존 sample의 application/chart에서 format을 image/png로 지정해주어야 한다. 더보기
OpenLayers function //WMS 레이어 업데이트 //geoserver에서 sql view 로 생성한 레이어는 parameter로 조건을 줄 수 있다.//parameter : viewparamsOpenLayers.Layer.WMS.prototype.updateLayers = function(layers,data) {console.log("updateLayers : " +layers,data);this.mergeNewParams({'LAYERS' : layers});this.mergeNewParams({viewparams : data});if(layers.length > 0) {this.setVisibility(true);} else {this.setVisibility(false);}}; //레이어 생성 시 속성값 부여 하는 스.. 더보기
POST GIS VIEW 1. POSTGIS extensions - CREATE EXTENSION postgis;2. shp 파일 import 3. postGIS 좌표계 추가- 서부원점(GRS80)-EPSG:5185 INSERT INTO spatial_ref_sys(srid, auth_name, auth_srid, srtext, proj4text) VALUES (5185, 'EPSG', 5185, 'PROJCS["ITRF_2000_TM_Korea_West_Belt", GEOGCS["GCS_ITRF_2000", DATUM["D_ITRF_2000", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.017453292519943.. 더보기
dojo를 이용한 vworld map 띄우기 Just an example 더보기
지도위에 구글차트 띄우기 더보기
EPSG:4326 to EPSG:900913 transform //*Google Mercator, 구글지도/빙지도/야후지도/OSM 등 에서 사용중인 좌표계//EPSG:900913(통칭), EPSG:3857(공식)Proj4js.defs["EPSG:900913"] = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs';Proj4js.defs['EPSG:4326'] = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'; var EPSG_900913 = new OpenLayers.Projection("EPSG:900913");var EPSG_4326 = new OpenLayers... 더보기
OpenLayers addfeatures(json) 에서 json형식 java에서 만들기 public class IndexControl {IndexCode indexCode ;SbbDBMapper sbbMapper;public List getIndexCode(HttpServletResponse response) throws Exception {DBUtils dbUtils = new DBUtils();List getIndex = dbUtils.selectList(DB.SBB_DB, "getIndexCode"); JSONObject jsonObj= new JSONObject();JSONObject jsonObj1= new JSONObject();JSONObject jsonObj2= new JSONObject();JSONObject jsonObj3= new JSONObject();JSONArray.. 더보기
레이어 클릭시 이벤트 발생 map = new OpenLayers.Map('map',{ projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", tileSize : new OpenLayers.Size(256,256), numZoomLevels:19, allOverlays : true, eventListeners: { featureclick: function(e) { layerData(e); } }, maxResolution: 156543.0339, tileOrigin : new OpenLayers.LonLat(-20037508.34, -20037508.34), rest.. 더보기