Build a WebGIS system using open-source software (7) Integrated

Source: Internet
Author: User
Once again, I picked up the WebGIS development. Now the data is ready and the framework has been set up. It is just now the application development. You know the steps and methods for adding layers.

Step 1: Create your own namespace in geoserver. Namespace example:Uri: -- http://www.bizkaia.net/geoserver?prefix--biz. Select Save and apply on the left. Remember!

Step 2: Create a datastore. If the data is stored in postgis, you should select the postgis spatial database data source, enter host, port, user name, password,WKB enabled andDo not fill in anything in the loose bBox box. If there is something in it, clear it. Finally: Submit first, save and apply.

Step 3: Create featuretype. On the featuretype page, select new to view all the tables that store space data in your database. Select the expected table and click Generate. geoserver automatically generates Minx, miny, Maxx, and Maxy. Finally, submit, save, and apply. Remember, you need to save and apply again. The data source will be written to the configuration file only when you save and apply for the second time.

Each featuretype is logically a layer. To display this layer, you also need to write the SLD file. For details about the SLD file, see the geotools document or SLD specifications. After writing the SLD file, upload it to the style directory under the geoserver directory, and add the style on the geoserver Management page. Do not press apply.

This is what I generated today (only the map part is captured ). There are three layers: province, city, and provincial capital. You also need to try more complex layers.

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.