欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
GeoTools
小 (Geotools移动到GeoTools) |
|||
(未显示1个用户的17个中间版本) | |||
第1行: | 第1行: | ||
[[Image:geotools-logo.gif|right]] | [[Image:geotools-logo.gif|right]] | ||
− | + | {{SeeWikipedia}} | |
− | GeoTools is an open source (LGPL) Java code library which provides standards compliant methods for the manipulation of geospatial data, for example to implement Geographic Information Systems (GIS). The GeoTools library implements Open Geospatial Consortium (OGC) specifications as they are developed, in close collaboration with the [[GeoAPI]] and [[GeoWidgets]] projects. | + | GeoTools is an open source java GIS toolkit. |
+ | |||
+ | GeoTools is an open source (LGPL) Java code library which provides standards compliant methods for the manipulation of geospatial data, for example to implement Geographic Information Systems (GIS). The GeoTools library implements Open Geospatial Consortium (OGC) specifications as they are developed, in close collaboration with the [[GeoAPI]] and [[GeoWidgets]] projects. Includes two great SLD based renderers, raster access and reprojection. Plugns fo Shapefile, ArcGrid, ArcSDE, Postgis, OracleSpatial, MySQL and many more. | ||
[http://docs.codehaus.org/display/GEOT/Using+NetBeans+with+Geotools Using NetBeans with Geotools] | [http://docs.codehaus.org/display/GEOT/Using+NetBeans+with+Geotools Using NetBeans with Geotools] | ||
第9行: | 第11行: | ||
[[uDig]] is also GeoTools application. | [[uDig]] is also GeoTools application. | ||
+ | |||
+ | There are two system architecture patterns in use: | ||
+ | * layers for data abstraction | ||
+ | * plugins for extendability | ||
+ | ==Install== | ||
+ | 获得源码 http://download.huihoo.com/geotools/ | ||
+ | unzip gt2-2.4-RC0-src.zip | ||
+ | cd gt2-2.4-RC0 | ||
+ | mvn install | ||
+ | mvn archetype:create -DgroupId=org.geotools.demo.example -DartifactId=geotools-example | ||
+ | creating a geotools-example directory | ||
+ | cd geotools-example | ||
+ | mvn eclipse:eclipse | ||
+ | mvn compile // gt2-2.3.5 会有错误, 建议使用 gt2-2.4 | ||
+ | mvn exec:java -Dexec.mainClass="org.geotools.demo.example.App" | ||
+ | [INFO] [exec:java] | ||
+ | Hello GeoTools:2.4.SNAPSHOT | ||
+ | [INFO] BUILD SUCCESSFUL | ||
+ | 编译成功 :) | ||
+ | more details: http://docs.codehaus.org/display/GEOTDOC/03+First+Project | ||
+ | ==Maven== | ||
+ | m2 directory | ||
+ | Linux: ~/.m2 | ||
+ | Windows: C:\Documents and Settings\USER\.m2 | ||
+ | settings.xml | ||
+ | <settings> | ||
+ | <mirrors> | ||
+ | <mirror> | ||
+ | <id>mirror.repo</id> | ||
+ | <name>mirror of Ibiblio/</name> | ||
+ | <url>/home/allen/m2/repository</url> | ||
+ | <mirrorOf>ibiblio</mirrorOf> | ||
+ | </mirror> | ||
+ | </mirrors> | ||
+ | </settings> | ||
+ | ==Getting Started== | ||
+ | |||
+ | ==Database== | ||
+ | ===PostGIS=== | ||
+ | JDBC DataStore | ||
+ | map = new HashMap(); | ||
+ | map.put("dataSource", source); | ||
+ | map.put("dbType", "postgis"); | ||
+ | DataStore store = DataStoreFinder.getDataStore(map); | ||
+ | connect PostGIS | ||
+ | java.util.Map params = new java.util.HashMap(); | ||
+ | params.put(PostgisDataStoreFactory.DBTYPE.key, "postgis"); | ||
+ | params.put(PostgisDataStoreFactory.HOST.key, "localhost"); | ||
+ | params.put(PostgisDataStoreFactory.PORT.key, 5432); | ||
+ | params.put(PostgisDataStoreFactory.SCHEMA.key, "public"); | ||
+ | params.put(PostgisDataStoreFactory.DATABASE.key, "database"); | ||
+ | params.put(PostgisDataStoreFactory.USER.key, "postgres"); | ||
+ | params.put(PostgisDataStoreFactory.PASSWD.key, "postgres"); | ||
+ | DataStore dataStore=DataStoreFinder.getDataStore(params); | ||
+ | String typeName = dataStore.getTypeNames()[0]; | ||
+ | FeatureSource featureSource = dataStore.getFeatureSource( typeName ); | ||
+ | Database | ||
+ | $ createdb -U postgres spearfish | ||
+ | $ createlang -U postgres plpgsql spearfish | ||
+ | $ psql -U postgres -f <path/to/file/>postgis.sql -d spearfish | ||
+ | $ psql -U postgres -f spearfish_data_pg.sql -d spearfish | ||
+ | $ vacuumdb -z spearfish | ||
+ | [http://docs.codehaus.org/display/GEOTDOC/PostGIS+Spearfish+Example+for+GeoTools+2.1 more detail] | ||
==Screenshots== | ==Screenshots== | ||
− | + | <gallery> | |
+ | Image:geotools-architecture.gif|Architecture | ||
+ | Image:geotools-01.jpg | ||
+ | Image:geotools-02.jpg | ||
+ | </gallery> | ||
+ | ==Links== | ||
+ | *http://geotools.codehaus.org/ | ||
+ | *http://sourceforge.net/projects/geotools/ | ||
+ | *http://download.huihoo.com/geotools/ | ||
+ | *http://docs.huihoo.com/geotools/ | ||
+ | |||
+ | {{Comment}} | ||
− | + | [[Category:GIS]] |
2010年9月16日 (四) 10:24的最后版本
您可以在Wikipedia上了解到此条目的英文信息 GeoTools Thanks, Wikipedia. |
GeoTools is an open source java GIS toolkit.
GeoTools is an open source (LGPL) Java code library which provides standards compliant methods for the manipulation of geospatial data, for example to implement Geographic Information Systems (GIS). The GeoTools library implements Open Geospatial Consortium (OGC) specifications as they are developed, in close collaboration with the GeoAPI and GeoWidgets projects. Includes two great SLD based renderers, raster access and reprojection. Plugns fo Shapefile, ArcGrid, ArcSDE, Postgis, OracleSpatial, MySQL and many more.
GeoTools2 is developed using the same modular structure as Netbeans and we plan to integrate GeoTools into Netbeans.
uDig is also GeoTools application.
There are two system architecture patterns in use:
- layers for data abstraction
- plugins for extendability
目录 |
[编辑] Install
获得源码 http://download.huihoo.com/geotools/ unzip gt2-2.4-RC0-src.zip cd gt2-2.4-RC0 mvn install mvn archetype:create -DgroupId=org.geotools.demo.example -DartifactId=geotools-example creating a geotools-example directory cd geotools-example mvn eclipse:eclipse mvn compile // gt2-2.3.5 会有错误, 建议使用 gt2-2.4 mvn exec:java -Dexec.mainClass="org.geotools.demo.example.App" [INFO] [exec:java] Hello GeoTools:2.4.SNAPSHOT [INFO] BUILD SUCCESSFUL 编译成功 :)
more details: http://docs.codehaus.org/display/GEOTDOC/03+First+Project
[编辑] Maven
m2 directory
Linux: ~/.m2 Windows: C:\Documents and Settings\USER\.m2
settings.xml
<settings> <mirrors> <mirror> <id>mirror.repo</id> <name>mirror of Ibiblio/</name> <url>/home/allen/m2/repository</url> <mirrorOf>ibiblio</mirrorOf> </mirror> </mirrors>
</settings>
[编辑] Getting Started
[编辑] Database
[编辑] PostGIS
JDBC DataStore
map = new HashMap(); map.put("dataSource", source); map.put("dbType", "postgis"); DataStore store = DataStoreFinder.getDataStore(map);
connect PostGIS
java.util.Map params = new java.util.HashMap(); params.put(PostgisDataStoreFactory.DBTYPE.key, "postgis"); params.put(PostgisDataStoreFactory.HOST.key, "localhost"); params.put(PostgisDataStoreFactory.PORT.key, 5432); params.put(PostgisDataStoreFactory.SCHEMA.key, "public"); params.put(PostgisDataStoreFactory.DATABASE.key, "database"); params.put(PostgisDataStoreFactory.USER.key, "postgres"); params.put(PostgisDataStoreFactory.PASSWD.key, "postgres"); DataStore dataStore=DataStoreFinder.getDataStore(params); String typeName = dataStore.getTypeNames()[0]; FeatureSource featureSource = dataStore.getFeatureSource( typeName );
Database
$ createdb -U postgres spearfish $ createlang -U postgres plpgsql spearfish $ psql -U postgres -f <path/to/file/>postgis.sql -d spearfish $ psql -U postgres -f spearfish_data_pg.sql -d spearfish $ vacuumdb -z spearfish
[编辑] Screenshots
[编辑] Links
- http://geotools.codehaus.org/
- http://sourceforge.net/projects/geotools/
- http://download.huihoo.com/geotools/
- http://docs.huihoo.com/geotools/
<discussion>characters_max=300</discussion>