Paul Ramsey PostGIS Gotchas. The Things You Didn't Know That Lead to Confusion and Dismay. Wednesday, November 18, 15

Size: px
Start display at page:

Download "Paul Ramsey PostGIS Gotchas. The Things You Didn't Know That Lead to Confusion and Dismay. Wednesday, November 18, 15"

Transcription

1 Paul Ramsey PostGIS Gotchas The Things You Didn't Know That Lead to Confusion and Dismay

2 Happy GIS day! What do you call the day after GIS day? PostGIS Day is tomorrow

3 Paul Ramsey PostGIS Gotchas The Things You Didn't Know That Lead to Confusion and Dismay

4 Honestly, I have no idea why it works like that...

5 Projections

6 Map projections are easy to misunderstand, and is not obvious how the database handles them

7 I m a web developer, I don t have to care about projections. Latitude, longitude, and leave me alone.

8 POLYGON(( , , , , , , , , , ))

9 every geometry has an srid spatial_ref_sys - srid - srtext

10 srid = 3005 POLYGON(( , , , , , , , , , ))

11 SELECT proj4text srid = 3005 FROM spatial_ref_sys WHERE srid = 3005

12 +proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 srid = x_0= y_0=0 +ellps=grs80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def

13 Screwing Up Projections

14 I m a web developer, so I loaded the county data in latitude, longitude... shp2pgsql - s 4326 parcels.shp

15 srid = 4326 POLYGON(( , , , , , , , , , ))

16 ALTER TABLE parcels ALTER COLUMN geom srid = 4326 TYPE Geometry(POLYGON, 3005) USING ST_SetSRID(geom, 3005)

17 srid = 3005 POLYGON(( , , , , , , , , , ))

18 ST_SetSRID(geometry, integer) vs ST_Transform(geometry, integer)

19 ALTER TABLE parcels ALTER COLUMN geom srid = 3005 TYPE Geometry(POLYGON, 4326) USING ST_Transform(geom, 4326)

20 srid = 4326 POLYGON(( , , , , , , , , , ))

21 ST_Distance(a,b)

22 Lack of Projections

23 Los Angeles POINT( ) POINT( ) Paris

24 ST_Distance() Los Angeles POINT( ) POINT( ) Paris Actual Distance: 9107km

25 ST_Transform(..., 3857) ST_Distance() Los Angeles POINT( ) POINT( ) Paris Actual Distance: 9107km

26 ST_Transform(..., 3857) ST_Distance() * cos(radians(lat)) Los Angeles POINT( ) POINT( ) Paris Actual Distance: 9107km

27 ST_Distance(a::geography, b::geography) Los Angeles POINT( ) POINT( ) Paris Actual Distance: 9107km

28 Dude, why didn t you just tell me that right away?

29 Geography

30 Pythagoras (Plane) double dx = x2 - x1 double dy = y2 - y1; double d2 = dx * dx + dy * dy; double d = sqrt(d2);

31 Haversine (Sphere) double R = ; /* meters */ double d_lat = lat2-lat1; /* radians */ double d_lon = lon2-lon1; /* radians */ double sin_lat = sin(d_lat/2); double sin_lon = sin(d_lon/2); double a = sin_lat * sin_lat + cos(lat1) * cos(lat2) * sin_lon * sin_lon; double c = 2 * atan2(sqrt(a), sqrt(1-a)); double d = R * c;

32 GEOGRAPHY Functions ST_Area(g1) ST_Distance(g1, g2) ST_DWithin(g1, g2, d) ST_Intersects(g1, g2) ST_Covers(gpoly1, gpt2)

33 ST_Buffer(geography)

34 ST_Buffer(geography) SELECT geography( ST_Transform( ST_Buffer( ST_Transform( geometry($1), _ST_BestSRID($1) ), $2), 4326) )

35 _ST_BestSRID(geog)

36 _ST_BestSRID(geog) _ST_BestSRID(geog1, geog2)

37 ST_StartPoint(geography) SELECT geography( ST_StartPoint( geometry($1) ) )

38 Geodetic Reasoning

39

40

41 ST_Segmentize(geography, )

42 ST_Segmentize(geometry, 0.01)

43 Why does ST_Extent(ST_Transform(geom)) not equal ST_Transform(ST_Extent(geom))?

44 ST_Transform()

45 Dude, stop talking about projections.

46 Unpredictable Performance

47 start-up nerd says...

48 I want to reverse-geocode 1000 points per second... Given a point, tell me what polygon(s) it is in. (a) I have a real-time stream of 1000 points per second (b) I have 1M points I need to process in 1000 seconds

49 (a) I have a real-time stream of 1000 points per second SELECT * FROM polys WHERE ST_Intersects( geom, ST_SetSRID( ST_MakePoint({x},{y}), {srid})); Lots of small queries Find the candidate polygon(s) using r-tree index Test each candidate for point-in-polygon edge by edge: O(N)

50 (b) I have 1M points I need to process in 1000 seconds SELECT pt.id, poly.id FROM poly, pt WHERE ST_Intersects( poly.geom, pt.geom); One big query Nested loop, tends to send the same polygons into the query, over and over PostGIS holds a cache of most recent polygon, with edge index built on it: O(log(N))

51 I want to reverse-geocode 1000 points per second... Given a point, tell me what polygon(s) it is in. (a) I have a real-time stream of 1000 points per second (b) I have 1M points I need to process in 1000 seconds

