WebGIS Information System - Database Design

The traffic information system based on GIS uses PostgreSQL as the attribute database, PostGIS as the spatial database, and realizes the persistent operation of the system through Hibernate. This section introduces the design of the core entity classes of the transportation WebGIS information system and the design of the corresponding ER diagram and data table.

ER diagram design

The following describes the core entity object design ER diagram.
(1) The E-R graph of user (user information table) is shown in
insert image description here
(2) the E-R graph of urban roads _ polyl ine
As shown in Figure 8.3-2.

(3) The E-R diagram of _polyline in the urban miscellaneous road
insert image description here

Create database and data table

Import the space database file, and the equipment space data table is shown in the figure
insert image description here

The data of urban roads is used to display the detailed structure diagram of the data table, which is used to save the relevant information of urban roads.

insert image description here

Development environment and environment configuration

First of all, let's understand the development environment needed to develop the WebGIS system. The development environment required by the transportation WebGIS information system
is as follows:

1. Server side

(1) Operating system: Windows operating system.
(2) Web server: Tomcat6. 0 or higher version.
(3) Java development kit: JDKl. 5 or above.
(4) Database: PostgreSQLC PostG IS).
(5) Map server: ArcGIS Serverl0. 2 or later.
(6) Mapping network planning: ArcGIS DesktoplO. 2 or later.
(7) Map development framework: ArcGIS for JavaScript API or higher version.
(8) Display resolution: minimum 800 pixels × 600 pixels.
(9) Mobile operating system: Android.

2. Client

(1) Browser: Chrome.
(2) Resolution: minimum 800 pixels x 600 pixels.
Prepare the required environment for development. Before actually implementing the system, you need to do some configuration work, such as setting up the project
environment and project integration framework. Before that, you need to import Spring2, Struts2, Hibernate and other
jar packages of system applications. Under the lib file of the project.

1) Configure Struts2

Create a Struts.xml file under the ClassPath of the project, and its configuration code is as follows:

〈?泪nl version =” l 。” encoding =” UTF - 8?>
<! OOCTYPE struts PUBLIC
” - //Apache Software Foundation//DTD Struts Configuration 2 . 3//EN”
” http : I I struts. apache. org/ dtd s/ struts - 2. 3. dtd ”>
<struts>
< constant name =struts . enable. DynamicMeth odinvocation” value =false/>
< constant name =” struts.devMode” value =true/>
< package name =default” namespace =/extends =” struts - default">
< action name =”test” class =” action.test”>
< result name =气uccess ”>/ templets/index . jsp</result>
</action>
</package>
</struts>

2) Configure Hibernate

Configure properties such as database connection information, database dialect, and print SQL statements in the Hibernate configuration file
. Since the Catalog of ArcGIS Desktop can automatically import data files and connect to corresponding databases, it can automatically
generate some tables and fields in the data, so the deployment of Hibernate can be omitted here, and ArcGIS can complete
this task.

3) Configure Spring

Use Spring to load Hibernate configuration files and Session management classes. When configuring Spring, you only need to configure
Spring’s core configuration file applicationContex.xml. The code is as follows:

<?xml version =” 1. 。” encoding g ” UTF - 8?>
< beans xmlns =”http://www.springframework.org/schema/beans”
xmlns:xsi =”http: //www . 的org/20 01/XMLSchema - instance"
xmlns:aop = ” http : //w阳.springframework . org/schema/aop”
xmlns:tx =” http ://阳w . springfr皿ework . org/schema/tx”
xsi : schemaLocation = ”
http://www . springfr四ework . org/schema/beans
http ://刚w. springframework. org/ schema/beans/ spring- beans - 2. 5. xsd
http://www.springframework. org/schema/aop
http://w阳. springfr四ework. org/schema/aop/spring- aop- 2. 5. xsd
http : //www.spr 工ngframework.org/schema/tx
http: //www. springframework.org/schema/tx/spring- tx - 2. 5. xsd">
<bean name =”test” class =”org.xhd.action.test”>
</bean>
</bes>

4) Configure Web.xml

The configuration file of Web.xml is the basic configuration file of the project. Through this file, the instantiation of Spring container, filter
, Struts2 and default operations are set. The key codes are as follows:

〈?到nl version =” 1. 。” encoding =”UTF- 8?>
< web - app id =WebApp_9 ” version= "2. 4” xmlns =”http://java.sun.com/xml/ns/j2ee” xmlns:xsi
=”http: //www . w3 . org/2001/XMLSchema - instance" xsi: sch四aLocation =” http://java. sun.com/
xml/ns/j2ee http: //java. sun. com/xml/ns/j2ee/web- app_2_ 4. xsd">
< display - name> Struts Bl缸lk </display - n四e>
<filter>
< filter - name> struts2 </filter - name>
<filter- class>
org.apache. struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter - class>
</filter>
< filter - mapping>

Guess you like

Origin blog.csdn.net/leva345/article/details/131433561