geotools 라이브러리로 작업하고 있습니다. 내 목표는 좌표를 입력하고 그것을 반환하는 기능의 정보를 포함하는 것입니다.Geotools 가져 오기 기능 정보
Geotools 빠른 시작 자습서지도는 내가 빨간색으로 동그란 버튼으로 원하는 것을 정확히 수행합니다. 그러나 사용 된 방법을 찾을 수 없습니다.
나는 봤는데, 문서를 읽고 아무 소용이 코드를 디버깅. 이 메서드는 이동하는 방법 인 것 같습니다. FeatureCollection myCollection = mySimpleFeatureSource.getFeatures (쿼리 쿼리);
또는
FeatureCollection myCollection = mySimpleFeatureSource.getFeatures (필터 filter);
그러나 나는 그것을 알아 내지 못했거나 아직 좌표로 쿼리하는 방법을 찾지 못했습니다. 누구든지 손을 빌려 주면, 나는 그것을 매우 고맙게 생각합니다!
미리 감사드립니다.
내가 실행 해요 예는 다음과 같습니다
package org.geotools.tutorial.quickstart;
import java.io.File;
import org.geotools.data.FileDataStore;
import org.geotools.data.FileDataStoreFinder;
import org.geotools.data.simple.SimpleFeatureSource;
import org.geotools.map.FeatureLayer;
import org.geotools.map.Layer;
import org.geotools.map.MapContent;
import org.geotools.styling.SLD;
import org.geotools.styling.Style;
import org.geotools.swing.JMapFrame;
import org.geotools.swing.data.JFileDataStoreChooser;
/**
* Prompts the user for a shapefile and displays the contents on the screen in a map frame.
* <p>
* This is the GeoTools Quickstart application used in documentationa and tutorials. *
*/
public class Quickstart {
/**
* GeoTools Quickstart demo application. Prompts the user for a shapefile and displays its
* contents on the screen in a map frame
*/
public static void main(String[] args) throws Exception {
// display a data store file chooser dialog for shapefiles
File file = JFileDataStoreChooser.showOpenFile("shp", null);
if (file == null) {
return;
}
FileDataStore store = FileDataStoreFinder.getDataStore(file);
SimpleFeatureSource featureSource = store.getFeatureSource();
// Create a map content and add our shapefile to it
MapContent map = new MapContent();
map.setTitle("Quickstart");
Style style = SLD.createSimpleStyle(featureSource.getSchema());
Layer layer = new FeatureLayer(featureSource, style);
map.addLayer(layer);
// Now display the map
JMapFrame.showMap(map);
}
}