180 likes | 347 Views
Open Source Databases and GIS. Flexible Technologies for Flexible People. Open Source Databases. What Open Source Databases are there? MySQL PostgreSQL Berkeley DB mSQL SAP DB InterBase. Berkeley DB. Embedded database Widely used in software Sendmail Netscape Extremely fast
E N D
Open Source Databases and GIS Flexible Technologies for Flexible People
Open Source Databases • What Open Source Databases are there? • MySQL • PostgreSQL • Berkeley DB • mSQL • SAP DB • InterBase
Berkeley DB • Embedded database • Widely used in software • Sendmail • Netscape • Extremely fast • Only usable via language bindings • C, C++, TCL, Python • Commercially Supported • Sleepycat Software
MySQL • Most widely used OSDB • Very fast read access, good for web apps • SQL interface, ODBC, JDBC • Language bindings • C, C++, Perl, Python, TCL • Commercially supported • MySQL AB • NuSphere
PostgreSQL • Most extensible OSDB • Object relational design • ACID database • SQL interface, ODBC, JDBC • Language bindings • C, C++, Perl, Python, TCL • Commercially supported • PgSQL Inc • Red Hat (as Red Hat Database)
Why Not Oracle? • Complexity • OSDBs are relatively simple to install and administer • Overhead • OSDBs have a lighter system footprint • Cost • OSDBs have no licensing fees • Accessibility • OSDBs are not a black box
When to use an OSDB? • When it is organizationally appropriate • When you are accessing data using standard APIs • When you are building web based applications • When you are building deployable applications • When you control the architecture from end to end
Spatial Data and RDBMs • Spatial Databases • Spatial data and attributes reside together in the database • Complex hybrid queries are possibleselect area(forestpoly) from forestcover,history where forestcover.ageclass > 80 and history.restocking = true and forestcover.fid = history.fid and distance( forestcover.forestpoly, GeometryFromText(’POINT(514234,5019313)’,26910) ) < 500 • Very large seamless datasets can be stored • Unified data models are possible
Spatial Databases • Proprietary software • ArcSDE • DB2 Spatial • OracleSpatial • Open source software • PostGIS / PostgreSQL
PostGIS / PostgreSQL • Spatial database functionality in PostgreSQL • OpenGIS “Simple Features for SQL” (SFSQL) as design guide
PostGIS Objects • OpenGIS SFSQL Objects • POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION • OpenGIS SFSQL Representations • AsBinary() Well-Known Binary • AsText() Well-Known Text • POINT(-128 45) • MULTILINESTRING((-128 45,-128 46),(-130 50,-131 55))
PostGIS Functionality • Spatial indexing for all object types • R-Tree on GiST Index • Analysis functions • Area() • Length() • Distance() • Transform()
PostGIS Data Access • Loading / Dumping • Includes shp2pgsql and pgsql2shp utilities • OGR utility allows importing from multiple formats • E00Pg utility allows importing from E00 files • Java • Includes JDBC Extension Objects for Geometries • C/C++ • Using Well-Known Binary over the PostgreSQL C/C++ API
PostGIS Data Visualization • Internet mapping with Mapserver • PHP/Mapscript and PHP/PgSQL to build interactive web mapping applications • ArcIMS emulator with Mapserver to view PostGIS data within Arc8 • Java mapping with GeoTools • GeoTools has a beta PostGIS layer data source
City of Boston, USA Online property analysis internal web application Identify parcels which are proximate and display results using Mapserver Queensland, AustraliaDepartment of Natural Resources Forestry permitting internal web application Query database by attribute and return map of parcel area with supporting information from database PostGIS in the Real World (1)
I-Cubed Inc, USA Large automated image processing system Uses database to coordinate image processing functions, tracking spatial extents of incoming requests and required imagery and farming work out to client computers. Intevation Gmbh, Germany Massive multiplayer online game Players will have mobile devices (pagers, cell phones) and their position recorded in the database. Extraction and visualization tools will be used to visualize game play. PostGIS in the Real World (2)
Finnish Geodetic Institute Creating nationwide distributed GIS network using the GeoServer OpenGIS WFS with PostGIS as the database backend Refractions Research, Canada Maintaining the Digital Road Atlas, a richly attributed provincial road network. Geometries are integrated into a complex data model including versioning, network integrity, and multiple views of the data. PostGIS in the Real World (3)
In Conclusion • Open source databases have the capabilities to handle real world problems, and are in widespread use • Open source spatial databases (PostGIS) are new, but are already in use around the world • Many GIS database problems can now realistically be addressed with open source technology