κ°λ°μ νλ©΄μ λ μ΄μ΄μ ν¬κΈ°κ° λ€λ₯Έ κ²½μ° μ§λμ μ€λ 벨μ μ§μ λ§μΆ° μ£Όμ΄μΌ νλ λ²κ±°λ‘μμ κ²ͺμλ κ²½νμ΄ μμλ€. νμ§λ§ μ΄μ fit ν¨μλ₯Ό ν΅ν΄ μ΄λ° λ¬Έμ λ₯Ό μ‘°κΈμ λ μ μκ² λμλ€. νμμ λ΄κ³ μλ λ μ΄μ΄μ λ°μ΄λ리μ μ§λ μ¬μ΄μ¦λ₯Ό ν΅ν΄ μ§λ μ€λ 벨μ λ§μΆ μ μλ€. map.getView().fit(vectorSource.getExtent(), map.getSize()); κ²°κ³Ό
μ€νλ μ΄μ΄μ€λ‘ κ°λ°μ λ°°κ²½μ§λμ λ§μ§ μλ μ’νκ³μ λ°μ΄ν°λ₯Ό νμΆν΄μΌν κ²½μ° κ° featureμ coordinatesλ₯Ό λ³νν΄μ€μΌνλ€. κ·Έ λ°©λ²μ λν μμ€λ μλμ κ°λ€. λ°°κ²½μ§λ - EPSG:3857 λ°μ΄ν° - EPSG:5179 // EPSG:5179 μ’νκ³ λ±λ‘ proj4.defs("EPSG:5179", "+proj=tmerc +lat_0=38 +lon_0=127.5 +k=0.9996 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs"); ol.proj.proj4.register(proj4); var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), loader: func..
geojson νμΌμ μ½μ΄λ€μ¬ 벑ν°λ μ΄μ΄λ‘ μμ±νκ³ νμΆνλ μ½λ μ λλ€. ν μ€νΈμ© μμΈμ νμ ꡬμ geojson λ°μ΄ν°λ ν¨κ» μ¬λ €λμμ΅λλ€. var vectorSource = new ol.source.Vector({ url:"./geojson/seoulHD.geojson", //geojson νμΌ format: new ol.format.GeoJSON() }); var vectorLayer = new ol.layer.Vector({ source: vectorSource, style: new ol.style.Style({ // fill: new ol.style.Fill({ // color: "rgba(255,255,0,0.3)", // }), stroke: new ol.style.Stroke({ colo..
λ€μμ κ²½μ°λ 5179μ’νκ³λ₯Ό μ¬μ©νλ geojsonμ μ½μ΄λ€μ¬ μ’νκ³ λ³νμ νλ κ²½μ°μ΄λ€. var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), loader: function (extent) { const url = "./geojson/seoulHD.geojson";//5179 fetch(url) .then((response) => response.json()) .then((data) => { const features = vectorSource.getFormat().readFeatures(data); console.log("λ³νμ - ",features[0].getGeometry().getCoordinates()[0][..
βοΈ Stringκ³Ό StringBuffer, StringBuilder 무μμ΄ λ€λ₯Έκ±ΈκΉ κ²°λ‘ λΆν° μ΄μΌκΈ°νλ©΄ νλ² μμ±λ λ¬Έμμ΄μ λν΄μ String ν΄λμ€λ λ³κ²½λΆκ°λ₯νκ³ , StringBuffer νΉμ StringBuilder ν΄λμ€λ λ³κ²½κ°λ₯νλ€λ κ²μ΄λ€. String ν΄λμ€ κ°μ²΄(new ν€μλ)λ‘ μ μΈν λ¬Έμμ΄μ νλμ μΈμ€ν΄μ€κ° λλ€. νλ² μμ±λ String μΈμ€ν΄μ€λ λ³κ²½μ΄ λΆκ°λ₯ν λΆκ°λ³ λ¬Έμμ΄μ΄λ€. 리ν°λ΄λ°©μ(λ°μ΄ν)μ κ°μ λ¬Έμμ΄μΌ κ²½μ° νλμ μΈμ€ν΄μ€λ₯Ό μ°Έμ‘°νλ€. μ¬λ¬ λ³μλ€μ 리ν°λ΄ λ¬Έμμ΄μ΄ λμΌνλ€λ©΄ νλμ μΈμ€ν΄μ€λ§ μ°Έμ‘°νκ² λλ€. μλ μ½λλ₯Ό κΈ°λ°μΌλ‘ λ©λͺ¨λ¦¬κ΅¬μ‘°λ₯Ό 보며 μ’ λ μμΈν μ΄μΌκΈ° ν΄λ³΄μ. String str1 = "a"; String str2 = "a"; String st..
μΆμν΄λμ€ β λ―Έμμ±λ μ€κ³λλ‘ λΉμ ν μ μμ(=νλ μ) μΆμλ©μλ(λ―Έμμ± λ©μλ)λ₯Ό ν¬ν¨νκ³ μλ ν΄λμ€ μΆμλ©μλλ μμμ ν΅ν΄μλ§ μμ±λμ΄μ§ μ μμ 곡ν΅λ λΆλΆμ λν΄μ μμ ν΄λμ€μκ² μμμ΄ μ΄λ£¨μ΄μ§ μΆμν΄λμ€λ abstract ν€μλλ₯Ό λΆμ¬ μμ±ν¨ abstract class Robot{ ... } μΆμλ©μλ( abstract method ) β λ©μλλ₯Ό μ μΈνμ§λ§ λ©μλμ λ΄μ©μ΄ μ‘΄μ¬νμ§ μμ λ©μλλ§ κ΅¬μ±νκ³ μμΈκ΅¬νμ μμμ ν΅ν΄ μ΄λ£¨μ΄ μ§λλ‘ κ°μ ν¨. λ©μλμ λ΄μ©μ λΉμλλ μ΄μ λ μμν΄λμ€ λ§λ€μ ꡬνλ΄μ©μ΄ λ¬λΌμ§ μ μκΈ° λλ¬Έ ꡬνλ΄μ©μ΄ μ‘΄μ¬νμ§ μκΈ° λλ¬Έμ { } λΈλ‘ μμ΄ λ©μλλ₯Ό μ μν¨ abstract String attack(); μ κΉλ§μ β μΆμλ©μλλ μ΄μ°¨νΌ λ©μλμΈλ° ..
1. postgis ν μ΄λΈ 2. shp λ΄λ €λ°κΈ° μμ€ Map params = new HashMap(); params.put(PostgisNGJNDIDataStoreFactory.DBTYPE.key, "postgis"); params.put(PostgisNGJNDIDataStoreFactory.HOST.key, "μ μ DB IP"); params.put(PostgisNGJNDIDataStoreFactory.PORT.key, Integer.valueOf(μ μDB ν¬νΈ)); params.put(PostgisNGJNDIDataStoreFactory.SCHEMA.key, "μ μ μ€ν€λ§λͺ "); params.put(PostgisNGJNDIDataStoreFactory.DATABASE.key, "μ μ λ°μ΄ν°λ² μ΄μ€λͺ ")..
geotools λ‘ shp > postsql μν¬νΈμ μ’ν μμλ₯Ό λ³κ²½νμ¬ λ°μ΄ν°λ₯Ό λ£μ μ μλ€. SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder(); // μ’ν x.y μμ λ³ν Hints hints = new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE); CRSAuthorityFactory factory = ReferencingFactoryFinder.getCRSAuthorityFactory("EPSG", hints); CoordinateReferenceSystem AXIS_CRS = factory.createCoordinateReferenceSystem("EPSG:43..