From the course: Advanced PostgreSQL
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Representing real-world data - PostgreSQL Tutorial
From the course: Advanced PostgreSQL
Representing real-world data
Now that we have a basic understanding of working with the geometry data type and we can run simple queries on that data, let's work with some real world data. This will be much more fun. Now I'm going to create a table called UKPlaces. I'm going to drop it if it already exists. And this will contain the location of a few counties in the United Kingdom. First, let me go ahead and select the drop table command and run F5 in order to drop the table if it already exists. Well, it doesn't. So we are all set here. I'll now go ahead and select the command to create this table called UKPlaces. Notice I have a sensor ID that's just a way to uniquely identify the sensors that I've placed across the counties. That's what you should imagine. I have the name of the county, the longitude and latitude of the county, the name of the country that's just going to be the UK and the location of the sensor. That is a column of type geometry. That sensor location is going to hold the point information for…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Spatial data analysis using PostGIS5m 44s
-
(Locked)
The WKT and WKB format1m 39s
-
(Locked)
Geometry and geography data types3m 7s
-
(Locked)
Spatial reference systems2m 30s
-
(Locked)
Creating a table to hold geometry types3m 6s
-
(Locked)
Working with basic geometry types4m 12s
-
(Locked)
Extracting coordinate values, computing length, and area3m 51s
-
(Locked)
Representing real-world data4m 56s
-
(Locked)
Computing the distance between locations3m 22s
-
(Locked)
Computing locations within a distance and representing lines on a map3m 17s
-
(Locked)
Importing shapefiles4m 16s
-
-
-
-
-