完整文档下载地址:https://download.csdn.net/download/a772304419/17241395

/**    GeoTools - The Open Source Java GIS Toolkit*    http://geotools.org**    (C) 2019, Open Source Geospatial Foundation (OSGeo)**    This library is free software; you can redistribute it and/or*    modify it under the terms of the GNU Lesser General Public*    License as published by the Free Software Foundation;*    version 2.1 of the License.**    This library is distributed in the hope that it will be useful,*    but WITHOUT ANY WARRANTY; without even the implied warranty of*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU*    Lesser General Public License for more details.**/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 shapefilesFile 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 itMapContent map = new MapContent();map.setTitle("Quickstart");Style style = SLD.createSimpleStyle(featureSource.getSchema());Layer layer = new FeatureLayer(featureSource, style);map.addLayer(layer);// Now display the mapJMapFrame.showMap(map);}
}

geotools学习(一)IntelliJ IDEA搭建快速入门示例.pdf相关推荐

  1. python多久能上手_小白学习Python,怎样能够快速入门上手

    原标题:小白学习Python,怎样能够快速入门上手 时至今日,Python已经成为最受欢迎的编程语言之一,清晰易读,适用广泛.在TIOBE 排行榜中位居第四,成为名副其实的人工智能第一语言. 那么零基 ...

  2. JDBC学习笔记01【JDBC快速入门、JDBC各个类详解、JDBC之CRUD练习】

    黑马程序员-JDBC文档(腾讯微云)JDBC笔记.pdf:https://share.weiyun.com/Kxy7LmRm JDBC学习笔记01[JDBC快速入门.JDBC各个类详解.JDBC之CR ...

  3. springboot aop使用_Springboot 完整搭建快速入门,必看!

    点击上方蓝字关注我们 作者:CansluckCSDN博客:https://blog.csdn.net/xgx120413 前言 手把手教你Springboot微服务项目搭建快速入门,通过本文学习Spr ...

  4. 服务器搭建快速入门——适用于Android应用服务器、微信小程序服务器(一)

    目录 服务器搭建快速入门--适用于Android应用服务器.微信小程序服务器 适用人群 使用方案 准备工作 硬件方面 软件方面 开始搭建 服务器搭建快速入门--适用于Android应用服务器.微信小程 ...

  5. Servlet和HTTP请求协议-学习笔记01【Servlet_快速入门-生命周期方法、Servlet_3.0注解配置、IDEA与tomcat相关配置】

    Java后端 学习路线 笔记汇总表[黑马程序员] Servlet和HTTP请求协议-学习笔记01[Servlet_快速入门-生命周期方法.Servlet_3.0注解配置.IDEA与tomcat相关配置 ...

  6. Python学习笔记--10.Django框架快速入门之后台管理admin(书籍管理系统)

    Python学习笔记--10.Django框架快速入门之后台管理 一.Django框架介绍 二.创建第一个Django项目 三.应用的创建和使用 四.项目的数据库模型 ORM对象关系映射 sqlite ...

  7. Redis学习笔记①基础篇_Redis快速入门

    若文章内容或图片失效,请留言反馈.部分素材来自网络,若不小心影响到您的利益,请联系博主删除. 资料链接:https://pan.baidu.com/s/1189u6u4icQYHg_9_7ovWmA( ...

  8. UE4学习笔记1st:编程快速入门

    UE4学习笔记1st:编程快速入门 今天我开始学习虚幻4游戏引擎,为了此我专门买了新的电脑,我将主要配置写在这里,有想学习的同学可以参考 显卡:丽台K620 CPU:E3-1230-V3 主板:b85 ...

  9. Castle Active Record for .NET2.0快速入门示例

    一.创建Web工程 创建一个Web站点或者Web应用程序,添加对Castle.ActiveRecord.dll的引用. 二.创建需要持久化的业务实体 在.NET2.0下,由于引入了泛型,创建业务实体比 ...

最新文章

  1. Linux 2 的 Windows 子系统上发布 CUDA
  2. 蓝桥杯练习系统习题-算法提高2
  3. 深入解析:Row Movement 的原理和性能影响与关联
  4. 最小栈设计并实现一个minstack类_栈相关
  5. banana pro 板子
  6. mac搜索文件什么都没有,是为什么
  7. Swift 数据类型(三)
  8. C语言程序设计 基础知识点
  9. Origin绘图快速上手指南
  10. Mysql8数据库导到Mysql5数据库,报错Unknown collation: 'utf8mb4_0900_ai_ci'
  11. js根据银行卡号进行判断属于哪个银行并返回银行卡类型
  12. Android开发 UI布局
  13. dejavu中如何添加html文件,如何使用iText和Flying Saucer在HTML中创建PDF格式的字体? | 所有编程讨论 | zhouni.net...
  14. 爬取今日头条街拍美女图片
  15. openwrt php 编译环境,openwrt基础编译教程
  16. 俄亥俄大学计算机科学专业,美国计算机科学专业最新排名!
  17. 图像分割GrabCut
  18. rufus 装windows11 系统 z790 msi 主板
  19. Android 开机动画
  20. Lit:介绍、项目搭建

热门文章

  1. erlang(21)-列表推导与计算素数与合数
  2. 程序员法律考试笔记(2)-依法治国
  3. python3精要(23)-递归与函数列表
  4. IT从业者(程序员等)之强身健体-武术
  5. 【深度学习】使用 Pytorch 进行多类图像分类
  6. 【数据竞赛】从0梳理1场CV缺陷检测赛事!
  7. 【NLP】使用Python可视化Word2vec的结果
  8. 复现经典:《统计学习方法》第22章 无监督学习方法总结
  9. 深度学习笔记第一门课第一周:深度学习引言
  10. 读研,竞赛,与实习--公子龙的成长经历