1.
postgres@slitaz:~$ tazpkg list-files postgis
Installed files with: postgis
================================================================================
/usr/bin/pgsql2shp
/usr/bin/shp2pgsql
/usr/lib/postgresql/postgis-1.5.so
/usr/share/postgresql/contrib/postgis-1.5/postgis.sql
/usr/share/postgresql/contrib/postgis-1.5/postgis_upgrade_13_to_15.sql
/usr/share/postgresql/contrib/postgis-1.5/postgis_upgrade_14_to_15.sql
/usr/share/postgresql/contrib/postgis-1.5/postgis_upgrade_15_minor.sql
/usr/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql
/usr/share/postgresql/contrib/postgis-1.5/uninstall_postgis.sql
================================================================================
9 files installed with postgis.
2.
postgres@slitaz:~$ createdb -E utf-8 -T template0 --owner=postgis gis
postgres@slitaz:~$ psql -f /usr/share/postgresql/contrib/postgis-1.5/postgis.sql -d gis
postgres@slitaz:~$ psql -f /usr/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql -d gis
3.
postgres@slitaz:~$ psql -U postgis -d gis
psql (9.0.4)
Type "help" for help.
gis=# \set
AUTOCOMMIT = 'on'
PROMPT1 = '%/%R%# '
PROMPT2 = '%/%R%# '
PROMPT3 = '>> '
VERBOSITY = 'default'
VERSION = 'PostgreSQL 9.0.4 on i486-slitaz-linux-gnu, compiled by GCC i486-slitaz-linux-gcc (SliTaz) 4.5.2, 32-bit'
DBNAME = 'gis'
USER = 'postgis'
PORT = '5432'
ENCODING = 'UTF8'
4.
gis=# select lanname from pg_language;
lanname
----------
internal
c
sql
plpgsql
(4 rows)
5.
gis=# \d
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+----------
public | geography_columns | view | postgres
public | geometry_columns | table | postgres
public | spatial_ref_sys | table | postgres
(3 rows)
6.
gis=# \d spatial_ref_sys
Table "public.spatial_ref_sys"
Column | Type | Modifiers
-----------+-------------------------+-----------
srid | integer | not null
auth_name | character varying(256) |
auth_srid | integer |
srtext | character varying(2048) |
proj4text | character varying(2048) |
Indexes:
"spatial_ref_sys_pkey" PRIMARY KEY, btree (srid)
7.
gis=# select count(*) from spatial_ref_sys;
count
-------
3749
(1 row)
8.
gis=# select * from spatial_ref_sys limit 2;
srid | auth_name | auth_srid | srtext | proj4text
------+-----------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------
3819 | EPSG | 3819 | GEOGCS["HD1909",DATUM["Hungarian_Datum_1909",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408],AUTHORITY["EPSG","1024"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3819"]] | +proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs
3821 | EPSG | 3821 | GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]] | +proj=longlat +ellps=aust_SA +no_defs
(2 rows)
9.
gis=# select srid,srtext from spatial_ref_sys where srid=3821;
srid | srtext
------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3821 | GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]]
(1 row)
gis=#
.