Changes between Version 2 and Version 3 of BluePrintGIStools


Ignore:
Timestamp:
01/26/11 05:38:35 (14 years ago)
Author:
Nico Presto
Comment:

expanded number of calcs with examples

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintGIStools

    v2 v3  
    1 This list should identify the basic GIS calculations that would be useful in Sahana eden:
     1Basic GIS calculations that may be useful in Sahana eden:
     2
     3* Centroid
     4select name, asText(Centroid(the_geom)) from table where name='location';
     5
     6* Bounding boxes
     7select name, asText(Envelope(the_geom) from table where name='location';
     8select name, extent(the_geom) from table where name = 'location' group by name;
    29
    310* buffer calculations
    4 * intersections (point, line, polygon)
     11
     12* Distance measurements
     13select distance(
     14(transform(GeomFromText('Point(lon lat)'), 900913), 26915),
     15(transform(GeomFromText('Point(lon lat)'), 900913), 26915);
     16
     17* intersections
     18select name from location where
     19GeomFromText('Point(lon lat)',900913)
     20&& the_geom AND
     21within (GeomFromText('Point(lon lat)', 900913), the_geom);
     22
     23* Point within polygon
     24select name from location where
     25GeomFromText('Point(lon lat)', 900913)
     26&& the_geom;
     27
     28* Spherical distance
     29select distance_sphere(
     30(transform(GeomFromText('Point(lon lat)'), 900913),
     31(transform(GeomFromText('Point(lon lat)'), 900913);
     32
     33* Spheroid distance
     34select distance_spheroid(
     35(GeomFromText('Point(lon lat)'), 900913),
     36(GeomFromText('Point(lon lat)'), 900913),
     37'SPHEROID["GRS 1980", 6378137, 298.257222101]');
     38