52 Mysterious Operators

53 Database nerd says, So you mentioned indexes and r-trees, but I haven t seen any operators yet...

54 CREATE OR REPLACE FUNCTION ST_Intersects(geometry, geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Intersects($1,$2)' LANGUAGE 'sql' IMMUTABLE; Simple Features For SQL

55 &&

56 CREATE OPERATOR CLASS gist_geometry_ops_2d DEFAULT FOR TYPE geometry USING GIST AS STORAGE box2df, OPERATOR 1 <<, OPERATOR 2 &<, OPERATOR 3 &&, OPERATOR 4 &>, OPERATOR 5 >>, OPERATOR 6 ~=, OPERATOR 7 ~, OPERATOR OPERATOR 9 &<, OPERATOR 10 <<, OPERATOR 11 >>, OPERATOR 12 &>, OPERATOR 13 <-> FOR ORDER BY pg_catalog.float_ops, OPERATOR 14 <#> FOR ORDER BY pg_catalog.float_ops, FUNCTION 8 geometry_gist_distance_2d (internal, geometry, int4), FUNCTION 1 geometry_gist_consistent_2d (internal, geometry, int4), FUNCTION 2 geometry_gist_union_2d (bytea, internal), FUNCTION 3 geometry_gist_compress_2d (internal), FUNCTION 4 geometry_gist_decompress_2d (internal), FUNCTION 5 geometry_gist_penalty_2d (internal, internal, internal), FUNCTION 6 geometry_gist_picksplit_2d (internal, internal), FUNCTION 7 geometry_gist_same_2d (geom1 geometry, geom2 geometry, internal);

57 CREATE OPERATOR CLASS gist_geometry_ops_2d DEFAULT FOR TYPE geometry USING GIST AS... CREATE OPERATOR CLASS btree_geometry_ops DEFAULT FOR TYPE geometry USING btree AS OPERATOR 1 <, OPERATOR 2 <=, OPERATOR 3 =, OPERATOR 4 >=, OPERATOR 5 >, FUNCTION 1 geometry_cmp (geom1 geometry, geom2 geom

58 CREATE INDEX myindex ON mytable (geom); CREATE INDEX myindex USING GIST ON mytable (geom);

59 SELECT * FROM mytable ORDER BY geom; SELECT * FROM mytable GROUP BY geom; Sort on xmin of bounding box unless they are equal... Sort on ymin of bounding box unless they are equal... Sort on xmax of bounding box unless they are equal... Sort on ymax of bounding box unless they are equal... Return equality

60 CREATE INDEX myindex USING GIST ON mytable (geom); CREATE INDEX myindex &&& USING GIST ON mytable (geom gist_geometry_ops_nd); CREATE INDEX myindex USING GIST ON mytable (geog);

61 Mysterious Emptiness

62 philosophy nerd says life is emptiness

63 ST_Intersection(A, B) A B

64 ST_Intersection(A, B) POLYGON EMPTY is not NULL

65 ST_Union(C, ST_Intersection(A, B)) A C B

66 ST_Union(C, POLYGON EMPTY) C

67 GEOMETRY EMPTY Intersection of disjoint objects Simplification using tolerance larger than the object Negative buffering using radius larger than the object Differencing larger object from smaller

68 More Unpredictable Performance

69 GIS nerd says

70 Overlay

71 SELECT a.id, b.id, ST_Intersection(a.geom, b.geom) FROM a, b WHERE ST_Intersects(a.geom, b.geom);

72

73 SELECT a.id, b.id, CASE WHEN ST_Contains(a.geom, b.geom) THEN b.geom ELSE ST_Intersection(a.geom, b.geom) END AS geom FROM a, b WHERE ST_Intersects(a.geom, b.geom);

74 Prepared Geometry ST_Contains ST_ContainsProperly ST_Within ST_Covers ST_Intersects

75 1 Problem Many Solutions

76 philosophy nerd says when is a buffer not a buffer?

77 SELECT a.id, b.id FROM a, b WHERE ST_Intersects( a.geom, ST_Buffer(b.geom, 500) ); SELECT a.id, b.id FROM a, b WHERE ST_Distance(a.geom, b.geom) < 500; SELECT a.id, b.id FROM a, b WHERE ST_DWithin(a.geom, b.geom, 500);

78 CREATE OR REPLACE FUNCTION ST_DWithin(geom1 geometry, geom2 geometry, float8) RETURNS boolean AS 'SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3)' LANGUAGE 'sql' IMMUTABLE;

79 Raster Disaster

80

81

82

83 Hidden Features

84 SET postgis.backend = geos ; SET postgis.backend = sfcgal ;

85 ST_3DIntersection ST_Tesselate ST_3DArea ST_Extrude ST_ForceLHR ST_Orientation ST_Minkowski ST_StraightSkeleton

86 New to 2.2! ST_ApproximateMedialAxis()

87 CREATE EXTENSION postgis_sfcgal; CREATE EXTENSION postgis_tiger_geocoder; CREATE EXTENSION postgis_topology; CREATE EXTENSION postgis_raster;

88 Even More Hidden Features

89 github.com/pgpointcloud

90 pgrouting.org pgrouting: A Practical Guide

91 Honestly, I have no idea why it works like that...

92 Paul Ramsey PostGIS Gotchas The Things You Didn't Know That Lead to Confusion and Dismay

Zev Ross President, ZevRoss Spatial Analysis

Zev Ross President, ZevRoss Spatial Analysis SPATIAL ANALYSIS IN R WITH SF AND RASTER Buffers and centroids Zev Ross President, ZevRoss Spatial Analysis Use a projected coordinate reference system for spatial analysis As a general rule your layers

More information

W W W. R E F R A C T I O N S. N E T. Tips for the PostGIS Power User

W W W. R E F R A C T I O N S. N E T. Tips for the PostGIS Power User Tips for the PostGIS Power User Topics PostGIS functions Geometry constructors / deconstructors accessors / spatial predicates Walk through a few examples. DE-9IM Fine-tuning spatial predicates PostgreSQL

More information

Zev Ross President, ZevRoss Spatial Analysis

Zev Ross President, ZevRoss Spatial Analysis SPATIAL ANALYSIS IN R WITH SF AND RASTER A quick refresher on the coordinate Zev Ross President, ZevRoss Spatial Analysis reference system Coordinate reference system A place on the earth is specified

More information

Creating Geo model from Live HANA Calculation View

Creating Geo model from Live HANA Calculation View Creating Geo model from Live HANA Calculation View This document provides instructions for how to prepare a calculation view on a live HANA system with location dimensions for use in the SAP Analytics

More information

LIDAR in PostgreSQL with PointCloud

LIDAR in PostgreSQL with PointCloud LIDAR in PostgreSQL with PointCloud Paul Ramsey Over the past 5 months, I have been working on the building blocks for storing LIDAR data in PostgreSQL, and leveraging it for analysis

More information

Zev Ross President, ZevRoss Spatial Analysis

Zev Ross President, ZevRoss Spatial Analysis SPATIAL ANALYSIS IN R WITH SF AND RASTER Welcome! Zev Ross President, ZevRoss Spatial Analysis Packages we will use in this course Two key packages sf for vectors raster for grids Additional packages discussed

More information

Netezza Spatial Package Reference Guide

Netezza Spatial Package Reference Guide IBM Netezza Analytics Release 3.0.0 Netezza Spatial Package Reference Guide Part Number 00J2350-03 Rev. 2 Note: Before using this information and the product that it supports, read the information in "Notices

More information

Introduction to the Dimensionally Extended 9 Intersection Model (DE-9IM) in PostgreSQL/PostGIS Tutorial

Introduction to the Dimensionally Extended 9 Intersection Model (DE-9IM) in PostgreSQL/PostGIS Tutorial Introduction to the Dimensionally Extended 9 Intersection Model (DE-9IM) in PostgreSQL/PostGIS Tutorial Germán Carrillo gcarrillo@uni-muenster.de geotux_tuxman@linuxmail.org Objectives Following this tutorial

More information

GEOGRAPHIC INFORMATION SYSTEMS Lecture 02: Feature Types and Data Models

GEOGRAPHIC INFORMATION SYSTEMS Lecture 02: Feature Types and Data Models GEOGRAPHIC INFORMATION SYSTEMS Lecture 02: Feature Types and Data Models Feature Types and Data Models How Does a GIS Work? - a GIS operates on the premise that all of the features in the real world can

More information

Application Development in Web Mapping 2.

Application Development in Web Mapping 2. University of West Hungary, Faculty of Geoinformatics László Kottyán Application Development in Web Mapping 2. module ADW2 Spatial Data Storage SZÉKESFEHÉRVÁR 2010 The right to this intellectual property

More information

What to expect from MySQL 8.0?

What to expect from MySQL 8.0? What to expect from MySQL 8.0? Norvald H. Ryeng Software Engineer FOSDEM 2017 Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes

More information

BRIN indexes on geospatial databases

BRIN indexes on geospatial databases BRIN indexes on geospatial databases www.2ndquadrant.com ~$ whoami Giuseppe Broccolo, PhD PostgreSQL & PostGIS consultant @giubro gbroccolo7 gbroccolo gemini 81 giuseppe.broccolo@2ndquadrant.it Indexes

More information

Spatial Data in MySQL 8.0

Spatial Data in MySQL 8.0 Spatial Data in MySQL 8.0 Norvald H. Ryeng Software Engineer Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and

More information

Raster Data. James Frew ESM 263 Winter

Raster Data. James Frew ESM 263 Winter Raster Data 1 Vector Data Review discrete objects geometry = points by themselves connected lines closed polygons attributes linked to feature ID explicit location every point has coordinates 2 Fields

More information

PROCESSING ZOOPLA HISTORIC DATA

PROCESSING ZOOPLA HISTORIC DATA Number of Adverts PROCESSING ZOOPLA HISTORIC DATA Rod Walpole Scientific Computing Officer Urban Big Data Centre Zoopla has over 27 million residential property records in their archive although only a

More information

Topic #1: Rasterization (Scan Conversion)

Topic #1: Rasterization (Scan Conversion) Topic #1: Rasterization (Scan Conversion) We will generally model objects with geometric primitives points, lines, and polygons For display, we need to convert them to pixels for points it s obvious but

More information

Package skm. January 23, 2017

Package skm. January 23, 2017 Type Package Title Selective k-means Version 0.1.5.4 Author Guang Yang Maintainer Guang Yang Package skm January 23, 2017 Algorithms for solving selective k-means problem, which is

More information

Clipping and Scan Conversion

Clipping and Scan Conversion 15-462 Computer Graphics I Lecture 14 Clipping and Scan Conversion Line Clipping Polygon Clipping Clipping in Three Dimensions Scan Conversion (Rasterization) [Angel 7.3-7.6, 7.8-7.9] March 19, 2002 Frank

More information

This talk discusses point clouds, the Pointcloud extension for storing point clouds in PostgreSQL, and the LOPoCS lightweight server for streaming

This talk discusses point clouds, the Pointcloud extension for storing point clouds in PostgreSQL, and the LOPoCS lightweight server for streaming Point clouds in PostgreSQL: store and publish This talk discusses point clouds, the Pointcloud extension for storing point clouds in PostgreSQL, and the LOPoCS lightweight server for streaming point clouds

More information

Zonal Statistics in PostGIS a Tutorial

Zonal Statistics in PostGIS a Tutorial 2014 Brian J McGill. You are welcome to link to this tutorial but not copy or repost. Feedback is welcome and should be sent to mail AT brianmcgill DOT org Zonal Statistics in PostGIS a Tutorial Zonal

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

More information

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling Clipping & Culling Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling Lecture 11 Spring 2015 What is Clipping? Clipping is a procedure for spatially partitioning geometric primitives,

More information

2 Creating Vector Layers. 2.1 Creation of tables of PostgreSQL with geometry column for PostGIS

2 Creating Vector Layers. 2.1 Creation of tables of PostgreSQL with geometry column for PostGIS 2 Creating Vector Layers 2.1 Creation of tables of PostgreSQL with geometry column for PostGIS 2.2 Adding columns to tables of PostgreSQL through PostGIS connection from QGIS Premise: PostgreSQL user name=

More information

Announcements. Data Sources a list of data files and their sources, an example of what I am looking for:

Announcements. Data Sources a list of data files and their sources, an example of what I am looking for: Data Announcements Data Sources a list of data files and their sources, an example of what I am looking for: Source Map of Bangor MEGIS NG911 road file for Bangor MEGIS Tax maps for Bangor City Hall, may

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Final Projects Proposals due Thursday 4/8 Proposed project summary At least 3 related papers (read & summarized) Description of series of test cases Timeline & initial task assignment The Traditional Graphics

More information

Rasterization, or What is glbegin(gl_lines) really doing?

Rasterization, or What is glbegin(gl_lines) really doing? Rasterization, or What is glbegin(gl_lines) really doing? Course web page: http://goo.gl/eb3aa February 23, 2012 Lecture 4 Outline Rasterizing lines DDA/parametric algorithm Midpoint/Bresenham s algorithm

More information

Rasterization. MIT EECS Frédo Durand and Barb Cutler. MIT EECS 6.837, Cutler and Durand 1

Rasterization. MIT EECS Frédo Durand and Barb Cutler. MIT EECS 6.837, Cutler and Durand 1 Rasterization MIT EECS 6.837 Frédo Durand and Barb Cutler MIT EECS 6.837, Cutler and Durand 1 Final projects Rest of semester Weekly meetings with TAs Office hours on appointment This week, with TAs Refine

More information

UTM Geo Map APP Quick Start (Version 1.2)

UTM Geo Map APP Quick Start (Version 1.2) UTM Geo Map APP Quick Start (Version 1.2) Measure Points (Marker) You can measure points of coordinate base on GPS or position on the Maps and save marker into database for unlimited number using Real-time

More information

layers in a raster model

layers in a raster model layers in a raster model Layer 1 Layer 2 layers in an vector-based model (1) Layer 2 Layer 1 layers in an vector-based model (2) raster versus vector data model Raster model Vector model Simple data structure

More information

Poom Malakul Na Ayudhya

Poom Malakul Na Ayudhya DataClient 1.0.6 Manual By Poom Malakul Na Ayudhya pmalakul@gmail.com (Under Development) Page 1 Contents 1. Introduction 2. Installation 2.1. Knowledge Requirements 2.2. Software Requirements 2.3. DataClient

More information

Announcements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics

Announcements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics Announcements Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class 1 Scan Conversion Overview of Rendering Scan Conversion Drawing Lines Drawing Polygons

More information

The Traditional Graphics Pipeline

The Traditional Graphics Pipeline Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

More information

Microsoft TechNet Academy UPDATING YOUR SQL SERVER 2005 SKILLS TO

Microsoft TechNet Academy UPDATING YOUR SQL SERVER 2005 SKILLS TO Microsoft TechNet Academy UPDATING YOUR SQL SERVER 2005 SKILLS TO SQL SERVER 2008 SQL Server 2008 Security Enhancements Encrypting Databases SQL Server Audit Encrypting Databases Secure Data Scenarios

More information

Watershed Sciences 4930 & 6920 ADVANCED GIS

Watershed Sciences 4930 & 6920 ADVANCED GIS Slides by Wheaton et al. (2009-2014) are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License Watershed Sciences 4930 & 6920 ADVANCED GIS VECTOR ANALYSES Joe Wheaton

More information

Computer Graphics (CS 543) Lecture 9 (Part 2): Clipping. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics (CS 543) Lecture 9 (Part 2): Clipping. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics (CS 543) Lecture 9 (Part 2): Clipping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) OpenGL Stages After projection, several stages before objects drawn

More information

Rasterization: Geometric Primitives

Rasterization: Geometric Primitives Rasterization: Geometric Primitives Outline Rasterizing lines Rasterizing polygons 1 Rasterization: What is it? How to go from real numbers of geometric primitives vertices to integer coordinates of pixels

More information

Mapbox Vector Tile Specification 2.0. Blake Thompson - Software Engineer, Mapbox

Mapbox Vector Tile Specification 2.0. Blake Thompson - Software Engineer, Mapbox Mapbox Vector Tile Specification 2.0 Blake Thompson Software Engineer, Mapbox About Me Developer at OKC Mapbox Office Mapnik Node Mapnik Mapnik Vector Tile Author of Mapbox Vector Tile Specification Coffee

More information

1 Active Databases (3 points)

1 Active Databases (3 points) UNIVERSITE LIBRE DE BRUXELLES January 22, 203 Faculté des Sciences Appliquées INFO-H-45 Advanced Database Management Systems January Exam The exam is divided in four sections. All sub-questions are worth

More information

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 CSE 167: Introduction to Computer Graphics Lecture #9: Visibility Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 Announcements Midterm Scores are on TritonEd Exams to be

More information

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Clipping. Concepts, Algorithms for line clipping. 1 of 16. Andries van Dam. Clipping - 10/12/17

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Clipping. Concepts, Algorithms for line clipping. 1 of 16. Andries van Dam. Clipping - 10/12/17 Clipping Concepts, Algorithms for line clipping 1 of 16 Line Clipping in 2D Clipping endpoints If x min x x max and y min y y max, the point is inside the clip rectangle. Endpoint analysis for lines: if

More information

CSE 512 Course Project Operation Requirements

CSE 512 Course Project Operation Requirements CSE 512 Course Project Operation Requirements 1. Operation Checklist 1) Geometry union 2) Geometry convex hull 3) Geometry farthest pair 4) Geometry closest pair 5) Spatial range query 6) Spatial join

