【GeoServer系列】——安装与发布shapefile数据
GeoServer是一个基于java的服务器,它允许用户查看和编辑地理空间数据。使用OGC制定的开放标准,GeoServer在地图创建和数据共享方面具有极大的灵活性。
功能概述:
- Open and Share Your Spatial Data
GeoServer允许您向世界显示您的空间信息。GeoServer实现了Web地图服务(WMS)标准,可以创建各种输出格式的地图。OpenLayers是一个免费的地图库,集成到GeoServer中,使地图生成快速简便。GeoServer是建立在GeoTools上的,GeoTools是一个开源的Java GIS工具包。除了精美的地图,GeoServer还有更多的功能。GeoServer符合Web Feature Service (WFS)标准和Web Coverage Service (WCS)标准,后者允许共享和编辑用于生成地图的数据。
- Integrate With Mapping APIs
我们推荐OpenLayers和Leaflet,当它们与GeoServer结合时,为您的web映射需求提供了一个开源的解决方案。GeoServer还可以在任何流行的地图应用程序上显示数据,如谷歌地图、谷歌地球、微软必应地图和MapBox。此外,GeoServer还可以与传统GIS架构(如ESRI ArcGIS)对接。
下载与安装:
安装包有exe桌面形式和war包等形式,选取特定包形式并安装,要注意的是要查看下载包与电脑下载的java版本是否兼容
![]()
- war包形式:geoserver 安装部署发部_geoserver-2.24.1-war 部署-CSDN博客
- exe形式:geoserver 下载安装_geoserver下载-CSDN博客
发布 shapefile:
Publishing a shapefile — GeoServer 2.26.x User Manual
Publishing a shapefile
This tutorial walks through the steps of publishing a Shapefile with GeoServer.
This tutorial assumes that GeoServer is running at
http://localhost:8080/geoserver.Data preparation
First let’s gather that the data that we’ll be publishing.
Download the file nyc_roads.zip. This archive contains a shapefile of roads from New York City that will be used during in this tutorial.
Unzip the
nyc_roads.zipinto a new directory namednyc_roads. The archive contains the following four files:nyc_roads.shp nyc_roads.shx nyc_roads.dbf nyc_roads.prjMove the
nyc_roadsdirectory into<GEOSERVER_DATA_DIR>/data, where<GEOSERVER_DATA_DIR>is the root of the GeoServer data directory. If no changes have been made to the GeoServer file structure, the path isgeoserver/data_dir/data/nyc_roads.若是war包部署在Tomcat,需要重新启动Tomcat
D:\software\Tomcat\apache-tomcat-8.5.92\webapps\geoserver\data\data
Creating a new workspace
The next step is to create a workspace for the shapefile. A workspace is a container used to group similar layers together.
Note
This step is optional if you’d like to use an existing workspace. Usually, a workspace is created for each project, which can include stores and layers that are related to each other.
In a web browser, navigate to
http://localhost:8080/geoserver.Log into GeoServer as described in the Logging In section.
Navigate to Data ‣ Workspaces.
Workspaces page
Click the Add new workspace button.
You will be prompted to enter a workspace Name and Namespace URI.
Configure a new workspace
Enter the Name as
nycand the Namespace URI ashttp://geoserver.org/nyc.Note
A workspace name is an identifier describing your project. It must not exceed ten characters or contain spaces. A Namespace URI (Uniform Resource Identifier) can usually be a URL associated with your project with an added trailing identifier indicating the workspace. The Namespace URI filed does not need to resolve to an actual valid web address.
nyc workspace
Click the Submit button. The
nycworkspace will be added to the Workspaces list.Create a store
Once the workspace is created, we are ready to add a new store. The store tells GeoServer how to connect to the shapefile.
Navigate to Data‣Stores.
You should see a list of stores, including the type of store and the workspace that the store belongs to.
In order to add the shapefile, you need to create a new store. Click the Add new Store button. You will be redirected to a list of the data sources supported by GeoServer. Note that the data sources are extensible, so your list may look slightly different.
Stores
Click Shapefile. The New Vector Data Source page will display.
Begin by configuring the Basic Store Info.
Select the workspace
nycfrom the drop down menu.Enter the Data Source Name as
NYC RoadsEnter a brief Description (such as “Roads in New York City”).
Under Connection Parameters, browse to the location URL of the shapefile, typically
nyc_roads/nyc_roads.shp.
Basic Store Info and Connection Parameters
Click Save. You will be redirected to the New Layer page in order to configure the
nyc_roadslayer.Creating a layer
Now that the store is loaded, we can publish the layer.
On the New Layer page, click Publish beside the
nyc_roadslayer name.
New layer
The Edit Layer page defines the data and publishing parameters for a layer. Enter a short Title and an Abstract for the
nyc_roadslayer.
Basic Resource Information
Generate the layer’s bounding boxes by clicking the Compute from data and then Compute from native bounds links.
Generating bounding boxes
Click the Publishing tab at the top of the page.
We can set the layer’s style here. Under WMS Settings, ensure that the Default Style is set to line.
Select Default Style
Finalize the layer configuration by scrolling to the bottom of the page and clicking Save.
Previewing the layer
In order to verify that the
nyc_roadslayer is published correctly, we can preview the layer.
Navigate to the Layer Preview screen and find the
nyc:nyc_roadslayer.
Click the OpenLayers link in the Common Formats column.
An OpenLayers map will load in a new tab and display the shapefile data with the default line style. You can use this preview map to zoom and pan around the dataset, as well as display the attributes of features.
相关文章:
【GeoServer系列】——安装与发布shapefile数据
GeoServer是一个基于java的服务器,它允许用户查看和编辑地理空间数据。使用OGC制定的开放标准,GeoServer在地图创建和数据共享方面具有极大的灵活性。 功能概述: Open and Share Your Spatial Data GeoServer允许您向世界显示您的空间信息。G…...
Rust 第三方库创建和导入(cargo --lib)
前言 日常开发过程中,难免会有一些工具方法,多个项目之间可能会重复使用。 所以将这些方法集成到一个第三方包中方便后期维护和管理, 比如工具函数如果需要修改,多个项目可能每个都需要改代码, 抽离到单独的包中只需要…...
node-sass和sass-loader安装Error经验
一、问题 当前笔记本环境版本:node-v16.15.1;npm-8.11.0,在面对五年前vue项目的依赖sass-loader8.0.2,node-sass4.14.1的情况下,怎么参考大神们的安装教程,始终存在Error,经过坚持不懈的努力&a…...
LabVIEW车体静强度试验台测控系统
LabVIEW车体静强度试验台测控系统 开发了一种基于LabVIEW的车体静强度试验台测控系统,通过自动化技术提高试验的精度和效率。系统采用LabVIEW软件与S7-200 SMART PLC硬件平台相结合,实现了对液压缸作用力的精确控制和试验数据的实时采集及管理。 传统的…...
软件测试进阶
目录 一、自动化测试 1.概念 2.Selenium 2.1 概念 2.1.1 Selenium是什么? 2.1.2 Selenium特点 2.1.3 工作原理 2.2 SeleniumJava环境搭配 2.3 定位元素 2.3.1 CSS语法 2.3.2 XPath语法 2.4 应用 2.4.1 点击提交文本 2.4.2 模拟输入 2.4.3 清除文本 2…...
将字符串 “()“ ““ “|“ 条件组成的复杂表达式转换为ES查询语句
应用场景 "()" "&" "|" 这几个条件对于我们来说并不陌生, 其表达的逻辑非常明了, 又能通过很少的字符表达很复杂的嵌套关系, 在一些复杂的查询中会经常用到, 因此我最近也遇到了类似的问题,一开始觉得这类的工具应该挺常见的, 结果搜了半天…...
2024上半年软考 考试心得
考试的时候感觉选择题有点偏,很多概念题都不知道是什么,好像没怎么见过,什么拖库洗库,linux权限号不会,python也不确定,但也算顺利;下午题的数据库竟然没考主键外键,我的天哪&#x…...
【redis】set和zset常用命令
set 无序集合类型 sadd 和 smembers SADD:将一个或者多个元素添加到set中。注意,重复的元素无法添加到set中。 语法:SADD key member [member] 把集合中的元素,叫做member,就像hash类型中,叫做field类似. 返回值表示本次操作,添加成功了几个元素. 时间复…...
【面试题-006】java中的垃圾回算法有哪些?
Java中的垃圾回收(Garbage Collection,简称GC)是指自动内存管理的一种机制,用于回收不再使用的对象占用的内存。Java中的垃圾回收算法主要有以下几种: 标记-清除(Mark-Sweep)算法: …...
最小时间差
首先可以想到,可以计算出任意两个时间之间的差值,然后比较出最小的,不过这种蛮力方法时间复杂度是O(n^2)。而先将时间列表排序,再计算相邻两个时间的差值,就只需要计算n个差值,而排序阶段时间复杂度通常为O…...
动态SQL IF语句
IF语句学习 第一种写法(标准) 我们先来看以下标准写法: select * from .. <where> <if test""> and ....... <if test""> and ....... <where> 我们用了一个where标签 , 内嵌if语句 第二种写法: 这是第二种写法:不用where标…...
961题库 北航计算机 操作系统 附答案 选择题形式
有题目和答案,没有解析,不懂的题问大模型即可,无偿分享。 第1组 习题 计算机系统的组成包括( ) A、程序和数据 B、处理器和内存 C、计算机硬件和计算机软件 D、处理器、存储器和外围设备 财务软件是一种ÿ…...
SylixOS 版本与 RealEvo-IDE 版本对应关系说明
SylixOS 版本与 RealEvo-IDE 版本对应关系说明 SylixOS 版本IDE 版本发布日期1.4.13.1.52017/01/171.5.23.5.12017/10/121.7.13.8.32018/06/221.8.33.9.52018/10/081.9.9-103.9.102020/01/021.11.63.10.22020/05/131.11.73.10.x2020/06/121.12.93.11.02020/09/111.12.11&#…...
linux命令:调试必备工具dmesg
在服务器上进行芯片调试时,我们会遇到各种各样的问题,很多问题与操作系统相关。此时就需要了解操作系统发生了哪些事件。 dmesg 是linux系统中用来打印或控制内核缓冲区内容的命令。这个环形缓冲区记录了系统启动以来发生的各种事件消息,包括…...
第三届大湾区算力大会丨暴雨开启数字未来新篇
5月30-31日,韶关市迎来主题为“算启新篇智创未来”的第三届粤港澳大湾区(广东)算力产业大会暨第二届中国算力网大会,活动由广东省人民政府主办,广东省政数局、韶关市人民政府共同承办。暴雨信息作为算力产业发展的重要构建者受邀赴会…...
SPWM载波调制方式-三电平杂记1
方法一: P2 O1 N0 方法二:双载波直接发波 方法三:负轴载波和调制波往上抬升1,得到使用同一个载波 在正半周在P和O切换,在下半轴式O和N切换...
常见攻击类型整理
文章目录 网络攻击web攻击XSS攻击存储型XSS反射型XSSDOM型XSS CSRF攻击SQL注入攻击文件上传漏洞业务逻辑漏洞越权访问水平越权垂直越权 密码找回验证码漏洞 信息泄露暴力破解远程命令执行(RCE)xxe注入反序列化文件包含本地文件包含(LFI&#…...
R语言探索与分析-美国房价及其影响因素分析
一、选题背景 以多元线性回归统计模型为基础,用R语言对美国部分地区房价数据进行建模预测,进而探究提高多元回 归线性模型精度的方法。先对数据进行探索性预处理,随后设置虚拟变量并建模得出预测结果,再使用方差膨胀因子对 多重共…...
Android14 WMS-窗口添加流程(一)-Client端
窗口布局在onCreate方法中通过setContentView(R.layout.xxx)加载,但窗口的显示并不是在wm_on_create_called中, 而是在wm_on_resume_called后,也就是说应用onResume时此窗口是不可见的,真正可见是当此window窗口的mDrawState变化状态从NO_SUR…...
【人工智能】第二部分:ChatGPT的架构设计和训练过程
人不走空 🌈个人主页:人不走空 💖系列专栏:算法专题 ⏰诗词歌赋:斯是陋室,惟吾德馨 目录 🌈个人主页:人不走空 💖系列专栏:算法专题 ⏰诗词歌…...
基于FPGA的PID算法学习———实现PID比例控制算法
基于FPGA的PID算法学习 前言一、PID算法分析二、PID仿真分析1. PID代码2.PI代码3.P代码4.顶层5.测试文件6.仿真波形 总结 前言 学习内容:参考网站: PID算法控制 PID即:Proportional(比例)、Integral(积分&…...
DeepSeek 赋能智慧能源:微电网优化调度的智能革新路径
目录 一、智慧能源微电网优化调度概述1.1 智慧能源微电网概念1.2 优化调度的重要性1.3 目前面临的挑战 二、DeepSeek 技术探秘2.1 DeepSeek 技术原理2.2 DeepSeek 独特优势2.3 DeepSeek 在 AI 领域地位 三、DeepSeek 在微电网优化调度中的应用剖析3.1 数据处理与分析3.2 预测与…...
ffmpeg(四):滤镜命令
FFmpeg 的滤镜命令是用于音视频处理中的强大工具,可以完成剪裁、缩放、加水印、调色、合成、旋转、模糊、叠加字幕等复杂的操作。其核心语法格式一般如下: ffmpeg -i input.mp4 -vf "滤镜参数" output.mp4或者带音频滤镜: ffmpeg…...
Unit 1 深度强化学习简介
Deep RL Course ——Unit 1 Introduction 从理论和实践层面深入学习深度强化学习。学会使用知名的深度强化学习库,例如 Stable Baselines3、RL Baselines3 Zoo、Sample Factory 和 CleanRL。在独特的环境中训练智能体,比如 SnowballFight、Huggy the Do…...
第 86 场周赛:矩阵中的幻方、钥匙和房间、将数组拆分成斐波那契序列、猜猜这个单词
Q1、[中等] 矩阵中的幻方 1、题目描述 3 x 3 的幻方是一个填充有 从 1 到 9 的不同数字的 3 x 3 矩阵,其中每行,每列以及两条对角线上的各数之和都相等。 给定一个由整数组成的row x col 的 grid,其中有多少个 3 3 的 “幻方” 子矩阵&am…...
Java求职者面试指南:Spring、Spring Boot、MyBatis框架与计算机基础问题解析
Java求职者面试指南:Spring、Spring Boot、MyBatis框架与计算机基础问题解析 一、第一轮提问(基础概念问题) 1. 请解释Spring框架的核心容器是什么?它在Spring中起到什么作用? Spring框架的核心容器是IoC容器&#…...
IP如何挑?2025年海外专线IP如何购买?
你花了时间和预算买了IP,结果IP质量不佳,项目效率低下不说,还可能带来莫名的网络问题,是不是太闹心了?尤其是在面对海外专线IP时,到底怎么才能买到适合自己的呢?所以,挑IP绝对是个技…...
VisualXML全新升级 | 新增数据库编辑功能
VisualXML是一个功能强大的网络总线设计工具,专注于简化汽车电子系统中复杂的网络数据设计操作。它支持多种主流总线网络格式的数据编辑(如DBC、LDF、ARXML、HEX等),并能够基于Excel表格的方式生成和转换多种数据库文件。由此&…...
阿里云Ubuntu 22.04 64位搭建Flask流程(亲测)
cd /home 进入home盘 安装虚拟环境: 1、安装virtualenv pip install virtualenv 2.创建新的虚拟环境: virtualenv myenv 3、激活虚拟环境(激活环境可以在当前环境下安装包) source myenv/bin/activate 此时,终端…...
xmind转换为markdown
文章目录 解锁思维导图新姿势:将XMind转为结构化Markdown 一、认识Xmind结构二、核心转换流程详解1.解压XMind文件(ZIP处理)2.解析JSON数据结构3:递归转换树形结构4:Markdown层级生成逻辑 三、完整代码 解锁思维导图新…...











