Changes between Version 33 and Version 34 of InstallationGuidelines/PostgreSQL


Ignore:
Timestamp:
12/03/10 15:04:52 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/PostgreSQL

    v33 v34  
    133133== Add Geometry column to gis_location ==
    134134If using PostGIS, then once the tables have been created:
    135 
    136 Add geometry Column:
    137135{{{
    138136su postgres
    139137psql
    140138\d sahana
     139# Ensure all POINTs have WKT entries
     140UPDATE public.gis_location SET wkt = 'POINT (' || lon || ' ' || lat || ')' WHERE gis_feature_type = 1;
     141# Add geometry Column
    141142SELECT AddGeometryColumn( 'public', 'gis_location', 'the_geom', 4326, 'GEOMETRY', 2 );
    142 exit
    143 }}}
    144 (if using Windows can use the Query Editor that comes with pgAdmin III)
    145 
    146 Populate existing entries:
    147 {{{
    148 su postgres
    149 psql
    150 \d sahana
     143# Populate existing entries
    151144UPDATE public.gis_location SET the_geom = ST_SetSRID(ST_GeomFromText(wkt), 4326);
    152145exit
    153146}}}
     147(if using Windows can use the Query Editor that comes with pgAdmin III)
    154148
    155149Ensure that future entries auto-populate properly: