PostGIS Terminal

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
Printscreen of PostGIS Terminal (Prototype).

About

PostGIS Terminal (short PT) is a webapplication - mainly a rich client - to query PostGIS database using pure SQL and see the result in a map window. It was developed based on the idea and implementation of Marc Jansen and Till Adams german OpenLayers book (see [1] and [2]). There's another implementation behind postgisonline.org.

Preconditions/Dependencies: Apache (with PHP support), PostgreSQL (8 or 9), PostGIS (>=1.5) plus OpenLayers (). There are no other SW dependencies.

Notes (in german): Das PostGIS Terminal ist eine Art Webadmin-Tool zur Visualisierung von Spatial SQL Queries und kann für Ausbildungzwecke aber auch für GIS-Administratoren nützlich sein. Installieren siehe _README.txt. Es gibt ev. mal eine Homepage auf http://labs.geometa.info/ (analog http://openlayers-buch.de/beispiele/chapter-09/postgis-terminal.html ). Setzt Apache/PHP und PostgresSQL/PostGIS voraus. Passende Daten dazu stammen beispielsweise von OpenStreetMap (http://download.geofabrik.de/osm/ ). Testen mit den Beispielen in _EXAMPLE_QUERIES.txt und nice-queries-for-postgis-console.sql. Könnte theoretisch auch weitere Geo-Datenbanksysteme unterstützen (müsste dann aber umbenannt werden).

Credits / License

Credits to...

  • Marc Jansen/Till Adams (code, OpenLayers book)
  • and Hartmut Holzgräfe (code)
  • and the fabulous OpenStreetMappers (data).

Software is licensed under "New BSD License" (see http://en.wikipedia.org/wiki/BSD_licenses ).

Terms of Use

Hinweis.jpg Hint:

To be defined. In the meantime... Think! before you type!

Help

SQL Help

To be defined. The use of selectors which "generate" SQL into query input console is experimental from an eLearning view.

Help using PostGIS Terminal

PostGIS Terminal analyses your SQL query, beautifies it and looks for placeholders. Output (text or map) can be controlled with field names (or function names) if they exist in the SQL console input or in the query result.

Output can go (1) to log window (called "text query") or (2) to map window (called "map query"). "map queries" can be either be "geometry" (= point, linestring, polygon) or "marker" (= icon).

 .--------------------------.
 | PostGIS Terminal...      |
 |--------------------------|
 | xxx     |                |
 |         |                |
 | Query:  |                |
 | ####### |   Map Window   |
 | ####### |                |
 |         |                |
 | Log:    |                |
 | ####### |----------------|
 | ####### |         Footer |
 .--------------------------.
 Figure: GUI Layout of PostGIS Terminal.

Reserved field and function names are:

  • "geom"  : field with WKT geometry.
  • "label  : field with text displayed as a label of the geometry.
  • mapextent(): bbox of current map view.

System variable placeholder:

  • _table: for current Table/name name.
  • _geom: for Geometry attribute name.
  • _string: for Search name.
  • _mouse_x/_mouse_y: for each mouse click in map window.

See e.g. examples below.

Feedback

Please send questions and feedback to Stefan Keller.

Examples

There are additional examples yet. See file "_EXAMPLE_QUERIES.txt" in .zip file for a start.

Weblinks

http://openlayers-buch.de/beispiele/chapter-09/postgis-terminal.html