当前位置: 首页 > news >正文

【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.

  1. 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.

  2. Unzip the nyc_roads.zip into a new directory named nyc_roads. The archive contains the following four files:

    nyc_roads.shp
    nyc_roads.shx
    nyc_roads.dbf
    nyc_roads.prj
    
  3. Move the nyc_roads directory 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 is geoserver/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.

  1. In a web browser, navigate to http://localhost:8080/geoserver.

  2. Log into GeoServer as described in the Logging In section.

  3. Navigate to Data ‣ Workspaces.

    ../../_images/data_workspaces.png

    Workspaces page

  4. Click the Add new workspace button.

  5. You will be prompted to enter a workspace Name and Namespace URI.

    ../../_images/new_workspace.png

    Configure a new workspace

  6. Enter the Name as nyc and the Namespace URI as http://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.

    ../../_images/workspace_nycroads.png

    nyc workspace

  7. Click the Submit button. The nyc workspace 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.

  1. Navigate to Data‣Stores.

  2. You should see a list of stores, including the type of store and the workspace that the store belongs to.

  3. 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.

    ../../_images/stores_nycroads.png

    Stores

  4. Click Shapefile. The New Vector Data Source page will display.

  5. Begin by configuring the Basic Store Info.

    • Select the workspace nyc from the drop down menu.

    • Enter the Data Source Name as NYC Roads

    • Enter a brief Description (such as “Roads in New York City”).

  6. Under Connection Parameters, browse to the location URL of the shapefile, typically nyc_roads/nyc_roads.shp.

    ../../_images/new_shapefile.png

    Basic Store Info and Connection Parameters

  7. Click Save. You will be redirected to the New Layer page in order to configure the nyc_roads layer.

Creating a layer

Now that the store is loaded, we can publish the layer.

  1. On the New Layer page, click Publish beside the nyc_roads layer name.

    ../../_images/new_layer.png

    New layer

  2. The Edit Layer page defines the data and publishing parameters for a layer. Enter a short Title and an Abstract for the nyc_roads layer.

    ../../_images/new_data.png

    Basic Resource Information

  3. Generate the layer’s bounding boxes by clicking the Compute from data and then Compute from native bounds links.

    ../../_images/boundingbox1.png

    Generating bounding boxes

  4. Click the Publishing tab at the top of the page.

  5. We can set the layer’s style here. Under WMS Settings, ensure that the Default Style is set to line.

    ../../_images/style1.png

    Select Default Style

  6. 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_roads layer is published correctly, we can preview the layer.

  1. Navigate to the Layer Preview screen and find the nyc:nyc_roads layer.

    ../../_images/layer_preview.png

  2. Click the OpenLayers link in the Common Formats column.

  3. 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.

    ../../_images/openlayers4.png

相关文章:

【GeoServer系列】——安装与发布shapefile数据

GeoServer是一个基于java的服务器&#xff0c;它允许用户查看和编辑地理空间数据。使用OGC制定的开放标准&#xff0c;GeoServer在地图创建和数据共享方面具有极大的灵活性。 功能概述&#xff1a; Open and Share Your Spatial Data GeoServer允许您向世界显示您的空间信息。G…...

Rust 第三方库创建和导入(cargo --lib)

前言 日常开发过程中&#xff0c;难免会有一些工具方法&#xff0c;多个项目之间可能会重复使用。 所以将这些方法集成到一个第三方包中方便后期维护和管理&#xff0c; 比如工具函数如果需要修改&#xff0c;多个项目可能每个都需要改代码&#xff0c; 抽离到单独的包中只需要…...

node-sass和sass-loader安装Error经验

一、问题 当前笔记本环境版本&#xff1a;node-v16.15.1&#xff1b;npm-8.11.0&#xff0c;在面对五年前vue项目的依赖sass-loader8.0.2&#xff0c;node-sass4.14.1的情况下&#xff0c;怎么参考大神们的安装教程&#xff0c;始终存在Error&#xff0c;经过坚持不懈的努力&a…...

LabVIEW车体静强度试验台测控系统

LabVIEW车体静强度试验台测控系统 开发了一种基于LabVIEW的车体静强度试验台测控系统&#xff0c;通过自动化技术提高试验的精度和效率。系统采用LabVIEW软件与S7-200 SMART PLC硬件平台相结合&#xff0c;实现了对液压缸作用力的精确控制和试验数据的实时采集及管理。 传统的…...

软件测试进阶

目录 一、自动化测试 1.概念 2.Selenium 2.1 概念 2.1.1 Selenium是什么&#xff1f; 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上半年软考 考试心得

