#
# v0.0 : DGR, le 07 fevrier 2004
# v0.1 : DGR, le 08 fevrier 2004 mise a jour des controles (4326, 2154)
# v0.2 : DGR, le 09 fevrier 2004 mise a jour des controles (7412 --correction boggue geotools2--)
#
# Installation de la base EPSG (http://www.epsg.org/) sous postgreSQL
Hypothese :
1.- OS Linux (installe, en fonctionnement)
2.- installation Mandrake de postgreSQL standard.
3.- postGIS installe dans contrib de pgsql (/usr/lib/pgsql).
4.- scripts SQL fournis par l'EPSG :
4.1.- EPSG_v65.mdb_DDL.sql (dictionnaire de la base) ;
4.2.- EPSG_v65.mdb_DML.sql (donnees).
5.- fonctions en jeu :
5.1.- administrateur systeme (AS) ;
5.2.- administrateur postgreSQL : c'est lui qui lance le serveur
postgreSQL (il est normalement non loggable) ;
5.3.- un utilisateur Unix, administrateur de la base a creer (US) .
But : a partir des scripts fournis par l'EPSG, re-creer la base EPSG des
systemes de references de coordonnees.
Note : les scripts SQL ont ete debarasses des retour-chariots Windows,
ainsi que des espaces en fin de ligne.
Note : EPSG_v65.mdb_DDL.sql : #302, manque une virgule entre parameter_code et coord_op_method_code
un begin; et un commit; ont ete rajoute (debut et fin)
les contraintes (ALTER TABLE) ont ete deplacees dans EPSG_v65.mdb_DDL2.sql
Note : EPSG_v65.mdb_DML.sql : l'ordre des tables n'est pas conforme aux
contraintes d'integrite, un bon ordre est :
epsg_namingsystem
epsg_alias
epsg_area
epsg_change
epsg_deprecation
epsg_coordinateaxisname
epsg_coordinatesystem
epsg_unitofmeasure
epsg_coordinateaxis
epsg_ellipsoid
epsg_primemeridian
epsg_datum
epsg_coordinatereferencesystem
epsg_coordoperationmethod
epsg_coordoperation
epsg_coordoperationpath
epsg_coordoperationparam
epsg_coordoperationparamusage
epsg_coordoperationparamvalue
epsg_versionhistory
Des begin; ont ete rajoutes avant les commit;
Note : u script SQL EPSG_v65.mdb_DDL3.sql a ete cree pour detruire ces tables !
Methode :
1.- Creation des acces a la future base (AS) :
Modification du fichier de configuration des autorisations d'acces
/var/lib/pgsql/data/hb_pga.conf, (AS) ajoute :
----
...
host epsg 127.0.0.1 255.255.255.255 password web
host epsg 192.168.0.0 255.255.255.0 password web
----
Elles indiquent que la base 'epsg' est accessible localement ou par la
machine d'adresse IP 192.168.0.0, sous reserve de fournir un mot de passe
pour un utilisation dont le nom existe dans le fichier /var/lib/pgsql/data/web :
----
...
epsg_reader
----
(AS) relance alors le serveur postgreSQL :
$ service postgresql restart
Arr�t de postgresql [ OK ]
D�marrage de postgresql [ OK ]
2.- Creation de l'administrateur de la future base (AS) :
(AS) cree l'utilisateur gestionnaire de la future base si l'utilisateur Unix postgres
n'est pas loggable (sinon cette operation s'effectue en tant que postgres) :
$ su - postgres -c "createuser --createdb --adduser --pwprompt --echo epsg_reader"
Enter password for user "epsg_reader":
Enter it again:
CREATE USER "epsg_reader" WITH PASSWORD '#epsg' CREATEDB CREATEUSER
CREATE USER
L'administrateur de la future base postgreSQL est cree.
2.- Creation de la base (US) :
L'utilisateur (administrateur) commence par creer la base postgreSQL :
$ createdb -U epsg_reader -h localhost -E LATIN9 -e epsg "EPSG sous postgreSQL"
Password:
CREATE DATABASE "epsg" WITH ENCODING = 'LATIN9'
CREATE DATABASE
Password:
COMMENT ON DATABASE "epsg" IS 'EPSG sous postgreSQL'
COMMENT
L'administrateur permet le langage PLpgSQL pour postGIS :
$ createlang -U epsg_reader -h localhost plpgsql epsg
Password:
Password:
Password:
Password:
Puis, il importe les tables associees a postGIS :
$ psql -U epsg_reader -h localhost -f /usr/lib/pgsql/contrib/postgis/postgis.sql epsg
Password:
BEGIN
...
COMMIT
$ psql -U epsg_reader -h localhost -f /usr/lib/pgsql/contrib/postgis/spatial_ref_sys.sql epsg
Password:
BEGIN
...
COMMIT
Enfin, il se donne les acces a ces tables :
$ psql -U epsg_reader -h localhost -c "grant select on geometry_columns, spatial_ref_sys to epsg_reader;" epsg
Password:
GRANT
Note : pourquoi creer une base geo-localisee pour gerer des systemes de
coordonnees ? L'idee est de pouvoir "verifier" les contraintes
spatiales associees a un systeme et, eventuellement, de graphiquement les
representer !-)
3.- Insertion des donnes de l'EPSG (US) :
L'administrateur cree d'abord le dictionnaire EPSG :
$ psql -U epsg_reader -h localhost -f /path/2/EPSG_v65.mdb_DDL.sql epsg
Password:
...
Puis, il insere les donnes :
$ psql -U epsg_reader -h localhost -f /path/2/EPSG_v65.mdb_DML.sql epsg
...
Puis, il lance les contraintes :
$ psql -U epsg_reader -h localhost -f /path/2/EPSG_v65.mdb_DDL2.sql epsg
...
4.- Controle de la base (US) :
$ psql -U epsg_reader -h localhost epsg
Password:
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
epsg=# \dt
List of relations
Name | Type | Owner
--------------------------------+-------+-------------
epsg_alias | table | epsg_reader
epsg_area | table | epsg_reader
epsg_change | table | epsg_reader
epsg_coordinateaxis | table | epsg_reader
epsg_coordinateaxisname | table | epsg_reader
epsg_coordinatereferencesystem | table | epsg_reader
epsg_coordinatesystem | table | epsg_reader
epsg_coordoperation | table | epsg_reader
epsg_coordoperationmethod | table | epsg_reader
epsg_coordoperationparam | table | epsg_reader
epsg_coordoperationparamusage | table | epsg_reader
epsg_coordoperationparamvalue | table | epsg_reader
epsg_coordoperationpath | table | epsg_reader
epsg_datum | table | epsg_reader
epsg_deprecation | table | epsg_reader
epsg_ellipsoid | table | epsg_reader
epsg_namingsystem | table | epsg_reader
epsg_primemeridian | table | epsg_reader
epsg_unitofmeasure | table | epsg_reader
epsg_versionhistory | table | epsg_reader
geometry_columns | table | epsg_reader
spatial_ref_sys | table | epsg_reader
(22 rows)
epsg=# \q
Si la bibliotheque geotools2 est installe, un controle plus fin sera :
$ java -cp /path/2/opengis-2.0-B2-DEV.jar:\
/path/2/resources-2.0-B2-DEV.jar:\
/path/2/cts-coordtrans-2.0-B2-DEV.jar:\
/path/2/postgresql-3.0.jar:$CLASSPATH \
org.geotools.cs.CoordinateSystemEPSGFactory \
-driver=org.postgresql.Driver \
-connection="jdbc:postgresql://localhost:5432/epsg?user=epsg_reader&password=#epsg" \
-implementation=org.geotools.cs.CoordinateSystemModifiedEPSGFactory \
4326 2154 7412
<=== EPSG 4326 ===>
GEOGCS["WGS 84",
DATUM["World Geodetic System 1984",
SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]
],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["�0,017 rad",0.017453292519943278],
AXIS["Geodetic latitude",NORTH],
AXIS["Geodetic longitude",EAST],
AUTHORITY["EPSG","4326"]
]
<=== EPSG 2154 ===>
P
没有合适的资源?快使用搜索试试~ 我知道了~
geotools工具
共548个文件
html:378个
png:113个
gif:24个
5星 · 超过95%的资源 需积分: 9 52 下载量 33 浏览量
2009-09-11
14:20:04
上传
评论
收藏 4.7MB ZIP 举报
温馨提示
geotools工具,帮助你开发地理信息系统.使得在短时间取得进步
资源推荐
资源详情
资源评论
收起资源包目录
geotools工具 (548个子文件)
site.css 68KB
FactoryUsingOracleSQL 431B
CreateIssue2.gif 28KB
feature_type.gif 21KB
feature.gif 21KB
styling.GIF 19KB
simple.GIF 16KB
descriptor.GIF 12KB
featuretypestyle.GIF 10KB
featuretypestyle.gif 10KB
symbolizers.gif 9KB
CreateIssue.gif 5KB
information.gif 1005B
smile.gif 699B
error.gif 633B
adfav_16.gif 625B
docs_16.gif 614B
forbidden.gif 613B
check.gif 604B
file.gif 596B
home_16.gif 594B
warning.gif 569B
star_yellow.gif 567B
blogentry_16.gif 268B
bullet_blue.gif 60B
spacer.gif 43B
index.html 73KB
1 BXFS Encoding Tutorial.html 48KB
0 Purchase Order Parsing Tutorial.html 40KB
07 PostGIS Lab.html 34KB
Point Set Theory and the DE-9IM Matrix.html 33KB
Image Mosaicing Pyramidal JDBC Plugin.html 32KB
Manual.html 27KB
1 Property DataStore Readonly Implementation.html 27KB
Feature Model Guide.html 27KB
1 Creating PropertyDataStore.html 26KB
5 Optimization of PropertyDataStore.html 26KB
03 First Project.html 25KB
04 How to Read a Shapefile.html 25KB
06 CSV2SHP Lab.html 23KB
Welcome to Eclipse Developers.html 23KB
3 Making PropertyDataStore Writable.html 22KB
Home.html 21KB
08 FeatureCollection.html 20KB
05 How to write a Plugin - from Interface to Factory.html 20KB
04 How to Create a DataStore or DataAccess.html 19KB
EPSG Postgres Plugin.html 19KB
08 ImageLab.html 18KB
Reference.html 18KB
Welcome to NetBeans developers.html 18KB
03 Using Transformers for XML Generation.html 17KB
Filter Examples.html 17KB
How to generate XML schema from JAXB annotations on the Metadata module.html 17KB
3 Simple and Complex Bindings.html 17KB
Managing DataStores using Repository or Catalog.html 17KB
06 Style Layer Descriptor Document.html 16KB
0 Parsing Overview.html 16KB
ArcSDE DataStore.html 16KB
4 Handling Many Threads.html 16KB
05 SHP2SHP Lab.html 16KB
02 Meet the GeoTools Library.html 16KB
Filter.html 15KB
2 Using PropertyDataStore to Read Files.html 15KB
GML XML Support.html 15KB
How to Find a Factory.html 15KB
02 GML Example.html 14KB
Symbols, Terms and Definitions.html 14KB
0 Referencing Overview.html 14KB
04 Working with Surface.html 14KB
04 What Axis is X.html 14KB
Implementing a new Process.html 14KB
EPSG Oracle Plugin.html 14KB
3 Authorities backed by the EPSG Database.html 13KB
Feature.html 13KB
01 CRS Helper Class.html 13KB
Using SpatialIndex and LocationIndexLine to Snap points.html 12KB
2 Binding Execution.html 12KB
FilterVisitor Examples.html 12KB
01 ReferencedEnvelope.html 11KB
4 Using PropertyDataStore to Write Files.html 11KB
02 Create a GridCoverage.html 11KB
03 SimpleFeatureTypeBuilder and SimpleFeatureBuilder.html 11KB
1 Configuration Parameter Reference.html 11KB
1 Encoding Overview.html 11KB
10 Communication and Support.html 11KB
03 GeoTools and Eclipse or OSGi.html 11KB
Graphs.html 11KB
2 Breakout Advice from groldan to sfarber about gt 2.4.x based Binding Implementation.html 11KB
5 Binding Testing.html 11KB
Creating an ISO Geometry from WKT.html 11KB
07 Symbolizers.html 10KB
00 Source License.html 10KB
03 Use a GridCoverage.html 10KB
Old Creating a DataStore Tutorial.html 10KB
Definition.html 10KB
Semi-major axis.html 9KB
05 Style.html 9KB
01 CQL Examples.html 9KB
02 Parameters.html 9KB
02 Geometry Relationships.html 9KB
共 548 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- ZhuiMengChun2014-01-03东西很不错,使用了
- 郁郁20152015-09-07非常好,可以使用,感谢楼主分享
- jiyanwan_972011-12-30一直在寻找这方面的文章,最好是汉化的,读英文文章还是比较费劲,许多东西也不好理解,这方面的资料太少
- 胖子开发2013-03-08东西不错,希望楼主继续出相关的文章,有了这个神器,开发gis 方便多了
wkswks
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功