session: building the database – hands on experience v1€¦ · building the database – hands...

27
Session: Building the database – hands on experience V1.0 Pier-Giorgio Zaccheddu Federal Agency for Cartography and Geodesy (BKG) Richard-Strauss-Allee 11 60598 Frankfurt am Main Tel.: +49 69 6333 305 Fax: +49 69 6333 441 Email: [email protected] 19 - 25/03/2018 Top Train Course, Manila, Philippines 1

Upload: others

Post on 05-Oct-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Session:

Building the database – hands on experience

V1.0

Pier-Giorgio ZacchedduFederal Agency for Cartography andGeodesy (BKG)Richard-Strauss-Allee 1160598 Frankfurt am MainTel.: +49 69 6333 305Fax: +49 69 6333 441Email: [email protected]

19 - 25/03/2018 Top Train Course, Manila, Philippines 1

Page 2: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Content

First steps before processing the names collected Structure for storing the data, maintaining records

Feature categories/classification

Demonstration of the processing of names collected Spreadsheet or Database?

Create main tables and enter names into a database

Database queries and reports (e.g. gazetteers as printouts)

Hands on experience

Content

19 - 25/03/2018 Top Train Course, Manila, Philippines 2

Page 3: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

NamesDATABASE

Gazetteer

(printed)

national

Web

NamesDATABASEinternational

Map

GIS

What are the purposes?What are the purposes of a DB?

19 - 25/03/2018 Top Train Course, Manila, Philippines 3

Page 4: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

1. Gathering of names information

2. Authorizing toponyms

3. Storing the data, maintaining the records

paper: Gazetteerdigital: Text file,

Spreadsheet,Database

Structure for storing the data, maintaining the records

19 - 25/03/2018 Top Train Course, Manila, Philippines 4

Page 5: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Structure: Tables !!

Rows:

One for each name

Name1

Name2

Name3

.....

......

Columns: attribute information to the name

Name Feature Type

Coordi-nates

Structure for storing the data, maintaining the records

Page 6: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Manila, City of Populated Place

Stream

Mountain

14.60

16.35

5.90

120.98

121.67

121.25

Island 6.18 118.12

Rows:

One for each name

......

Columns: attribute information to the name

Name Feature Type

Coordi-nates

Tungcab River

Turtle Islands

Mount Ukan

Gazetteer / Database

Structure: Tables !!

Structure for storing the data, maintaining the records

19 - 25/03/2018 Top Train Course, Manila, Philippines 6

Page 7: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Rows:

One for each name

Columns: attribute information to the name

Gazetteer / Database

Structure: Tables !!

Structure for storing the data, maintaining the records

Field name Data type Description Geographical Name Text the name Feature Type Text e.g. River, Mountain, Populated Place. The types should be chosen from a standardized list, if exists.

Coordinates, e.g.: Longitude Number Geographical Coordinates Latitude Number Geographical Coordinates Instead of Geographical Coordinates, other systems may be used, for instance UTM with X and Y coordinates.

Absolutely necessary!

19 - 25/03/2018 Top Train Course, Manila, Philippines 7

Page 8: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Rows:

One for each name

Columns: attribute information to the name

Gazetteer / Database

Structure: Tables !!

Structure for storing the data, maintaining the records

recommendedField name Data type Description

FeatureID Integer A unique identifier assigned to the name. (for databases) This ID will be used to link the name with other database tables. Variant Name Text Other names assigned to the feature, if any Administrative Unit Text Name or Code of the Administrative Unit where the name is situated in.

Map Sheet Text Reference to a map sheet in a topographic map series. The data type may be Integer if the sheet name contains only numbers no letters.

Description Text Comments, e.g. on the history of the name, and verbal statements on the extension of the feature.

Source Text Source of the name. e.g. captured in the field by interview

Date Date Date of the entry to the Database. Other option: date of approval by the Board.

Status Text Comment, e.g. name is approved or not approved by the Board.

19 - 25/03/2018 Top Train Course, Manila, Philippines 8

Page 9: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

- language {three letter codes from ISO 639-3 or -5} - nameStatus {official, standardised, historical, other}- link to relatedSpatialObject- script {four letters codes defined in ISO 15924}- nativeness {endonym, exonym}- transliterationScheme- grammatical gender {masc., fem., neuter, common} - grammatical number {singular, plural, dual} - pronunciation- sourceOfName - typeLocal- lifeCycleInfo (begin/end of the object in the source DB)- …

mandatory- name(s) (text, spelling)- geomety- feature type- unique identifier

‘voidable’

INSPIRE GN schema: elements

Structure for storing the data, maintaining the records

19 - 25/03/2018 Top Train Course, Manila, Philippines 9

Page 10: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Gazetteer of

The Netherlands

- Feature codes… is it a river, a mountain, a populated place, etc?

Feature categories/classification

19 - 25/03/2018 Top Train Course, Manila, Philippines 10

Page 11: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Slide 11

Feature types provided EuroGeoNames (EGN) Feature classification→ 8 classes and 27 sub-classes(1) Countries, administrative units and other areas, (2) Populated Places, (3) Non-residential structures and buildings, (4) Transport and telecommunication features, (5) Terrain features, (6) Hydrographic features, (7) Conservation areas, (8) Miscellaneous

