Install and use geoserver1 and udig on Windows

Source: Internet
Author: User
1. install and configure the Java platform
Skip this step if you are a Java developer. If your machine does not have a Java platform, go to the http://java.sun.com to download JDK, the latest version is 1.6.
Install JDK. Note that JDK is required for running geoserver, rather than JRE.
Set the JDK path in the environment variable. Right-click my computer, select Properties> advanced> environment variable, and create a new system variable, java_home. The value is the JDK installation path.
For example:
Configure the environment variable "D: \ j2sdk1.4.2 _ 13" as the installation directory
Classpath D: \ j2sdk1.4.2 _ 13 \ Lib \ tools. Jar
Java_home D: \ j2sdk1.4.2 _ 13
Path D: \ j2sdk1.4.2 _ 13 \ bin

2. Install geoserver
You can double-click the downloaded EXE installation package to automatically install the package. InstallProgramIt detects the version of the Java environment in your system and prompts you. This installer also takes care of the upgrading friends and provides the path of the configuration file for selection. Of course, you can skip this step if it is the first installation.

3. Start geoserver
You can select geoserver-> Start geoserver from the Start menu to start.
The default Java container of geoserver is Jetty. If a program occupies port 8080, you can modify the ETC/jetty in the installation directory of geoserver. modify the port of the XML file: Search for port 8080, you can find Modify the default settings to restart the server.

Open your browser and enter http: // localhost: 8080/geoserver/to view the welcome page of geoserver.

Iv. View demo
Click the demo Page Link in the welcome interface, and then click the WFS-T link to start a javascript-based map editor named mapbuilder. Mapbuilder is an open-source project that you can find in sf.net.

After mapbuilder is started, we can see a sample image. Let's start with it!

5. Access geoserver from udig
Udig is an open-source desktop GIS software. Based on Java and eclipse platforms, You can edit and view SHP format map files. Its address is http://udig.refractions.net. Because you already have a Java environment, you can download the installation package and install it directly.
Create a project and map in udig.
Return to the gerserver welcome page and copy the link address of WMS capabilities. Right-click map and use the Add command. In the displayed dialog box, select Web Map Server. Paste the copied URL into the input box and click OK.
After processing, we can see the available resources in the window. For example, select tasimania_cities_type and tasmania_state_boudaries, and click Finish.
Go back to the gerserver welcome page and copy the URL of WFS capabilities. Continue to use the Add command, select Web Feature server, and paste the address.
The resources on the server are listed. Select tasimania_water_type and tasimania_roads_type, and click Finish. We can see the map in mapbuilder in the udig window.

6. Edit and submit data in udig
Let's take modifying a path as an example. Select the tasimania_roads_type layer and use the path editing tool on the toolbar. If you zoom in on the map, we will find that there is a road that overlaps with the water surface. You can correct it by modifying the position of a node.
The specific method is to drag the node to a new location, and then select the path editing tool to go down to the Add vertex command in the menu. If you want to cancel editing, you can use the rollback changes on the toolbar. After the modification is complete, Click Commit Changes on the toolbar. This is a typical transaction processing operation.

Then, open mapbuilder and the map has been modified.

7. Create a map in udig
Create a map under the project and create a layer in the map. Change the geometry field type of the layer to geometry, and insert an integer field named type. Select the water layer in the source image, select all the water surfaces in the area selection tool box on the toolbar, copy and paste them to the new image. Select the roads layer, select all roads, and do the same.

8. edit a map in udig
Use the holecutter button on the toolbar to draw a closed area in the lake. Double-click it to draw the island.
Use the createline button on the toolbar to draw a road inside the island. Double-click it.
Use the createpolygon button on the toolbar to draw a closed area by the lake. You can use Ctrl + Shift + S to enable the snap status and use the auto-fit function.
Sanp includes five states:
No snapping
Selected features
Current layer
All layers
Grid
I will not describe it again.
Click deletefeature on the toolbar to delete the created region.
You can use the fillarea button to create a region to automatically join the original region.

9 udig map attribute operations
Remove the city layer from the original map, open the catalog tab, right-click the city layer under my geoserver WFS, and select Add to current layer.
Right-click the cities layer in the layer manager, select the change style command, and select the label option to display the label content.
Use the editgeometry tool to click the city symbol. Right-click the city symbol and select Edit from the menu to edit the attribute value in the default Feature editor. Use commitchanges to submit.

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.