More information

Implementing ADQL in Postgres using PgSphere.

Implementing ADQL in Postgres using PgSphere. Implementing ADQL in Postgres using PgSphere. PgSphere is a free add-on to Postgres which extends the standard GIS capabilities of Postgres to geometric objects on a sphere. PgSphere was intended to address

More information

Les compétences du GéoDataScientist. Decryptageo 2017

Les compétences du GéoDataScientist. Decryptageo 2017 Les compétences du GéoDataScientist Decryptageo 2017 Neo Geographer Data Scientist Thick Database PostgreSQL SQL++ Datas FDW PostgreSQL SQL++ Pg Extensions Datas FDW PostgreSQL SQL++ Pg Extensions Datas

More information

Introducing the PostGIS Add-ons: An easy way to add functionality to PostGIS. Pierre Racine Research assistant GeoElucubrations

Introducing the PostGIS Add-ons: An easy way to add functionality to PostGIS. Pierre Racine Research assistant GeoElucubrations Introducing the PostGIS Add-ons: An easy way to add functionality to PostGIS Pierre Racine Research assistant GeoElucubrations The PostGIS Add-ons Contributing to PostGIS core is hard - Complex code with

More information

Beyond the B-Tree. Christophe thebuild.com pgexperts.com

Beyond the B-Tree. Christophe thebuild.com pgexperts.com Beyond the B-Tree Christophe Pettus @xof thebuild.com pgexperts.com Let us now praise famous data structures. Thanks, wikipedia. The B-Tree! Invented at Boeing Research Labs in 1971. Provides O(log n)