考试的时候感觉选择题有点偏&#xff0c;很多概念题都不知道是什么&#xff0c;好像没怎么见过&#xff0c;什么拖库洗库&#xff0c;linux权限号不会&#xff0c;python也不确定&#xff0c;但也算顺利&#xff1b;下午题的数据库竟然没考主键外键&#xff0c;我的天哪&#x…...

【redis】set和zset常用命令

set 无序集合类型 sadd 和 smembers SADD&#xff1a;将一个或者多个元素添加到set中。注意,重复的元素无法添加到set中。 语法&#xff1a;SADD key member [member] 把集合中的元素,叫做member,就像hash类型中,叫做field类似. 返回值表示本次操作,添加成功了几个元素. 时间复…...

【面试题-006】java中的垃圾回算法有哪些?

Java中的垃圾回收&#xff08;Garbage Collection&#xff0c;简称GC&#xff09;是指自动内存管理的一种机制&#xff0c;用于回收不再使用的对象占用的内存。Java中的垃圾回收算法主要有以下几种&#xff1a; 标记-清除&#xff08;Mark-Sweep&#xff09;算法&#xff1a; …...

最小时间差

首先可以想到&#xff0c;可以计算出任意两个时间之间的差值&#xff0c;然后比较出最小的&#xff0c;不过这种蛮力方法时间复杂度是O(n^2)。而先将时间列表排序&#xff0c;再计算相邻两个时间的差值&#xff0c;就只需要计算n个差值&#xff0c;而排序阶段时间复杂度通常为O…...

动态SQL IF语句

IF语句学习 第一种写法(标准) 我们先来看以下标准写法: select * from .. <where> <if test""> and ....... <if test""> and ....... <where> 我们用了一个where标签 , 内嵌if语句 第二种写法: 这是第二种写法:不用where标…...

961题库 北航计算机 操作系统 附答案 选择题形式

有题目和答案&#xff0c;没有解析&#xff0c;不懂的题问大模型即可&#xff0c;无偿分享。 第1组 习题 计算机系统的组成包括&#xff08; &#xff09; A、程序和数据 B、处理器和内存 C、计算机硬件和计算机软件 D、处理器、存储器和外围设备 财务软件是一种&#xff…...

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

在服务器上进行芯片调试时&#xff0c;我们会遇到各种各样的问题&#xff0c;很多问题与操作系统相关。此时就需要了解操作系统发生了哪些事件。 dmesg 是linux系统中用来打印或控制内核缓冲区内容的命令。这个环形缓冲区记录了系统启动以来发生的各种事件消息&#xff0c;包括…...

第三届大湾区算力大会丨暴雨开启数字未来新篇

5月30-31日&#xff0c;韶关市迎来主题为“算启新篇智创未来”的第三届粤港澳大湾区(广东)算力产业大会暨第二届中国算力网大会&#xff0c;活动由广东省人民政府主办&#xff0c;广东省政数局、韶关市人民政府共同承办。暴雨信息作为算力产业发展的重要构建者受邀赴会&#xf…...

SPWM载波调制方式-三电平杂记1

方法一&#xff1a; P2 O1 N0 方法二&#xff1a;双载波直接发波 方法三&#xff1a;负轴载波和调制波往上抬升1&#xff0c;得到使用同一个载波 在正半周在P和O切换&#xff0c;在下半轴式O和N切换...

常见攻击类型整理

文章目录 网络攻击web攻击XSS攻击存储型XSS反射型XSSDOM型XSS CSRF攻击SQL注入攻击文件上传漏洞业务逻辑漏洞越权访问水平越权垂直越权 密码找回验证码漏洞 信息泄露暴力破解远程命令执行&#xff08;RCE&#xff09;xxe注入反序列化文件包含本地文件包含&#xff08;LFI&#…...

R语言探索与分析-美国房价及其影响因素分析

一、选题背景 以多元线性回归统计模型为基础&#xff0c;用R语言对美国部分地区房价数据进行建模预测&#xff0c;进而探究提高多元回 归线性模型精度的方法。先对数据进行探索性预处理&#xff0c;随后设置虚拟变量并建模得出预测结果&#xff0c;再使用方差膨胀因子对 多重共…...

Android14 WMS-窗口添加流程(一)-Client端

窗口布局在onCreate方法中通过setContentView(R.layout.xxx)加载&#xff0c;但窗口的显示并不是在wm_on_create_called中, 而是在wm_on_resume_called后&#xff0c;也就是说应用onResume时此窗口是不可见的&#xff0c;真正可见是当此window窗口的mDrawState变化状态从NO_SUR…...

【人工智能】第二部分:ChatGPT的架构设计和训练过程

