Building an online tool for spatial joins
Download
1 / 28

Building an online tool for spatial joins using open source software Karsten Vennemann Seattle - PowerPoint PPT Presentation


  • 643 Views
  • Updated On :
  • Presentation posted in: Pets / Animals

Building an online tool for spatial joins using open source software Karsten Vennemann Seattle. Talk Overview Who, Why and What Tool Workflow Definitions and Examples Technical Background Resources. - - - - Why this tool ? What does it do ?

Related searches for Building an online tool for spatial joins using open source software Karsten Vennemann Seattle

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha

Download Presentation

Building an online tool for spatial joins using open source software Karsten Vennemann Seattle

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Building an online tool for spatial joinsusing open source software

Karsten VennemannSeattle


  • Talk Overview

  • Who, Why and What

  • Tool Workflow

  • Definitions and Examples

  • Technical Background

  • Resources

  • - - - - Why this tool ?

  • What does it do ?

  • - - - - Steps to retrieve results

  • - - - - Tool live demo

  • - - - - How does it work ?

  • - - - - How can you build your own ?

Building an online tool for spatial joins


Who, Why and What

Why this online tool ? Why open source software ?

Finding the Legal District in which a member of an organization lives is important information for many environmental voter advocacy groups. While this easily can be accomplished using commercial GIS tools, most of those Non-Profit organizations lack the resources and/or technical staff to support the use of such software.

Adding Legislative District information is usually done manually.In Washington State there is the online district finder tool available: http://apps.leg.wa.gov/DistrictFinder/Default.aspx

Can find single addresses

Building an online tool for spatial joins


Who, Why and What

  • About this tool

  • Windows and Linux server platforms

  • based on open source software

  • any type of spatial join based on street address in WA state (US) and a polygon layer

For simplicity we will focus on a technical overview onhow a web based tool can allow users

with little or no GIS knowledge to attach legislative district information for Washington State to their membership lists.

Building an online tool for spatial joins


Tool Workflow

  • Workflow for the tool can be broken up into four main parts

  • File upload to the server(text or Excel file containing address list via web interface)

  • Geocoding - Retrieval of coordinates (latitude/longitude) for the address (geocoded using 2006 Tiger line data, PHP and Perl)

  • Spatial Join - Matching the Legislative District information(Query onto a PostGIS Database)

  • 4) Transfer result information(streaming the results to the client computer text or MS Excel file)

Building an online tool for spatial joins


Tool Workflow

  • Workflow for the tool can be broken up into four main parts

  • File upload to the server(text or Excel file via web interface )

  • Geocoding - Retrieval of coordinates (latitude/longitude) for the address (geocoded using 2006 Tiger line data, PHP and Perl)

  • Spatial Join - Matching the Legislative District information(Query onto a PostGIS Database)

  • 4) Transfer result information(streaming the results to the client computer text or MS Excel file)

Building an online tool for spatial joins


Definitions and Examples

What is Geocoding ?Interpolation of real world coordinates for a given location

Most geocoders use address information to interpolate (estimate) the real world position along streets using blocks and intersections as landmarks

Variety of free tools available - most popular:Google and Yahoo maps API, geocoder.usAlso Tiger line geocoder for Post GIS=> Geocoder::US a Perl moduleOpen sourcecan download source code and install on your own serveruses Berkeley DB format to store Tiger data- high compression fro data - whole US Street data 750 MB (24 GB of uncompressed Tiger data)

Building an online tool for spatial joins


Definitions and Examples

What is a Spatial Join ?

A spatial join operation adds information based on the geographical location of one feature to another

Building an online tool for spatial joins


Definitions and Examples

Spatial Join

A spatial join operation adds information based on the geographical location of one feature to another

Building an online tool for spatial joins


Definitions and Examples

Spatial Join

A spatial join operation adds information based on the geographical location of one feature to another

Building an online tool for spatial joins


Definitions and Examples

Spatial Join

Building an online tool for spatial joins


Definitions and Examples

Spatial Join

Building an online tool for spatial joins


Definitions and Examples

Live Tool Demo

Building an online tool for spatial joins


Definitions and Examples

Live Tool Demo

Building an online tool for spatial joins


Definitions and Examples

Live Tool Demo

Building an online tool for spatial joins


Definitions and Examples

Live Tool Demo

Building an online tool for spatial joins


Definitions and Examples

Live Tool Demo

Building an online tool for spatial joins


Technical Background

TechnicalOverview

Building an online tool for spatial joins


Technical Background

  • Technical Overview

  • Text or Excel file is read with php

  • Get user input to select address fields

  • Address is concatenated and feed into the geocoder::US Perl module from within php

  • lat/long returned

  • Spatial query using lat/long results from geocoding=> in Post GIS one simple SQL query is called to retrieve the LD number

  • Output of results

  • Sample sql queries

  • select ndistrict from Leg_districts_2001 where Leg_districts_2001.the_geom && (setsrid((MakePoint(-122.206834, 47.611421)),4326)) and intersects (Leg_districts_2001.the_geom,setsrid((MakePoint(-122.206834, 47.611421)),4326));

  • select ndistrict from Leg_districts_2001 where Leg_districts_2001.the_geom && transform(((setsrid((MakePoint(-122.206834, 47.611421)),4326))),2285) and intersects (Leg_districts_2001.the_geom,transform(((setsrid((MakePoint(-122.206834, 47.611421)),4326))),2285));

Building an online tool for spatial joins


Technical Background

Code

Building an online tool for spatial joins


Technical Background

Perl integration for Geo::Coder::US

Building an online tool for spatial joins


Technical Background

Query in PostGIS

Building an online tool for spatial joins


Spatial Indexes

Source: “Introduction to PostGIS”, Paul Ramsey, Refractions Research

Building an online tool for spatial joins


Technical Background

  • How can you build your own tool ?

  • Install

  • • Apache I or II Webserver (or IIS)

  • PHP (php_Perl.dll, php_pgsql.dll etc.)

  • Perl (5.8 or higher, geocoder::US module and several others from CPAN)

  • PostgreSQL

  • PostGIS, load polygon data

  • Obtain US Census Tiger Line data for states in question

  • Load Tiger data into BerkeleyDB (utility comes with Geo::Coder::US)

  • author some PHP/Perl scripts

Building an online tool for spatial joins


Resources

Open source utilities and websites

Building an online tool for spatial joins


Resources

Articles

Build Your Own Geocoding Solution with Geo::Coder::US

By Jason Gilmore

http://www.developer.com/tech/article.php/3557171

Retrieving Map Location Coordinates

By Jason Gilmore

http://www.developer.com/tech/article.php/3548171

Building an online tool for spatial joins


Free and Open Source Software for Geospatial 2007

http://www.foss4g2007.org/

Resources

Building an online tool for spatial joins


Resources

  • New local GIS user group:

  • “Cascadia Users of Geospatial Open Source”http://groups.google.com/group/cugos

  • Next meeting today April 25th, 5:30 pmIn the LizardTech offices, located near Pioneer Square:

    • The National Building

    • Suite 200

    • 1008 Western Avenue

    • Seattle, WA 98104

Building an online tool for spatial joins


ad
  • Login