Arkat PDA

התקנת PostGIS על אובונטו דאפר 06,06

על ידי על Dec.18, 2006, תחת Uncategorized

התקנת תלויות

אנחנו צריכים מאגרים היקום יקום מופעלת.

במסוף

$sudo aptitude install proj proj-ps-doc postgresql-8.1 postgresql-doc-8.1 postgresql-server-dev-8.1 libgeos2c2a libgeos-doc libgeos-dev flex byacc build-essential libpam0g-dev libkrb5-dev libreadline5-dev

ליקוט PostGIS

מאז יש לנו חבילה עבור אובונטו דאפר PostGIS, אז אנחנו צריכים לקמפל את קוד המקור.

$ sudo mkdir cd /usr/share/postgresql/8.1/contrib
$ cd /usr/share/postgresql/8.1/contrib/
$ sudo wget http://postgis.refractions.net/download/postgis-1.1.3.tar.gz
$ sudo tar zxvf postgis-1.1.3.tar.gz
$ sudo cd postgis-1.1.3
$ sudo ./configure --prefix=/usr --with-pgsql=/usr/bin/pg_config --with-geos=/usr/bin/geos-config --with-proj=/usr
$ sudo make
$ sudo make install

הגדרת PostgreSQL

$ sudo su - postgres
$ /usr/lib/postgresql/8.1/bin/createdb testgis
$ /usr/lib/postgresql/8.1/bin/createlang plpgsql testgis
$ /usr/lib/postgresql/8.1/bin/psql -f /usr/share/postgresql/8.1/contrib/postgis-1.1.3/lwpostgis.sql -d testgis
$ /usr/lib/postgresql/8.1/bin/psql -f /usr/share/postgresql/8.1/contrib/postgis-1.1.3/spatial_ref_sys.sql -d testgis

בדקנו את BD

$ /usr/lib/postgresql/8.1/bin/psql testgis
create table test( id int );
select addgeometrycolumn( 'test', 'geom', -1, 'LINESTRING', 2);
insert into test(id, geom) values (1,geomfromtext('LINESTRING(0 0,1000 0)',-1));
select buffer(geom,200) into table buf from test;

: , , , , , , , , ,

3 תגובות עבור ערך זה:

Trackbacks / כל הזמנים

  • meneame.net אומר:

    התקנת PostGIS על אובונטו דאפר 6.6 ...

    Howto להעתיק ולהדביק סוג להדר ולהתקין PostGIS וליצור מסד נתונים עבור UNS GIS ב-Ubuntu Dapper ...

כתיבת תגובה

מחפש משהו?

השתמש בטופס שלהלן כדי לחפש באתר:

עדיין לא מוצאים את מה שאתה מחפש? זרוק תגובה פוסט או ליצור איתנו קשר כדי שנוכל לטפל בזה!