/*
* GeoTools Sample code and Tutorials by Open Source Geospatial Foundation, and others
* https://docs.geotools.org
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain worldwide.
* This software is distributed without any warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication along with this
* software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
package org.geotools.tutorial.quickstart;
import java.io.File;
import java.util.logging.Logger;
import org.geotools.api.data.FileDataStore;
import org.geotools.api.data.FileDataStoreFinder;
import org.geotools.api.data.SimpleFeatureSource;
import org.geotools.map.FeatureLayer;
import org.geotools.map.Layer;
import org.geotools.map.MapContent;
import org.geotools.styling.SLD;
import org.geotools.api.style.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 {
private static final Logger LOGGER = org.geotools.util.logging.Logging.getLogger(Quickstart.class);
/**
* 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
LOGGER.info( "Quickstart");
LOGGER.config( "Welcome Developers");
LOGGER.info("java.util.logging.config.file="+System.getProperty("java.util.logging.config.file"));
File file = JFileDataStoreChooser.showOpenFile("shp", null);
if (file == null) {
return;
}
LOGGER.config("File selected "+file);
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);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Geotools32最新版本 (267个子文件)
LGPL.html 50KB
EPSG.html 31KB
Bitstream-Vera-Fonts.html 30KB
README.html 28KB
W3C.html 26KB
NOTICE.html 26KB
OGC.html 26KB
COLORBREWER.html 26KB
GeoTools.html 26KB
netCDF.html 26KB
HSQL.html 25KB
PostgreSQL.html 25KB
sqlite-jdbc-3.41.2.2.jar 12.26MB
jcc-11.5.9.0.jar 6.24MB
ojdbc8-19.18.0.0.jar 4.28MB
cdm-core-5.5.3.jar 4.07MB
gt-sample-data-32.0.jar 3.78MB
guava-33.2.1-jre.jar 2.91MB
bufr-5.5.3.jar 2.72MB
gt-epsg-hsql-32.0.jar 2.57MB
mysql-connector-java-8.0.28.jar 2.36MB
grib-5.5.3.jar 2.16MB
gt-main-32.0.jar 1.95MB
net.opengis.wmts-32.0.jar 1.82MB
jai_core-1.1.3.jar 1.81MB
ehcache-3.4.0.jar 1.66MB
protobuf-java-3.19.3.jar 1.6MB
hsqldb-2.7.2.jar 1.57MB
mongodb-driver-core-4.0.6.jar 1.54MB
gt-xsd-gml3-32.0.jar 1.5MB
jna-5.4.0.jar 1.44MB
gt-referencing-32.0.jar 1.39MB
org.eclipse.emf.ecore-2.15.0.jar 1.34MB
mssql-jdbc-9.4.0.jre8.jar 1.27MB
jfreechart-1.0.10.jar 1.25MB
jts-core-1.20.0.jar 1.18MB
h2-1.1.119.jar 1.15MB
jai_imageio-1.1.jar 1.09MB
jaxb-runtime-2.4.0-b180830.0438.jar 1.04MB
org.eclipse.xsd-2.12.0.jar 973KB
gt-xml-32.0.jar 806KB
janino-3.0.8.jar 778KB
httpclient-4.5.14.jar 767KB
commons-collections4-4.4.jar 734KB
commons-lang3-3.15.0.jar 655KB
net.opengis.wcs-32.0.jar 647KB
joda-time-2.10.3.jar 628KB
net.opengis.wps-32.0.jar 622KB
gt-imagemosaic-32.0.jar 620KB
gt-coverage-32.0.jar 611KB
gt-render-32.0.jar 596KB
commons-collections-3.2.2.jar 575KB
net.opengis.ows-32.0.jar 573KB
jj2000-5.4.jar 532KB
gt-jdbc-hana-32.0.jar 519KB
gt-metadata-32.0.jar 497KB
commons-io-2.16.1.jar 497KB
bson-4.0.6.jar 480KB
net.opengis.wfs-32.0.jar 464KB
opendap-2.1.jar 431KB
ejml-ddense-0.41.jar 398KB
org.eclipse.emf.common-2.15.0.jar 367KB
imageio-ext-tiff-1.4.13.jar 361KB
antlr4-runtime-4.7.1.jar 329KB
commons-codec-1.11.jar 327KB
snakeyaml-2.2.jar 327KB
httpcore-4.4.16.jar 320KB
jdom2-2.0.6.1.jar 320KB
jtds-1.3.1.jar 310KB
gt-app-schema-32.0.jar 307KB
gt-netcdf-32.0.jar 305KB
FastInfoset-1.2.15.jar 305KB
gt-swing-32.0.jar 303KB
jcommon-1.0.13.jar 301KB
gt-xsd-core-32.0.jar 299KB
commons-jxpath-1.3.jar 293KB
indriya-2.2.jar 282KB
jt-jiffle-language-1.1.27.jar 267KB
gt-epsg-wkt-32.0.jar 253KB
ejml-core-0.41.jar 253KB
jai_codec-1.1.3.jar 252KB
aircompressor-0.27.jar 249KB
gt-wfs-ng-32.0.jar 246KB
gt-jdbc-32.0.jar 246KB
commons-text-1.12.0.jar 245KB
commons-beanutils-1.9.4.jar 241KB
gt-shapefile-32.0.jar 240KB
gt-xsd-csw-32.0.jar 236KB
org.eclipse.emf.ecore.xmi-2.15.0.jar 230KB
net.opengis.fes-32.0.jar 226KB
gt-wms-32.0.jar 225KB
gt-api-32.0.jar 222KB
gt-ysld-32.0.jar 208KB
jt-utils-1.6.0.jar 205KB
gt-mbstyle-32.0.jar 201KB
gt-cql-32.0.jar 196KB
opencsv-5.0.jar 195KB
jt-utilities-1.1.27.jar 183KB
gt-process-feature-32.0.jar 180KB
xmlunit-core-2.10.0.jar 177KB
共 267 条
- 1
- 2
- 3
资源评论
aa2223
- 粉丝: 2
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功