Geoserver 2.3 release Map

Source: Internet
Author: User

Recently, due to project requirements, we have to study how to use geoserver to publish map data. According to the official documents, we can directly publish the *. SHP file, or publish it through the data table in postgis. The following two methods are described respectively.


Geoserver introduction:

Geoserver is the J2EE Implementation of OpenGIS Web Server specifications. With geoserver, you can easily publish map data, allowing you to update, delete, and insert feature data, geoserver allows users to quickly share spatial geographic information.


I. Publish the *. SHP File

First, prepare a directory containing the SHP file. Here is an example used in the official documentation.Click to download:Nyc_roads.zip 

After decompression, there will be the following four files:

Copy the nyc_roads directory to the geoserver 2.3.3 \ data_dir \ data directory.

1. Create a workspace

Start geoserver and open http: // localhost: 8080/geoserver/in the browser. Use the default administrator user to log in. The default value is admin/geoserver.

Click create workspaces:

Enter the workspace name and URL (you can write one for testing), and then click submit:

Then we can see the demo of the new workspace in the list:

2. create stores click data --> stores, and click Add new store on the new page to open the new data source page: select the data source type on the new data source page, here we select shapefile: Fill in the previous copy in data source name *. the directory where the SHP file is located, that is, nyc_roads. the shapefile location must be in the format of file: Data/[SHP file path. Set charset to gb2312 and click Save. 3. create a layer on the new layer page, click Publish in the Action column: On the edit layer page, we found that the EPGs information has been automatically set. We only need to click the links of compute from data and compute from native bounds to automatically calculate the boundary information. Click Save. for example, we should be able to see the layer we just created from the data --> layer page: 4. preview and click data --> layer preview. In the list on the right, find the created layer and click openlayer to view the effect. 2. The steps for publishing data from postgis are basically the same as for publishing the shapefile file, except that postgis rather than shapefile should be selected in add data source. for more details, such as how to create a layer group, see the official documentation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.