Changes between Version 33 and Version 34 of InstallationGuidelines/PostgreSQL
- Timestamp:
- 12/03/10 15:04:52 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/PostgreSQL
v33 v34 133 133 == Add Geometry column to gis_location == 134 134 If using PostGIS, then once the tables have been created: 135 136 Add geometry Column:137 135 {{{ 138 136 su postgres 139 137 psql 140 138 \d sahana 139 # Ensure all POINTs have WKT entries 140 UPDATE public.gis_location SET wkt = 'POINT (' || lon || ' ' || lat || ')' WHERE gis_feature_type = 1; 141 # Add geometry Column 141 142 SELECT 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 151 144 UPDATE public.gis_location SET the_geom = ST_SetSRID(ST_GeomFromText(wkt), 4326); 152 145 exit 153 146 }}} 147 (if using Windows can use the Query Editor that comes with pgAdmin III) 154 148 155 149 Ensure that future entries auto-populate properly: