introduction to geographic data technologyrowlings/Teaching/OSgeo/Jun2010/... · (FDO),...

Preview:

Citation preview

Carson J. Q. FarmerNational Centre for Geocomputation

National University of Ireland Maynooth

introduction to geographic data technology

coordinates & projections

Need data Need spatial data Need to represent spatial data

Spatial Data = Spatial (Where) + Data (What)

Need coordinate reference systems

coordinates & projections

Disease Occurrence

coordinates & projections

British National Grid Universal Polar Stereographic

State Plane Coordinates

Universal Transverse Mercator

World Geographic Reference System Latitude, Longitude, Height

BC Albers

Jamaica National Grid

Irish National Grid

E

AS

E G

rid G

lob

al

Brazilian Polyconic

Briti

sh N

ational G

rid

Universal Polar Stereographic

State Plane Coordinates

World

Geographic Reference System

Latitu

de, Longitu

de, Height

BC Albers

Jamaica National Grid

Irish National G

rid

E

AS

E G

rid G

loba

l British National Grid Universal Polar Stereographic State Plane Coordinates

World Geographic Reference System

Latitude, Longitude, Height

BC Albers

Jamaica National Grid

Irish National Grid

E

AS

E G

rid G

loba

l

British National Grid Universal Polar Stereographic

State Plane Coordinates World Geographic Reference System

Latitude, Longitude, Height BC Albers

Jamaica National Grid

Irish National Grid

EASE Grid Global

coordinates & projections

Galactic Coordinate SystemGalactic Coordinate System

coordinates & projections

Everyone has their own Major consequences

Make sure we use the right one

coordinates & projections

coordinates & projections

Because issues occur when you use the wrong coordinate systems...

European Petroleum Survey Group (EPSG) Database

EPSG 4326 - WGS84

coordinates & projections

coordinates & projections

One step further...

...also have map projections

Project coordinates onto flat surface

coordinates & projections

coordinates & projections

Not all that exciting...

… but important!

Essential when working with spatial data

http://linfiniti.com/dla/

http://www.progonos.com/furuti/MapProj/Normal/TOC/cartTOC.html

http://www.kartografie.nl/geometrics/Map%20projections/mappro.html

http://www.sharpgis.net/post/2007/05/05/Spatial-references2c-coordinate-systems2c-projections2c-datums2c-ellipsoids-e28093-confusing.aspx

coordinates & projections

A coordinate reference system (CRS) defines how the 2D projected map in your GIS is related to real places on the earth

Map projections portray surface of earth on a flat surface such as a computer screen

Which map projection and coordinate reference system to use? Regional extent Type of analysis Availability of data

coordinates & projections

Since we all have to do this...

… OCG has a standard WKT (Well-Known Text) Represent coordinate reference systems and

projections...

… and much more!

coordinates & projections

