Difference between revisions of "Developing Geospatial Solutions using Open Source"

From OSGeo
Jump to navigation Jump to search
m
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This is one of the three books identified by the [[Education and Curriculum Committee]] that should be written.
+
This is one of the three books identified by the [[Education Committee Work Program|Education and Curriculum Committee]] that should be written. The other books are [[Using Open Source GIS]] and [[Developing Web Mapping Solutions Using Open Source]].
  
 
== Approach for writing this book ==
 
== Approach for writing this book ==
  
We will start writing this book by listing practical problems and then identifying tools for solving those problems. As the list of problems increases they should be organized into groups etc.
+
Using the application and programming language categories from http://freegis.org we'll gather problems or use cases, maybe divide them into subproblems, and describe how they can be solved using the free tools.
  
We need to list the tools and link to pages, which describe their general capabilities. http://freegis.org has a good list, which contains short descriptions and it has a quite good classification scheme with the only problem that it seems not possible make complex queries. Probably it is a good idea to share the ontology.
+
The tools are [[Programming Languages Project|programming languages]], libraries, command line tools, and customizable applications.
  
We'd like to develop this page somehow coordinated with the [[Programming Languages Project]]
+
This book is about "I know which problem I need to solve and it can't be solved, at least easily or without trouble, by simply using some free GIS tool".
 +
 
 +
We exclude web mapping problems from this one since it is the topic of book 3.
 +
 
 +
Provide here an analysis of the meta problem description above.
 +
 
 +
Copy the categories and
 +
 
 +
programming languages: C, C  , Java, Python, Tcl/Tk, Perl, (Visual) Basic, PHP, C#, Fortran, Delphi, Ruby, SWF, Other (Other has zero entries in freegis.org).
  
 
== GPS related ==
 
== GPS related ==
Line 22: Line 30:
 
**Subproblem: Track logs
 
**Subproblem: Track logs
 
**Explanation:
 
**Explanation:
 +
 +
*Problem: Edit a GPS track
 +
**[http://users.skynet.be/watermael/gps/50358.html#to_Moissac example data]
 +
**Requirements: Show the track on a map as editable lines, show the coordinates on a spreadsheet allowing edits, link the two representations
 +
**Subproblem: Import the GPS track to the editor
 +
**Subproblem: Export the track from the system
 +
 +
*Problem: Merge GPS tracks
 +
**Explanation: Allow you to view several GPS traces, delete certain points, and average others together.
 +
**Use: You survey a route several times, and want a single trace of the best average over the traces
  
  
 
{| class="wikitable" style="text-align:center" border="1" cellpadding="2"
 
{| class="wikitable" style="text-align:center" border="1" cellpadding="2"
| Use case || Description || Perl || Ruby || Python  
+
| Use case || Description || Perl || Ruby || Python || Shell
 
|-
 
|-
 
| Parse GPX  
 
| Parse GPX  
Line 32: Line 50:
 
| [http://www.tom-carden.co.uk/googlegpx/upload-gpx Ruby based solution]
 
| [http://www.tom-carden.co.uk/googlegpx/upload-gpx Ruby based solution]
 
| [http://cheeseshop.python.org/pypi/pygpx/ PyGPX]
 
| [http://cheeseshop.python.org/pypi/pygpx/ PyGPX]
 +
| [http://mpa.itc.it/markus/useful/shp2gpx.sh shp2gpx.sh] and [http://mpa.itc.it/markus/useful/gpx2shp.sh gpx2shp.sh](scripts calling 'gpsbabel')
 
|-
 
|-
 
| GeoTag Media
 
| GeoTag Media
Line 38: Line 57:
 
| Ruby?
 
| Ruby?
 
| Python?
 
| Python?
 +
| Shell?
 
|-
 
|-
 
| Track logs
 
| Track logs
Line 44: Line 64:
 
| Ruby
 
| Ruby
 
| Python
 
| Python
 +
| Shell?
 +
|-
 +
| Track merge
 +
|
 +
|
 +
| Ruby?
 +
| Python?
 +
| gpsbabel can perform related [http://www.gpsbabel.org/htmldoc-1.3.0/Data_Filters.html GPS track operations]
 
|}
 
|}
  
== Editing geospatial data ==
+
== Projection-Conversion ==
 +
* Problem: Convert between WGS84 and local projections
 +
* Problem: Convert from lat long to easting and northing, as used on printed maps
  
*Problem: Editing shapefile
+
Check out the [[Axis Order Confusion]] issue which arises whenever adressing geographic coordinates with IT systems.
**Subproblem: Add or delete a feature
 
**A solution:
 
**Subproblem: Change the location of the vertices
 
**A solution:
 
**Subproblem: Edit attribute data
 
**A solution:
 
**Subproblem: Alter the schema (add or delete fields)
 
**A solution:
 
  
== Geocomputation ==
+
{| class="wikitable" style="text-align:center" border="1" cellpadding="2"
 +
| Use case || Description || Perl || Ruby || Python || Java || JavaScript || Shell
 +
|-
 +
| Change between projections
 +
| Perform a Helmert Transform
 +
| [https://secure.mysociety.org/cvstrac/dir?d=mysociety/perllib/Geo MySociety Code]
 +
|
 +
| [http://gagravarr.org/code/#geo_helper geo_helper.py]
 +
| [http://www.jstott.me.uk/jcoord/ Jcoord]
 +
| [http://www.jstott.me.uk/jscoord/ JScoord]
 +
| [http://proj.maptools.org/ cs2cs tool]
 +
|-
 +
| Convert from lat long to easting northing
 +
|
 +
| [http://search.cpan.org/~toby/Geo-Coordinates-OSGB-1.07/lib/Geo/Coordinates/OSGB.pm Geo::Coordinates::OSGB]
 +
|
 +
| [http://gagravarr.org/code/#geo_helper geo_helper.py]
 +
| [http://www.jstott.me.uk/jcoord/ Jcoord]
 +
| [http://www.jstott.me.uk/jscoord/ JScoord]
 +
| [http://proj.maptools.org/ cs2cs tool]
 +
|-
 +
| Work with old maps / data in Cassini Projection
 +
| Convert between Cassini and its base elipsoid
 +
|
 +
|
 +
| [http://gagravarr.org/code/#geo_helper geo_helper.py]
 +
|
 +
| [http://www.ponies.me.uk/maps/cassini/ cassini-coord.js]
 +
|
 +
|}
 +
 
 +
== GPS and EXIF ==
 +
* Problem: Extract GPS exif tags from photos
 +
* Problem: Add GPS exif tags at the time a photo is taken
 +
* Problem: Add GPS exit tags to photos, based on the time they were taken and a GPS track
 +
 
 +
{| class="wikitable" style="text-align:center" border="1" cellpadding="2"
 +
| Use case || Description || Perl || Ruby || Python
 +
|-
 +
| Get GPS EXIF data
 +
| Extract lat and long from GPS Exif tags
 +
|
 +
|
 +
| [http://www.benno.id.au/code/pexif/ pexif]
 +
|-
 +
| Set GPS EXIF date
 +
| Add lat and long GPS Exif tags
 +
|
 +
|
 +
| [http://www.benno.id.au/code/pexif/ pexif]
 +
|}
  
*Problem: Compute the total area of polygons in a dataset
+
[[Category:Education]]

Latest revision as of 12:44, 9 September 2007

This is one of the three books identified by the Education and Curriculum Committee that should be written. The other books are Using Open Source GIS and Developing Web Mapping Solutions Using Open Source.

Approach for writing this book

Using the application and programming language categories from http://freegis.org we'll gather problems or use cases, maybe divide them into subproblems, and describe how they can be solved using the free tools.

The tools are programming languages, libraries, command line tools, and customizable applications.

This book is about "I know which problem I need to solve and it can't be solved, at least easily or without trouble, by simply using some free GIS tool".

We exclude web mapping problems from this one since it is the topic of book 3.

Provide here an analysis of the meta problem description above.

Copy the categories and

programming languages: C, C , Java, Python, Tcl/Tk, Perl, (Visual) Basic, PHP, C#, Fortran, Delphi, Ruby, SWF, Other (Other has zero entries in freegis.org).

GPS related

  • Problem: Share GPS data between applications
    • Subproblem: Parse GPX
    • Explanation: GPX is an XML application for GPS data. Parsing gives us the GPS data.
  • Problem:
    • Subproblem: GeoTag Media
    • Explanation:
  • Problem:
    • Subproblem: Track logs
    • Explanation:
  • Problem: Edit a GPS track
    • example data
    • Requirements: Show the track on a map as editable lines, show the coordinates on a spreadsheet allowing edits, link the two representations
    • Subproblem: Import the GPS track to the editor
    • Subproblem: Export the track from the system
  • Problem: Merge GPS tracks
    • Explanation: Allow you to view several GPS traces, delete certain points, and average others together.
    • Use: You survey a route several times, and want a single trace of the best average over the traces


Use case Description Perl Ruby Python Shell
Parse GPX What is GPX? Perl based solution Ruby based solution PyGPX shp2gpx.sh and gpx2shp.sh(scripts calling 'gpsbabel')
GeoTag Media RDFWeb geoloc_media.pl (original geoloc_media) Ruby? Python? Shell?
Track logs Geo::Track::Log Ruby Python Shell?
Track merge Ruby? Python? gpsbabel can perform related GPS track operations

Projection-Conversion

  • Problem: Convert between WGS84 and local projections
  • Problem: Convert from lat long to easting and northing, as used on printed maps

Check out the Axis Order Confusion issue which arises whenever adressing geographic coordinates with IT systems.

Use case Description Perl Ruby Python Java JavaScript Shell
Change between projections Perform a Helmert Transform MySociety Code geo_helper.py Jcoord JScoord cs2cs tool
Convert from lat long to easting northing Geo::Coordinates::OSGB geo_helper.py Jcoord JScoord cs2cs tool
Work with old maps / data in Cassini Projection Convert between Cassini and its base elipsoid geo_helper.py cassini-coord.js

GPS and EXIF

  • Problem: Extract GPS exif tags from photos
  • Problem: Add GPS exif tags at the time a photo is taken
  • Problem: Add GPS exit tags to photos, based on the time they were taken and a GPS track
Use case Description Perl Ruby Python
Get GPS EXIF data Extract lat and long from GPS Exif tags pexif
Set GPS EXIF date Add lat and long GPS Exif tags pexif