More information

Watershed Sciences 4930 & 6920 GEOGRAPHIC INFORMATION SYSTEMS

Watershed Sciences 4930 & 6920 GEOGRAPHIC INFORMATION SYSTEMS Watershed Sciences 4930 & 6920 GEOGRAPHIC INFORMATION SYSTEMS WATS 4930/6920 WHERE WE RE GOING WATS 6915 welcome to tag along for any, all or none WEEK FIVE Lecture VECTOR ANALYSES Joe Wheaton HOUSEKEEPING

More information

Understanding and Using Geometry, Projections, and Spatial Reference Systems in ArcGIS. Rob Juergens, Melita Kennedy, Annette Locke

Understanding and Using Geometry, Projections, and Spatial Reference Systems in ArcGIS. Rob Juergens, Melita Kennedy, Annette Locke Understanding and Using Geometry, Projections, and Spatial Reference Systems in ArcGIS Rob Juergens, Melita Kennedy, Annette Locke Introduction We want to give you a basic understanding of geometry and

More information

MySQL Worst Practices. Introduction. by Jonathan Baldie

MySQL Worst Practices. Introduction. by Jonathan Baldie MySQL Worst Practices by Jonathan Baldie Introduction MySQL and MariaDB are two of the most popular database engines in the world. They re rightly chosen for their speed potential, portability, and the