→ essentially for the purpose of query-filtering

(defined by EGN Reference Group)

Feature categories/classification

19 - 25/03/2018 Top Train Course, Manila, Philippines 11

Page 12: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Philippines- Feature codes?

Feature categories/classification

19 - 25/03/2018 Top Train Course, Manila, Philippines 12

Page 13: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Content

First steps before processing the names collected Structure for storing the data, maintaining records

Feature categories/classification

Demonstration of the processing of names collected Spreadsheet or Database?

Create main tables and enter names into a database

Database queries and reports (e.g. gazetteers as printouts)

Hands on experience

Content

19 - 25/03/2018 Top Train Course, Manila, Philippines 13

Page 14: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

1) Spreadsheet (software: e.g. Microsoft Excel)

advantage: extended processing capabilities

disadvantage: digital processing limited to operations within the spreadsheet

Text file, Spreadsheet or Database?Spreadsheet or Database?

demo3.xls

19 - 25/03/2018 Top Train Course, Manila, Philippines 14

Name Feature Designation Name Latitude LongitudeManila, City of Populated Place 14.60 120.98Tungcab River Stream 16.35 121.67Mount Ukan Mountain 5.90 121.24Turtle Islands Island 6.18 118.12

Page 15: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

2) Database (software: e.g. Microsoft Access)

advantages: data can be connected with other databases,complex processing capabilities

disadvantages: some programming and/or user skills required

Text file, Spreadsheet or Database?Spreadsheet or Database?

19 - 25/03/2018 Top Train Course, Manila, Philippines 15

Page 16: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Text file, Spreadsheet or Database?Create main tables and enter names intoa database with MS Access

names tableDatasheet view anddesign view

19 - 25/03/2018 Top Train Course, Manila, Philippines 16

Page 17: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Text file, Spreadsheet or Database?Create main tables and enter names intoa database with MS Access

names tableDatasheet view anddesign view

Field Name Data Type

RecordID Index

UID Number(long integer)

Name Text (50 char.)

Latitude Number(double)

Longitude Number(double)

FeatureCode Text (50 char.)

AdminUnit Text(50 char.)

Language Text(50 char.)

Description Text(255 char.)

VariantName Text (50 char.)

MapSheet Number(long integer)

Source Text(255 char.)

Status Text(50 char.)

Pronunciation OLE-Object

Location information OLE-Object

19 - 25/03/2018 Top Train Course, Manila, Philippines 17

Page 18: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Create main tables and enter names intoa database with MS Access

Feature classificationtableDatasheet view anddesign view

19 - 25/03/2018 Top Train Course, Manila, Philippines 18

Page 19: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Create main tables and enter names intoa database with MS Access

Feature classificationtableDatasheet view and design view

demo3.mdb

19 - 25/03/2018 Top Train Course, Manila, Philippines 19

Page 20: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Database queries and reports with MS Access (e.g. gazetteers)

The main advantage of database queries is that you can join informationfrom different tables in the database, i.e. here joining the names table andthe feature classification

19 - 25/03/2018 Top Train Course, Manila, Philippines 20

Page 21: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Database queries and reports with MS Access (e.g. gazetteers)

The report toolcan be used toprint the data in a layout defined bythe creator. gazetteer

It can build upon a query or a tableand can becreated in different designs.

19 - 25/03/2018 Top Train Course, Manila, Philippines 21

Page 22: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Text file, Spreadsheet or Database?Create main tables and enter names intoa database with PostgreSQL/PostGIS

Definition and creationof a sql-databasewith the toolpgAdmin

soft- andhardwareskills areneeded!

19 - 25/03/2018 Top Train Course, Manila, Philippines 22

Page 23: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Text file, Spreadsheet or Database?Create main tables and enter names intoa database with PostgreSQL/PostGIS

Definition and creationof a sql-databasewith the toolpgAdmin

soft- andhardwareskills areneeded!

19 - 25/03/2018 Top Train Course, Manila, Philippines 23

Page 24: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Text file, Spreadsheet or Database?Databases with MS Access andPostgreSQL/PostGIS

PostgreSQL/PostGIS

The same result withbothdatabasetools!!!

MS Access

19 - 25/03/2018 Top Train Course, Manila, Philippines 24

Page 25: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Content

First steps before processing the names collected Structure for storing the data, maintaining records

Feature categories/classification

Demonstration of the processing of names collected Spreadsheet or Database?

Create main tables and enter names into a database

Database queries and reports (e.g. gazetteers as printouts)

Hands on experience

Content

19 - 25/03/2018 Top Train Course, Manila, Philippines 25

Page 26: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Top Train Course, Manila, Philippines19 - 25/03/2018 26

Page 27: Session: Building the database – hands on experience V1€¦ · Building the database – hands on experience. V1.0. Pier-Giorgio Zaccheddu. Federal Agency for Cartography and Geodesy

Thank you for your attention!

19 - 25/03/2018 Top Train Course, Manila, Philippines 27