人不走空 &#x1f308;个人主页&#xff1a;人不走空 &#x1f496;系列专栏&#xff1a;算法专题 ⏰诗词歌赋&#xff1a;斯是陋室&#xff0c;惟吾德馨 目录 &#x1f308;个人主页&#xff1a;人不走空 &#x1f496;系列专栏&#xff1a;算法专题 ⏰诗词歌…...

[特殊字符] 智能合约中的数据是如何在区块链中保持一致的?

&#x1f9e0; 智能合约中的数据是如何在区块链中保持一致的&#xff1f; 为什么所有区块链节点都能得出相同结果&#xff1f;合约调用这么复杂&#xff0c;状态真能保持一致吗&#xff1f;本篇带你从底层视角理解“状态一致性”的真相。 一、智能合约的数据存储在哪里&#xf…...

树莓派超全系列教程文档--(61)树莓派摄像头高级使用方法

树莓派摄像头高级使用方法 配置通过调谐文件来调整相机行为 使用多个摄像头安装 libcam 和 rpicam-apps依赖关系开发包 文章来源&#xff1a; http://raspberry.dns8844.cn/documentation 原文网址 配置 大多数用例自动工作&#xff0c;无需更改相机配置。但是&#xff0c;一…...

Qt/C++开发监控GB28181系统/取流协议/同时支持udp/tcp被动/tcp主动

一、前言说明 在2011版本的gb28181协议中&#xff0c;拉取视频流只要求udp方式&#xff0c;从2016开始要求新增支持tcp被动和tcp主动两种方式&#xff0c;udp理论上会丢包的&#xff0c;所以实际使用过程可能会出现画面花屏的情况&#xff0c;而tcp肯定不丢包&#xff0c;起码…...

树莓派超全系列教程文档--(62)使用rpicam-app通过网络流式传输视频

使用rpicam-app通过网络流式传输视频 使用 rpicam-app 通过网络流式传输视频UDPTCPRTSPlibavGStreamerRTPlibcamerasrc GStreamer 元素 文章来源&#xff1a; http://raspberry.dns8844.cn/documentation 原文网址 使用 rpicam-app 通过网络流式传输视频 本节介绍来自 rpica…...

(二)原型模式

原型的功能是将一个已经存在的对象作为源目标,其余对象都是通过这个源目标创建。发挥复制的作用就是原型模式的核心思想。 一、源型模式的定义 原型模式是指第二次创建对象可以通过复制已经存在的原型对象来实现,忽略对象创建过程中的其它细节。 📌 核心特点: 避免重复初…...

视频字幕质量评估的大规模细粒度基准

大家读完觉得有帮助记得关注和点赞&#xff01;&#xff01;&#xff01; 摘要 视频字幕在文本到视频生成任务中起着至关重要的作用&#xff0c;因为它们的质量直接影响所生成视频的语义连贯性和视觉保真度。尽管大型视觉-语言模型&#xff08;VLMs&#xff09;在字幕生成方面…...

【android bluetooth 框架分析 04】【bt-framework 层详解 1】【BluetoothProperties介绍】

1. BluetoothProperties介绍 libsysprop/srcs/android/sysprop/BluetoothProperties.sysprop BluetoothProperties.sysprop 是 Android AOSP 中的一种 系统属性定义文件&#xff08;System Property Definition File&#xff09;&#xff0c;用于声明和管理 Bluetooth 模块相…...

论文浅尝 | 基于判别指令微调生成式大语言模型的知识图谱补全方法(ISWC2024)

笔记整理&#xff1a;刘治强&#xff0c;浙江大学硕士生&#xff0c;研究方向为知识图谱表示学习&#xff0c;大语言模型 论文链接&#xff1a;http://arxiv.org/abs/2407.16127 发表会议&#xff1a;ISWC 2024 1. 动机 传统的知识图谱补全&#xff08;KGC&#xff09;模型通过…...

Java面试专项一-准备篇

一、企业简历筛选规则 一般企业的简历筛选流程&#xff1a;首先由HR先筛选一部分简历后&#xff0c;在将简历给到对应的项目负责人后再进行下一步的操作。 HR如何筛选简历 例如&#xff1a;Boss直聘&#xff08;招聘方平台&#xff09; 直接按照条件进行筛选 例如&#xff1a…...

selenium学习实战【Python爬虫】

selenium学习实战【Python爬虫】 文章目录 selenium学习实战【Python爬虫】一、声明二、学习目标三、安装依赖3.1 安装selenium库3.2 安装浏览器驱动3.2.1 查看Edge版本3.2.2 驱动安装 四、代码讲解4.1 配置浏览器4.2 加载更多4.3 寻找内容4.4 完整代码 五、报告文件爬取5.1 提…...