More information

Find your neighbours

Find your neighbours Find your neighbours Open Source Days 2012 Copenhagen, Denmark Magnus Hagander magnus@hagander.net PRODUCTS CONSULTING APPLICATION MANAGEMENT IT OPERATIONS SUPPORT TRAINING What's a neighbour Closest location

More information

Teradata Database. SQL Geospatial Types

Teradata Database. SQL Geospatial Types Teradata Database SQL Geospatial Types Release 13.0 B035-1181-098A March 2010 The product or products described in this book are licensed products of Teradata Corporation or its affiliates. Teradata, BYNET,

More information

PostgreSQL/PostGIS: Introduction

PostgreSQL/PostGIS: Introduction PostgreSQL/PostGIS: Introduction Introduction PostgreSQL A standards-compliant SQL-based database server with which a wide variety of client applications can communicate Server software generally, but

More information

5 Extract the information of location from the geometry column of PostgreSQL table

5 Extract the information of location from the geometry column of PostgreSQL table 5 Extract the information of location from the geometry column of PostgreSQL table Open QGIS and load PostGIS layer buildings and the raster layer Tai_wide_G (optional just to show the basemap). 1 Click

More information

Students received individual feedback throughout year on assignments.

Students received individual feedback throughout year on assignments. ACS108 No exam. Students received individual feedback throughout year on assignments. ACS123 In general, during ACS123 exam session, students have shown satisfactory performance, clear understanding of

More information

Multidimensional Data and Modelling - DBMS

Multidimensional Data and Modelling - DBMS Multidimensional Data and Modelling - DBMS 1 DBMS-centric approach Summary: l Spatial data is considered as another type of data beside conventional data in a DBMS. l Enabling advantages of DBMS (data

More information

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016 Accelerating Geometric Queries Computer Graphics CMU 15-462/15-662, Fall 2016 Geometric modeling and geometric queries p What point on the mesh is closest to p? What point on the mesh is closest to p?

More information

RAY-TRACING WITH UNIFORM SPATIAL DIVISION:PRACTICE

RAY-TRACING WITH UNIFORM SPATIAL DIVISION:PRACTICE RAY-TRACING WITH UNIFORM SPATIAL DIVISION:PRACTICE PROGRAMAÇÃO 3D MEIC/IST PROF. JOÃO MADEIRAS PEREIRA Bibliography Chapter 22, Ray-Tracing From The Ground Up ; Kevin Suffern, including images Articles:

More information

Time series plots and phase plane plots Graphics

Time series plots and phase plane plots Graphics Time series plots and phase plane plots Graphics Feb. 4, 2009 Graphics for Scientific/Technical Computation Line Plots Contour Plots Surface Plots What type of plots do we want?... - Time series plots

More information

Geographic Information Technologies for analysing the digital footprint of tourists

Geographic Information Technologies for analysing the digital footprint of tourists Geographic Information Technologies for analysing the digital footprint of tourists Toni Hernández, Rosa Olivella, Josep Sitjar, Lluís Vicens University of Girona SIGTE Pl. Ferrater Mora, 1 17071 Girona

More information

Zenful Maps with SQL. Matthew Basanta Paul Vidal

Zenful Maps with SQL. Matthew Basanta Paul Vidal Zenful Maps with SQL Matthew Basanta Paul Vidal Get out your smartphone http://goo.gl/lvnql Just go to the website, don't do anything yet Introductions Matthew Basanta Paul Vidal Overview Designing for

More information

Project #2: A 3-Tiered Airport Lookup Service Using RPC

Project #2: A 3-Tiered Airport Lookup Service Using RPC Project #2: A 3-Tiered Airport Lookup Service Using RPC 1. Objective Your assignment is to write a 3-tiered client-server program. The program will consist of three components: a client, a places server,

More information

Chapter 8: Implementation- Clipping and Rasterization

Chapter 8: Implementation- Clipping and Rasterization Chapter 8: Implementation- Clipping and Rasterization Clipping Fundamentals Cohen-Sutherland Parametric Polygons Circles and Curves Text Basic Concepts: The purpose of clipping is to remove objects or

More information

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University Ray Tracing III Wen-Chieh (Steve) Lin National Chiao-Tung University Shirley, Fundamentals of Computer Graphics, Chap 10 Doug James CG slides, I-Chen Lin s CG slides Ray-tracing Review For each pixel,

More information

732A54 - Big Data Analytics Lab compendium

732A54 - Big Data Analytics Lab compendium Description and Aim 732A54 - Big Data Analytics Lab compendium (Spark and Spark SQL) In the lab exercises you will work with the historical meteorological data from the Swedish Meteorological and Hydrological

More information

CS 130 Exam I. Fall 2015

CS 130 Exam I. Fall 2015 CS 130 Exam I Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is

More information

Final projects. Rasterization. The Graphics Pipeline. Illumination (Shading) (Lighting) Viewing Transformation. Rest of semester. This week, with TAs

Final projects. Rasterization. The Graphics Pipeline. Illumination (Shading) (Lighting) Viewing Transformation. Rest of semester. This week, with TAs Rasterization MIT EECS 6.837 Frédo Durand and Barb Cutler MIT EECS 6.837, Cutler and Durand Final projects Rest of semester Weekly meetings with TAs Office hours on appointment This week, with TAs Refine

More information

Vector-Based GIS Data Processing. Chapter 6

Vector-Based GIS Data Processing. Chapter 6 Vector-Based GIS Data Processing Chapter 6 Vector Data Model Feature Classes points lines polygons Layers limited to one class of data Figure p. 186 Vector Data Model Shapefiles ArcView non-topological

More information

Solutions for Exercise no. 6

Solutions for Exercise no. 6 Solutions for Exercise no. 6 5.04.017 1 Geodistance Function In this task the goal is to implement a user defined function (UDF) to compute the distance (in kilometers) between two GPS coordinates. In

More information

GeoSpark SQL: An Effective Framework Enabling Spatial Queries on Spark

GeoSpark SQL: An Effective Framework Enabling Spatial Queries on Spark International Journal of Geo-Information Article Geo : An Effective Framework Enabling Spatial Queries on Zhou Huang,2 ID, Yiran Chen, Lin Wan 3 Xia Peng 4,5, * Institute of Remote Sensing & GIS, Peking

More information

CS488. Visible-Surface Determination. Luc RENAMBOT

CS488. Visible-Surface Determination. Luc RENAMBOT CS488 Visible-Surface Determination Luc RENAMBOT 1 Visible-Surface Determination So far in the class we have dealt mostly with simple wireframe drawings of the models The main reason for this is so that

More information

Applied Databases. Sebastian Maneth. Lecture 9 Spacial Queries and Indexes. University of Edinburgh - February 13th, 2017

Applied Databases. Sebastian Maneth. Lecture 9 Spacial Queries and Indexes. University of Edinburgh - February 13th, 2017 Applied Databases Lecture 9 Spacial Queries and Indexes Sebastian Maneth University of Edinburgh - February 13th, 2017 2 Outline 1. Assignment 2 2. Spatial Types 3. Spatial Queries 4. R-Trees 3 Assignment

More information

Well Unknown ID AKA EPSG: 3857

Well Unknown ID AKA EPSG: 3857 Well Unknown ID AKA EPSG: 3857 Pamela Kanu November 2016 WGS 1984 WEB MERCATOR ALIASES: AUXILIARY SPHERE, WKID: 3857, WKID: 102100, WKID: 102113, SHERICAL MERCATOR, WGS 84/PSEUDO-MERCATOR, OPEN LAYERS:

More information

BigData And the Zoo. Mansour Raad Federal GIS Conference 2014

BigData And the Zoo. Mansour Raad Federal GIS Conference 2014 Federal GIS Conference 2014 February 10 11, 2014 Washington DC BigData And the Zoo Mansour Raad http://thunderheadxpler.blogspot.com/ mraad@esri.com @mraad What is BigData? Big data is like teenage sex:

More information

Spatial Databases by Open Standards and Software 3.

Spatial Databases by Open Standards and Software 3. Spatial Databases by Open Standards and Software 3. Gábor Nagy Spatial Databases by Open Standards and Software 3.: Advanced features in PostgreSQL Gábor Nagy Lector: Zoltán Siki This module was created

More information

Brief Contents. Foreword by Sarah Frostenson...xvii. Acknowledgments... Introduction... xxiii. Chapter 1: Creating Your First Database and Table...

Brief Contents. Foreword by Sarah Frostenson...xvii. Acknowledgments... Introduction... xxiii. Chapter 1: Creating Your First Database and Table... Brief Contents Foreword by Sarah Frostenson....xvii Acknowledgments... xxi Introduction... xxiii Chapter 1: Creating Your First Database and Table... 1 Chapter 2: Beginning Data Exploration with SELECT...

More information

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li. Fall 2015 CSCI 420: Computer Graphics 7.1 Rasterization Hao Li http://cs420.hao-li.com 1 Rendering Pipeline 2 Outline Scan Conversion for Lines Scan Conversion for Polygons Antialiasing 3 Rasterization

More information

Geo-processing using Oracle Spatial Geo Database

Geo-processing using Oracle Spatial Geo Database International Journal of Scientific & Engineering Research Volume 3, Issue 4, April-2012 1 Geo-processing using Oracle Spatial Geo Database 1 Manoj Pandya, 1 Pooja Nair, 1 Parthi Gandhi, 1 Shubhada Pareek,

More information

Occluder Simplification using Planar Sections

Occluder Simplification using Planar Sections Occluder Simplification using Planar Sections Ari Silvennoinen Hannu Saransaari Samuli Laine Jaakko Lehtinen Remedy Entertainment Aalto University Umbra Software NVIDIA NVIDIA Aalto University Coping with

More information

2D Image Synthesis. 2D image synthesis. Raster graphics systems. Modeling transformation. Vectorization. u x u y 0. o x o y 1

2D Image Synthesis. 2D image synthesis. Raster graphics systems. Modeling transformation. Vectorization. u x u y 0. o x o y 1 General scheme of a 2D CG application 2D Image Synthesis Balázs Csébfalvi modeling image synthesis Virtual world model world defined in a 2D plane Department of Control Engineering and Information Technology

More information

Georeferencing Protocol KUMIP

Georeferencing Protocol KUMIP Georeferencing Protocol KUMIP Setting up in Specify 1) Go to Edit>Preferences in the Specify menu at the top and make sure that your GEOLocate preferences are correct. They should look like this: 2) Import

