[postgis-users] Desperately seeking simple solution

Robert W. Burgholzer rburgholzer at maptech-inc.com
Sun May 30 16:35:03 PDT 2004


Gerry,
Actually, here is a pair of queries I used to spatially enable (i.e. 
postgis-icize) a weather station table called "us_stations", which I 
gleened from an earlier posting on this list (I think):

-- create a geometry for a table with lats and lons, and populate it with 
lat and lon values
-- create the geom column
select addgeometrycolumn('weather','us_stations','the_geom',-1,'POINT',2);
-- add the proper points
update us_stations set the_geom = ('' || 'POINT' || '(' || lon || ' ' || 
lat || ')' || '')::text::geometry;

If you were to back up your db in the manner suggested by the other 
responder to your question, you could then use this on the backup copy to 
not have to worry about goofing up your data.

Rob

At 09:10 AM 5/30/2004 -0500, you wrote:
>I've got a postgres database that incorporates point data.  One table 
>holds lat/lon and other site (static) info, while another table houses all 
>the time-dependent data.  We're talking surface meteorological data for 
>the most part.
>
>I'm trying to transition a big chunk to PostGIS and was wondering if 
>there's a relatively easy way to do it.  I don't want to take the site 
>down for several days, so the transition will have to occur off-line, and 
>then I'll do a swap.
>
>I'm sorta at a loss right now for ideas and don't want to trash my 
>existing db in trying this.
>
>Thanks for all suggestions!
>gerry
>--
>Gerry Creager -- gerry.creager at tamu.edu
>Texas Mesonet -- AATLT, Texas A&M University
>Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.847.8578
>Page: 979.228.0173
>Office: 903A Eller Bldg, TAMU, College Station, TX 77843
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users

Robert Burgholzer
Environmental Engineer
MapTech Inc.
http://www.maptech-inc.com/ 




More information about the postgis-users mailing list