COMPD_CS["OSGB36 / British National Grid + ODN", PROJCS["OSGB 1936 / British National Grid", GEOGCS["OSGB 1936", DATUM["OSGB_1936", SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]], TOWGS84[375,-111,431,0,0,0,0], AUTHORITY[["EPSG","6277"]], PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]], UNIT["DMSH",0.0174532925199433,AUTHORITY["EPSG","9108"]], AXIS["Lat",NORTH], AXIS["Long",EAST], AUTHORITY[["EPSG","4277"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",49], PARAMETER["central_meridian",-2], PARAMETER["scale_factor",0.999601272], PARAMETER["false_easting",400000], PARAMETER["false_northing",-100000], UNIT["metre",1,AUTHORITY["EPSG","9001"]], AXIS["E",EAST], AXIS["N",NORTH], AUTHORITY[["EPSG","27700"]], VERT_CS["Newlyn", VERT_DATUM["Ordnance Datum Newlyn",2005,AUTHORITY["EPSG","5101"]], UNIT["metre",1,AUTHORITY["EPSG","9001"]], AXIS["Up",UP], AUTHORITY[["EPSG","5701"]], AUTHORITY[["EPSG","7405"]]

coordinates & projections

Spatial Data = Spatial (Where) + Data (What)

spatial data

How do we specify spatial data?

Point(10 10)LineString(10 10,20 20, 30 40, 50 50)

Polygon((10 10, 10 20, 20 20, 20 15, 10 10),(14 14, 16 16, 14 16, 14 14))

MultiPolygon(  ((10 10, 10 20,     20 20, 20 15,    10 10)),  ((60 60, 70 70,    80 60, 60 60 ))            )

OGC Simple Features Specification WKT representation

spatial data

Spatial Data = Spatial (Where) + Data (What)

spatial data

Spatial data can also have attributes...

ID Name County1 123323

2 4434243Delta City Echo County 332424

4 443265

5 453522

PopnAlphaton BravoshireCharlieville Bravoshire

Foxtrotham GolfshireHotellington Golfshire

spatial data

spatial data

We can also represent topology Relationships between features

1

2

3

45

6

7

8

9

10

11

12

AB

C

D

E

FG

H

J

K

L

ID FROM TO NAMEA 2 1B 9 2 BarC 3 2D 4 3E 5 3F 6 7G 8 7 BarH 7 9 BarJ 11 9K 10 11L 12 11 Boo

Foo

FooFooBazQux

FnordFnord

spatial data

Spatial Data = Spatial (Where) + Data (What)

spatial data

Simple features

Vector data (points, lines, polygons)

Continuous across an area Cannot be divided into vector features

Grid, Surface or Raster data?

spatial data

spatial data

spatial data

spatial data

spatial data

Spatial Data = Spatial (Where) + Data (What)

spatial data

We know the size of the raster cells We know how many cells there are (X and Y) If we know where the corners are...

… we can georeference the image(s)!

This is where the spatial information comes in

spatial data

Spatial Data = Spatial (Where) + Data (What)

spatial data

data formats

Different types of data...

...different formats to store the data

Each piece of software seems to have it's own

We have standards...

data formats

Spatial data often represented using text files Comma separated Fixed width

x, y, z-84.735102, 10.460482, 5-84.735102, 10.460480, 2-84.735089, 10.460476, 1...

data formats

One your also likely familiar with Shape files

Spatial data Attribute data Linking information + CRS info (optional)

data formats

Keyhole Markup Language (KML) XML­based language schema for geographic

annotation and visualization Designed for existing or future Web-based 2D maps

and 3-D Earth browsers Developed for Google Earth (originally Keyhole

Earth Viewer)

International standard of the OGC Editable and readable by many software

data formats

Set of features (placemarks, images, polygons, 3D models, textual descriptions, etc.)

Always has a longitude and a latitude Can also have an altitude

<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2"><Document><name>Example field data points</name><Placemark><Point><coordinates>-84.735102277,10.460481773,10</coordinates></Point></Placemark> ...

data formats

Very few spatial data formats support the concept of time

KML supports animation, time stamps, time spans, network updates, and automated map updates

KML specifies what a placemark looks like an where it is located at a specific time A series of placemarks with successive time

stamps creates an animated feature

data formats

Altitude/elevation 3-D data... Plus time... ... 4-D!

data formats

Tonnes of Vector file formats out there...

… you might work with something completely different

… application specific GML variants:

CityGML: urban building information CSML: climate science SensorML: e.g. weather stations CAAML: avalanche info

data formats

Not enough to have just Vector data! Simple text files work for raster as well... ESRI grid format

NCOLS 25NROWS 24CELLSIZE 0.224235189959909XLLCORNER 18.8810664560216YLLCORNER ­3.38649665480518NODATA_value  9999 ­1.250593 ­1.500031 ­1.639423 ­1.877894 ­1.794076 ­1.619600 ­1.633412­1.677679 ­1.689332 ­1.729044      9999 ­1.752160 ­1.594944 ­1.595511­1.535278 ­1.551935 ­1.415440 ­1.293648 ­1.927674 ­1.118678­0.9700323 ­0.972649 ­0.9765478 ­0.8378 ­0.760862 .....

data formats

Turn any image into spatial data! Create a simple text-based world file

+0.02906135575595600­0.023241262751094­0.48623558447952951.687950520516750

data formats

=

data formats

data formats

<?xml version="1.0" encoding="UTF­8"?><kml xmlns="http://www.opengis.net/kml/2.2">  <Folder>    <name>Map Test</name>    <description>Simple map overlay test</description>    <GroundOverlay>      <Icon>        <href>sample_image.png</href>      </Icon>      <LatLonBox>        <north>51.699571151892300 </north>        <south>51.3044696851236992 </south>        <east>0.3129516988092611 </east>        <west>­0.5007662623575070 </west>      </LatLonBox>    </GroundOverlay>  </Folder></kml>

data formats

GeoTIFF TIFF image with spatial information

OSGeo standard Has been talk of making an OGC standard

Multi­band support

data technologies

With all these data formats available...

...how do we use them all together?

data technologies

Geospatial Data Abstraction Library (GDAL)

And

OGR Simple Feature Library

OSGeo project read, write, convert, edit, access Raster and Vector

data technologies

3D DEM Viewer, Bluemapia, Cadcorp SIS, CatchmentSIM, Daylon Leveller, Demeter, Eonfusion, ESRI ArcGIS 9.2+, Feature Data Objects (FDO), flighttrack, FME, GdalToTiles, GeoDjango, GeoMatrix Toolkit, GeoServer, Google Earth, GRASS GIS, gstat, gvSIG, IDRISI, ILWIS, IONIC Red Spider, IntraMap, LandXplorer, Leica TITAN, libLAS, libra, MapGuide, Mapnik, MapServer, MapWindow, MicroImages, Mirone, ogr2gui, OpenEV, Orfeo Toolbox (OTB), OSSIM, PYXIS innovation, Quantum GIS (QGIS), R (rgdal package), ScanMagic, Scenomics: Software, SkylineGlobe, SpaceEyes3D, Carmenta Engine, StarSpan, TerraGo Technologies, Thuba, vGeo, Virtual Terrain Project

data technologies

3D DEM Viewer, Bluemapia, Cadcorp SIS, CatchmentSIM, Daylon Leveller, Demeter, Eonfusion, ESRI ArcGIS 9.2+, Feature Data Objects (FDO), flighttrack, FME, GdalToTiles, GeoDjango, GeoMatrix Toolkit, GeoServer, Google Earth, GRASS GIS, gstat, gvSIG, IDRISI, ILWIS, IONIC Red Spider, IntraMap, LandXplorer, Leica TITAN, libLAS, libra, MapGuide, Mapnik, MapServer, MapWindow, MicroImages, Mirone, ogr2gui, OpenEV, Orfeo Toolbox (OTB), OSSIM, PYXIS innovation, Quantum GIS (QGIS), R (rgdal package), ScanMagic, Scenomics: Software, SkylineGlobe, SpaceEyes3D, Carmenta Engine, StarSpan, TerraGo Technologies, Thuba, vGeo, Virtual Terrain Project

data technologies

GDAL & OGR written in C & C++ Libraries and Tools Can be used by other software Vector coordinate transformations 'Warp' raster images to different projections

data technologies

data technologies

data technologies

Files don't always cut it...

… Multiple users

… Single central data store

… Share Need data integrity

data technologies

Adds spatial functions to PostgreSQL

Access from most GIS

Keep spatial and non-spatial data in the same DB

Client-server model

data technologies

data technologies

Lightweight, but fully functional

Designed for personal geo-databases

Single-user Support building fast! Shapefile

replacement?

data technologies

Databases use SQL...

… to get tabular data

data technologies

Spatial databases use SQL...

… to get tabular data with geometry!

data technologies

The spatial information is stored in the_geom

data technologies

Can do spatial queries right in the database!

data technologies

OGC Web Feature Server & Web Map Server Purely spatial data Used for mapping

Gives use features (coordinates)

Gives us images (maps)

data technologies

Lots of different data sources Open source/standards Integrate data from multiple providers

New insights New maps New ideas Cool visualisations!

data technologies

introduction to geographic data technology

That's it from me! Apply some of these concepts...

Real data Real OS software Real food!