More information

Review of Cartographic Data Types and Data Models

Review of Cartographic Data Types and Data Models Review of Cartographic Data Types and Data Models GIS Data Models Raster Versus Vector in GIS Analysis Fundamental element used to represent spatial features: Raster: pixel or grid cell. Vector: x,y coordinate

More information

Yandex.Maps API Background theory

Yandex.Maps API Background theory 8.02.2018 .. Version 1.0 Document build date: 8.02.2018. This volume is a part of Yandex technical documentation. Yandex helpdesk site: http://help.yandex.ru 2008 2018 Yandex LLC. All rights reserved.

More information

APGDO for SQLServer Native Quickreference

APGDO for SQLServer Native Quickreference APGDO for SQLServer Native Quickreference APGDO for SQLServer Native Quickreference Raum- und Regionalplanung Regionsmanagement GIS Technologie APGDO for SQLServer Native is a GeoMedia Dataserver for SQLServer

More information

Overview of the EMF Refresher Webinar Series. EMF Resources

Overview of the EMF Refresher Webinar Series. EMF Resources Overview of the EMF Refresher Webinar Series Introduction to the EMF Working with Data in the EMF viewing & editing Inventory Data Analysis and Reporting 1 EMF User's Guide EMF Resources http://www.cmascenter.org/emf/internal/guide.html

More information

Border Patrol. Shingo Murata Swarthmore College Swarthmore, PA

Border Patrol. Shingo Murata Swarthmore College Swarthmore, PA Border Patrol Shingo Murata Swarthmore College Swarthmore, PA 19081 smurata1@cs.swarthmore.edu Dan Amato Swarthmore College Swarthmore, PA 19081 damato1@cs.swarthmore.edu Abstract We implement a border

More information

MS2. Modern Traffic Analytics ms2soft.com

MS2. Modern Traffic Analytics ms2soft.com MS2 ms2soft.com Updated: October 31, 2014 The Traffic Crash Location System (TCLS) was designed to manage all crash statistics and crash events within a designated area. This guide is intended for users

More information

Teradata Database. SQL Geospatial Types

Teradata Database. SQL Geospatial Types Teradata Database SQL Geospatial Types Release 15.0 B035-1181-015K June 2014 The product or products described in this book are licensed products of Teradata Corporation or its affiliates. Teradata, Active

More information

Defined by coordinate Defined by coordinate. meaning, but is required for comparisons

Defined by coordinate Defined by coordinate. meaning, but is required for comparisons Developer s Guide to Native Spatial Types y SQL Server Tony Wakim Shannon Shields Topics Introduction to SQL Server spatial types Geometry and Geography Using geography & geometry data Integration with

More information

Section 1.6. Inverse Functions

Section 1.6. Inverse Functions Section 1.6 Inverse Functions Important Vocabulary Inverse function: Let f and g be two functions. If f(g(x)) = x in the domain of g and g(f(x) = x for every x in the domain of f, then g is the inverse

More information

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics. Bing-Yu Chen National Taiwan University Computer Graphics Bing-Yu Chen National Taiwan University Visible-Surface Determination Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm Scan-Line Algorithm

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie

More information

Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N 1d range search line segment intersection kd trees interval search trees rectangle intersection R O B E R T S E D G E W I C K K E V I

More information

Database documentation

Database documentation Database documentation for Deepwater commercial database dw_cdb David Fisher based on Draft documentation by Ralph Coburn NIWA Fisheries Data Management Database Documentation Series Postgres Version 2.1

More information

Introduction to GIS. Geographic Information Systems SOCR-377 9/24/2015. R. Khosla Fall Semester The real world. What in the world is GIS?

Introduction to GIS. Geographic Information Systems SOCR-377 9/24/2015. R. Khosla Fall Semester The real world. What in the world is GIS? Introduction to GIS Geographic Information Systems SOCR-377 What in the world is GIS? GIS is simultaneously the telescope, the microscope, the computer and the Xerox machine of regional analysis and synthesis

More information

6 Attribute actions to vector layer

6 Attribute actions to vector layer 6 Attribute actions to vector layer QGIS can perform an action based on the attributes of a feature. The actions, for example, running a program with arguments built from the attributes or passing parameters

More information

CS/ENGRD 2110 FALL Lecture 7: Interfaces and Abstract Classes

CS/ENGRD 2110 FALL Lecture 7: Interfaces and Abstract Classes CS/ENGRD 2110 FALL 2017 Lecture 7: Interfaces and Abstract Classes http://courses.cs.cornell.edu/cs2110 1 Announcements 2 A2 is due tomorrow night (17 February) Get started on A3 a method every other day.

More information

GIS in the Social and Natural Sciences. Last Lecture. Today s Outline 5/14/2017. GEOG 4110/5100 Special Topics in Geography

GIS in the Social and Natural Sciences. Last Lecture. Today s Outline 5/14/2017. GEOG 4110/5100 Special Topics in Geography GEOG 4110/5100 Special Topics in Geography GIS in the Social and Natural Sciences Working with Vector Data in a GIS Last Lecture We talked about the main types of vector data models (CDS, TDS, TIN, Networks)

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Using imapinvasives Custom Query Tools

Using imapinvasives Custom Query Tools Using imapinvasives Custom Query Tools imapinvasives includes a custom query tool for searching observation records. There are two versions of the custom query tool: 1) The Map Query Tool is accessible

More information

Using Free and Open Source GIS to Automatically Create Standards- Based Spatial Metadata

Using Free and Open Source GIS to Automatically Create Standards- Based Spatial Metadata Using Free and Open Source GIS to Automatically Create Standards- Based Spatial Metadata Claire Ellul University College London Overview The Problem with Metadata Automation Results Further Work The Problem

More information