Efficient access to massive map data--GeoServer manually publishes local Shapefile maps

First of all, the result picture shows you:

Enlarged look:

The color is graded by a field value in the attribute and can be customized.

The above function is to use ArcGIS to slice the data, publish it in Geoserver, and use the google map as the base map to display the effect.

1. What is ArcGIS?

Developed by ESRI, ArcGIS is a software that creates and draws various forms of maps. Generally, data is collected by surveyors, drawn into maps by gis data processing personnel, and then packaged for developers to display on the web.

The following is the original picture. The picture is densely divided into more than 6,000 faces. Each face is zoomed in on the map, outlined bit by bit, and then added with attribute data. This is a very time-consuming + energy-consuming + eye-consuming task. Work.

2. What is Geoserver?

As the name suggests, it is a server, which can be used to publish map data conveniently, allowing users to update, delete, and insert feature data. GeoServer can easily share spatial geographic information among users.

It is worth mentioning that it is open source, while ArcServer, the same type of product developed by ESRI, is a GIS server that is charged, and the price is relatively high.

3. How to publish ArcGIS .shp files to Geoserver?

1. Configure the environment

To build a GeoServer environment, installation packages are required: Java JDK 7, Tomcat 7, geoserver.war (the latest version of GeoServer 2.0.2 has built-in HTTP server). You can PM me the installation package.

Put geoserver.war under Tomcat's webapp to start it and you can access it.

The user name is admin and the password is geoserver. After logging in, the page is as follows:

2. Add style

Open the GeoServer interface, click Styles, as shown in the figure

After entering the new page, click Add new style

On the newly opened page, the Name is named mystyle, and add code (additional code 1) in the code area. After adding the code, click the Validate button on the page. If there is no problem with the code, it will prompt "No validation errors" at the top of the page. Then click Submit to submit

You can also directly import the styles file, as shown in the figure below, click the browse button of SLD file, import the myStyles.sld file, then click Upload, click Validate to check the code after the upload is successful, and press Submit. The steps are the same as above.

3. Publish the map

After the style is set successfully, add the ArcGis sliced ​​data

Go to the following page after stand-alone, we can see the ESRI company mentioned above, and the .shp file is required here.

After clicking, start to set the map name, path and other information. Note that there must be no Chinese in the path of the map file, otherwise the map cannot be displayed.

After saving, the following page will pop up, click Publish

Set the coordinate system and bounds

Don't click Save yet, click the Publish tab

Add the style you just set

Then click save at the bottom to publish successfully

4. View the published map

Find the layer you just added in the opened page and click OpenLayers

The final display effect is as follows:

At this point, our map release is complete, so how do we load it into Google Maps for display? Stay tuned for the next article:

Efficient access to massive map data--Access maps published by Geoserver with OpenLayers

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324445461&siteId=291194637