KEMBAR78
Saving Money with Open Source GIS | PDF
Saving Money Using
Open Source Software
            Bryan Luman
            bryanluman@gmail.com
What is Open Source
     Software?




 http://notinventedhe.re/on/2010-10-13
Wikipedia Says...
  Open-source software (OSS) is computer
software that is available in source code form
for which the source code and certain other
rights normally reserved for copyright holders
are provided under a software license that
permits users to study, change, and improve
the software.
What does that
       mean to me?
• FREE!
• You can make changes to the software
• You can learn from experienced coders
• Oh, yeah... FREE!
Types of Licenses
  GPL                       MPL
         Artistic license
     LGPL                MIT
Apache     Creative Commons
      Public Domain    BSD
 CDDL             Eclipse
http://www.opensource.org
(so don’t sue me)


• Check with your lawyer if you are unsure
• JUST AS YOU SHOULD WITH ANY
  DEAL!
• Example: RFP’s, Microsoft CAL’s, developer
  licenses.
End of Scary Legal Stuff
Where do I find it?
How do I know
 if it’s good?
Recently updated?
Good documentation?
How many people maintain it?
                     Not a
                      good
                     choice
Active Community?
Are there companies
  selling support?
Books?
Buzz?
OK so what do
    I use?
Obligatory ESRI
          Reference

                   Text



http://www.python.org/
Programming Language
      of Choice
        http://www.ruby-lang.org


         def greet
           puts "Hello world"
         end
http://rubyonrails.org/
http://www.sinatrarb.com/
http://jquery.com/
http://www.postgresql.org/
http://www.sqlite.org/
http://www.mongodb.org/
http://nginx.org/
http://www.imagemagick.org



           Text
GET TO THE GIS
  SOFTWARE!!!
Desktop
 Apps
uDig
       http://udig.refractions.net/

• Uses Eclipse GUI
• Reads most standard GIS formats
  (PostGIS, shapefile, WMS, WFS, WCS,
  GeoRSS, KML, and images)
• Limited map making ability
• Simple editing is OK
GRASS
          http://grass.osgeo.org
• One of the first GIS systems
• Initially developed by US ArmyConstruction
  Engineering Research Laboratory in
  Champaign, IL
• Incredible powerful for geoprocessing both
  raster and vector
• Gives ArcInfo 7 a run for it’s money on the
  UI (i.e. not good)
Quantum GIS
           http://www.qgis.org/

• Good middle ground
• Reasonably decent UI
• Power of GRASS
• Almost comparable to ArcView
• Before you buy another license at least give
  this a try
Databases
PostGIS
http://postgis.refractions.net/

• Nearly part of the PostgreSQL core
• Based off well documented standards
  (OGC)
• Fast and Stable
• Large community developing and
  documenting
MySQL Spatial
       Extensions

• Incomplete and not well documented
• Not recommended unless you MUST use
  MySQL
Spatialite
    http://www.gaia-gis.it/spatialite/

• Uses much of the same guts as PostGIS
• Based on SQLite so very small and portable
• Possible exchange format
• Can use on iOS devices (GIS on your
  phone)
• A little young
Most SQL vendors implement geography
using a version of the:


   OpenGIS Implementation Specification for
 Geographic information - Simple feature access



http://www.opengeospatial.org/standards/sfs
Data Formats
Most Common

  • ESRI Shapefile
  • De facto standard
  • Documented by ESRI

http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf
Well Known Text (WKT)
              &
    Well Known Binary (WKB)


• Used in database records
• Well documented
• Compact
Example
POINT(6 10) =
010100000000000000000018400000000000002440

LINESTRING(3 4,10 50,20 25) =
01020000000300000000000000000008400000000000001040000000
00000024400000000000004940000000000000344000000000000039
40
GML
       http://en.wikipedia.org/wiki/
      Geography_Markup_Language


• OGC/ISO Standard
• Encoded in XML and like XML can be used
  for good or evil
• Most other open formats take their cue
  from this format
Example

<gml:Point gml:id="p21" srsName="urn:ogc:def:crs:EPSG:6.6:4326">
   <gml:coordinates>45.67, 88.56</gml:coordinates>
</gml:Point>
GeoJSON
            http://geojson.org


• JavaScript Object Notation (JSON)
  encoded
• Very similar to GML but a little more
  streamlined
• Different than the ESRI JSON format
Example
{ "type": "Point", "coordinates": [100.0, 0.0] }

{ "type": "Polygon",
  "coordinates": [
    [
      [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
      [100.0, 1.0], [100.0, 0.0]
    ]
  ]
}
GeoRSS
            http://georss.org



• Essentially a streamlined version of GML
• Used in RSS feeds
• Used by Yahoo in a lot of data streams
Example

<georss:point>
  45.256 -71.92
</georss:point>
KML
  http://code.google.com/apis/kml/documentation

• Initially developed for Keyhole (Keyhole
  Markup Language) which was changed to
  Google Earth after being acquired
• As it’s name implies this is a markup
  language and is more suited to presenting
  GIS data than exchanging it
• Now an open standard and supported by
  Google Earth, NASA Worldwind, and ESRI
Example
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Placemark>
    <name>Simple placemark</name>
    <description>Attached to the ground. Intelligently places itself
        at the height of the underlying terrain.</description>
    <Point>
       <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
    </Point>
  </Placemark>
</kml>
GPX
  http://www.topografix.com/gpx.asp


• GPS eXchange Format
• XML based
• Fairly easy to read and write
• Lots of support in consumer GPS devices
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx ...>
  <metadata>
    <link href="http://www.garmin.com">
       <text>Garmin International</text>
    </link>
    <time>2009-10-17T22:58:43Z</time>
  </metadata>
  <trk>
    <name>Example GPX Document</name>
    <trkseg>
       <trkpt lat="47.644548" lon="-122.326897">
         <ele>4.46</ele>
         <time>2009-10-17T18:37:26Z</time>
       </trkpt>
       <trkpt lat="47.644548" lon="-122.326897">
         <ele>4.94</ele>
         <time>2009-10-17T18:37:31Z</time>
       </trkpt>
       <trkpt lat="47.644548" lon="-122.326897">
         <ele>6.87</ele>
         <time>2009-10-17T18:37:34Z</time>
       </trkpt>
    </trkseg>
  </trk>
</gpx>
Image Formats
                     (some)

                     BMP             MrSID
      JP2
            GeoJPG          PNG
                                       ERMapper
                     GeoTIFF
       NITF
PCI
            And many more!!!
      USGS DEM              DOQ
                     ECW                   NetCDF
            Erdas Imagine      ESRI GRID
GDAL/OGR
             http://www.gdal.org/


• Swiss army knife of GIS!
• Converts, slices and dices data anyway you
  like
• Really fast!
• Used in a bunch of OS and commercial
  applications
• Using ArcGIS? - You are already using
  GDAL
Web Mapping
Openlayers
           http://openlayers.org/

• Only totally open, full featured, web map
  viewer
• Well documented
• Can be used with ESRI ArcGIS Server as
  well as many other data sources WMS,
  WFS, GeoRSS, etc...
MapServer
          http://mapserver.org/


• Original open source web mapping solution
• Akin to ESRI ArcIMS... will lead you into
  madness with it’s broken HTML
• Using just the map rendering capability is
  OK
Mapnik
            http://mapnik.org/


• Beautiful Rendering
• Exceptionally difficult to compile
• May be a little slow compared to
  MapServer
• Used by Google and Apple
Tilecache
           http://tilecache.org/


• Nice small python web service
• Will serve tiles ala Google Maps statically
  or on demand
• Lots of options for increasing web serving
  performance (memcached, HTTP headers)
GeoDjango
          http://geodjango.org/


• Django is a python web framework for
  designing applications quickly
• This is a very nice extension that adds a
  variety of methods for interacting with
  spatial data using PostGIS, GEOS, and
  PROJ4
Free but not open

• Google Earth
• Google Maps
• Microsoft Bing
• Yahoo Maps
• Mapquest
http://lakecountyil.gov
Other Cool Geo API’s

• 4Square
• Facebook
• Twitter
• Flickr
Open Streetmap
    http://www.openstreetmap.org/

• Totally open dataset of features
• Based on TIGER (in USA) and updated by
  individuals
• Variable precision
• Excellent cartography
• Made using open source GIS software
EveryBlock
         http://everyblock.com



• Second evolution of ChicagoCrime.org
• Excellent User Interface
• Uses Openlayers and Mapnik
Warning!
Extreme Technical
 Content ahead!
libLAS
             http://liblas.org


• Library and executables
• Can convert raw LAS to a variety of
  formats using advanced filtering
• Can get detailed info and compare LAS files
• Supported by Iowa DNR and US Army
GEOS
      http://trac.osgeo.org/geos/


• Geometry Engine, Open Source (GEOS)
• Backbone of PostGIS and Spatialite
• Also used in Quantum GIS, GRASS, OGR,
  Ingres, MapServer, and GeoDjango
PROJ
       http://trac.osgeo.org/proj/



• Library and executable
• Will project to and from anything
• Used in almost all OS GIS projects
A little note about
    projections
EPSG/WKID Codes
 http://www.epsg.org/Geoodetic.html


• European Petroleum Survey Group (EPSG)
  initially developed a list of projections for
  easy reference
• Also known as Well Known ID’s (WKID)
• A good searchable index is:
  spatialreference.org
EPSG:3435
            vs
                 PROJCS["NAD83 / Illinois East (ftUS)",
                     GEOGCS["NAD83",
                         DATUM["North_American_Datum_1983",
                             SPHEROID["GRS 1980",6378137,298.257222101,
                                 AUTHORITY["EPSG","7019"]],
                             AUTHORITY["EPSG","6269"]],
                         PRIMEM["Greenwich",0,
                             AUTHORITY["EPSG","8901"]],
                         UNIT["degree",0.01745329251994328,
                             AUTHORITY["EPSG","9122"]],
                         AUTHORITY["EPSG","4269"]],
                     UNIT["US survey foot",0.3048006096012192,
                         AUTHORITY["EPSG","9003"]],
                     PROJECTION["Transverse_Mercator"],
                     PARAMETER["latitude_of_origin",36.66666666666666],
                     PARAMETER["central_meridian",-88.33333333333333],
                     PARAMETER["scale_factor",0.999975],
                     PARAMETER["false_easting",984250.0000000002],
                     PARAMETER["false_northing",0],
                     AUTHORITY["EPSG","3435"],
                     AXIS["X",EAST],
                     AXIS["Y",NORTH]]

Saving Money with Open Source GIS

  • 1.
    Saving Money Using OpenSource Software Bryan Luman bryanluman@gmail.com
  • 2.
    What is OpenSource Software? http://notinventedhe.re/on/2010-10-13
  • 3.
    Wikipedia Says... Open-source software (OSS) is computer software that is available in source code form for which the source code and certain other rights normally reserved for copyright holders are provided under a software license that permits users to study, change, and improve the software.
  • 4.
    What does that mean to me? • FREE! • You can make changes to the software • You can learn from experienced coders • Oh, yeah... FREE!
  • 5.
    Types of Licenses GPL MPL Artistic license LGPL MIT Apache Creative Commons Public Domain BSD CDDL Eclipse
  • 6.
  • 7.
    (so don’t sueme) • Check with your lawyer if you are unsure • JUST AS YOU SHOULD WITH ANY DEAL! • Example: RFP’s, Microsoft CAL’s, developer licenses.
  • 8.
    End of ScaryLegal Stuff
  • 9.
    Where do Ifind it?
  • 10.
    How do Iknow if it’s good?
  • 11.
  • 12.
  • 13.
    How many peoplemaintain it? Not a good choice
  • 14.
  • 15.
    Are there companies selling support?
  • 16.
  • 17.
  • 18.
    OK so whatdo I use?
  • 19.
    Obligatory ESRI Reference Text http://www.python.org/
  • 20.
    Programming Language of Choice http://www.ruby-lang.org def greet puts "Hello world" end
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
    GET TO THEGIS SOFTWARE!!!
  • 30.
  • 31.
    uDig http://udig.refractions.net/ • Uses Eclipse GUI • Reads most standard GIS formats (PostGIS, shapefile, WMS, WFS, WCS, GeoRSS, KML, and images) • Limited map making ability • Simple editing is OK
  • 34.
    GRASS http://grass.osgeo.org • One of the first GIS systems • Initially developed by US ArmyConstruction Engineering Research Laboratory in Champaign, IL • Incredible powerful for geoprocessing both raster and vector • Gives ArcInfo 7 a run for it’s money on the UI (i.e. not good)
  • 37.
    Quantum GIS http://www.qgis.org/ • Good middle ground • Reasonably decent UI • Power of GRASS • Almost comparable to ArcView • Before you buy another license at least give this a try
  • 40.
  • 41.
    PostGIS http://postgis.refractions.net/ • Nearly partof the PostgreSQL core • Based off well documented standards (OGC) • Fast and Stable • Large community developing and documenting
  • 42.
    MySQL Spatial Extensions • Incomplete and not well documented • Not recommended unless you MUST use MySQL
  • 43.
    Spatialite http://www.gaia-gis.it/spatialite/ • Uses much of the same guts as PostGIS • Based on SQLite so very small and portable • Possible exchange format • Can use on iOS devices (GIS on your phone) • A little young
  • 44.
    Most SQL vendorsimplement geography using a version of the: OpenGIS Implementation Specification for Geographic information - Simple feature access http://www.opengeospatial.org/standards/sfs
  • 45.
  • 46.
    Most Common • ESRI Shapefile • De facto standard • Documented by ESRI http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf
  • 47.
    Well Known Text(WKT) & Well Known Binary (WKB) • Used in database records • Well documented • Compact
  • 48.
    Example POINT(6 10) = 010100000000000000000018400000000000002440 LINESTRING(34,10 50,20 25) = 01020000000300000000000000000008400000000000001040000000 00000024400000000000004940000000000000344000000000000039 40
  • 49.
    GML http://en.wikipedia.org/wiki/ Geography_Markup_Language • OGC/ISO Standard • Encoded in XML and like XML can be used for good or evil • Most other open formats take their cue from this format
  • 50.
    Example <gml:Point gml:id="p21" srsName="urn:ogc:def:crs:EPSG:6.6:4326"> <gml:coordinates>45.67, 88.56</gml:coordinates> </gml:Point>
  • 51.
    GeoJSON http://geojson.org • JavaScript Object Notation (JSON) encoded • Very similar to GML but a little more streamlined • Different than the ESRI JSON format
  • 52.
    Example { "type": "Point","coordinates": [100.0, 0.0] } { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }
  • 53.
    GeoRSS http://georss.org • Essentially a streamlined version of GML • Used in RSS feeds • Used by Yahoo in a lot of data streams
  • 54.
    Example <georss:point> 45.256-71.92 </georss:point>
  • 55.
    KML http://code.google.com/apis/kml/documentation •Initially developed for Keyhole (Keyhole Markup Language) which was changed to Google Earth after being acquired • As it’s name implies this is a markup language and is more suited to presenting GIS data than exchanging it • Now an open standard and supported by Google Earth, NASA Worldwind, and ESRI
  • 56.
    Example <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251,0</coordinates> </Point> </Placemark> </kml>
  • 57.
    GPX http://www.topografix.com/gpx.asp •GPS eXchange Format • XML based • Fairly easy to read and write • Lots of support in consumer GPS devices
  • 58.
    <?xml version="1.0" encoding="UTF-8"standalone="no" ?> <gpx ...> <metadata> <link href="http://www.garmin.com"> <text>Garmin International</text> </link> <time>2009-10-17T22:58:43Z</time> </metadata> <trk> <name>Example GPX Document</name> <trkseg> <trkpt lat="47.644548" lon="-122.326897"> <ele>4.46</ele> <time>2009-10-17T18:37:26Z</time> </trkpt> <trkpt lat="47.644548" lon="-122.326897"> <ele>4.94</ele> <time>2009-10-17T18:37:31Z</time> </trkpt> <trkpt lat="47.644548" lon="-122.326897"> <ele>6.87</ele> <time>2009-10-17T18:37:34Z</time> </trkpt> </trkseg> </trk> </gpx>
  • 59.
    Image Formats (some) BMP MrSID JP2 GeoJPG PNG ERMapper GeoTIFF NITF PCI And many more!!! USGS DEM DOQ ECW NetCDF Erdas Imagine ESRI GRID
  • 60.
    GDAL/OGR http://www.gdal.org/ • Swiss army knife of GIS! • Converts, slices and dices data anyway you like • Really fast! • Used in a bunch of OS and commercial applications • Using ArcGIS? - You are already using GDAL
  • 61.
  • 62.
    Openlayers http://openlayers.org/ • Only totally open, full featured, web map viewer • Well documented • Can be used with ESRI ArcGIS Server as well as many other data sources WMS, WFS, GeoRSS, etc...
  • 63.
    MapServer http://mapserver.org/ • Original open source web mapping solution • Akin to ESRI ArcIMS... will lead you into madness with it’s broken HTML • Using just the map rendering capability is OK
  • 64.
    Mapnik http://mapnik.org/ • Beautiful Rendering • Exceptionally difficult to compile • May be a little slow compared to MapServer • Used by Google and Apple
  • 65.
    Tilecache http://tilecache.org/ • Nice small python web service • Will serve tiles ala Google Maps statically or on demand • Lots of options for increasing web serving performance (memcached, HTTP headers)
  • 66.
    GeoDjango http://geodjango.org/ • Django is a python web framework for designing applications quickly • This is a very nice extension that adds a variety of methods for interacting with spatial data using PostGIS, GEOS, and PROJ4
  • 67.
    Free but notopen • Google Earth • Google Maps • Microsoft Bing • Yahoo Maps • Mapquest
  • 68.
  • 69.
    Other Cool GeoAPI’s • 4Square • Facebook • Twitter • Flickr
  • 70.
    Open Streetmap http://www.openstreetmap.org/ • Totally open dataset of features • Based on TIGER (in USA) and updated by individuals • Variable precision • Excellent cartography • Made using open source GIS software
  • 71.
    EveryBlock http://everyblock.com • Second evolution of ChicagoCrime.org • Excellent User Interface • Uses Openlayers and Mapnik
  • 73.
  • 74.
    libLAS http://liblas.org • Library and executables • Can convert raw LAS to a variety of formats using advanced filtering • Can get detailed info and compare LAS files • Supported by Iowa DNR and US Army
  • 75.
    GEOS http://trac.osgeo.org/geos/ • Geometry Engine, Open Source (GEOS) • Backbone of PostGIS and Spatialite • Also used in Quantum GIS, GRASS, OGR, Ingres, MapServer, and GeoDjango
  • 76.
    PROJ http://trac.osgeo.org/proj/ • Library and executable • Will project to and from anything • Used in almost all OS GIS projects
  • 77.
    A little noteabout projections
  • 78.
    EPSG/WKID Codes http://www.epsg.org/Geoodetic.html •European Petroleum Survey Group (EPSG) initially developed a list of projections for easy reference • Also known as Well Known ID’s (WKID) • A good searchable index is: spatialreference.org
  • 79.
    EPSG:3435 vs PROJCS["NAD83 / Illinois East (ftUS)", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4269"]], UNIT["US survey foot",0.3048006096012192, AUTHORITY["EPSG","9003"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",36.66666666666666], PARAMETER["central_meridian",-88.33333333333333], PARAMETER["scale_factor",0.999975], PARAMETER["false_easting",984250.0000000002], PARAMETER["false_northing",0], AUTHORITY["EPSG","3435"], AXIS["X",EAST], AXIS["Y",NORTH]]