- 浏览: 1027133 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (538)
- 奇文共赏 (36)
- spring (13)
- hibernate (10)
- AOP/Aspectj (9)
- spring security (7)
- lucence (5)
- compass (3)
- jbmp (2)
- jboss rule(drools) (0)
- birt (1)
- jasper (1)
- cxf (3)
- flex (98)
- webgis (6)
- 设计模式 (1)
- 代码重构 (2)
- log4j (1)
- tomcat (9)
- 神品音乐 (1)
- 工作计划 (2)
- appfuse (1)
- svn (4)
- 寻章摘句 (3)
- eclipse (10)
- arcgis api for flex (1)
- 算法 (5)
- opengis-cs (1)
- bug心得 (13)
- 图标 (1)
- software&key (14)
- java (17)
- 搞笑视频 (13)
- sqlserver (9)
- postgresql (1)
- postgis (0)
- geoserver (5)
- 日子 (50)
- 水晶报表 (1)
- 绝对电影 (3)
- Alternativa3D (1)
- 酷站大全 (10)
- c++ (5)
- oracle (17)
- oracle spatial (25)
- flashbuilder4 (3)
- TweenLite (1)
- DailyBuild (6)
- 华山论贱 (5)
- 系统性能 (5)
- 经典古文 (6)
- SOA/SCA/OSGI (6)
- jira (2)
- Hadoop生态圈(hadoop/hbase/pig/hive/zookeeper) (37)
- 风水 (1)
- linux操作基础 (17)
- 经济 (4)
- 茶 (3)
- JUnit (1)
- C# dotNet (1)
- netbeans (1)
- Java2D (1)
- QT4 (1)
- google Test/Mock/AutoTest (3)
- maven (1)
- 3d/OSG (1)
- Eclipse RCP (3)
- CUDA (1)
- Access control (0)
- http://linux.chinaunix.net/techdoc/beginner/2008/01/29/977725.shtml (1)
- redis (1)
最新评论
-
dove19900520:
朋友,你确定你的标题跟文章内容对应???
tomcat控制浏览器不缓存 -
wussrc:
我只想说牛逼,就我接触过的那点云计算的东西,仔细想想还真是这么 ...
别样解释云计算,太TM天才跨界了 -
hw_imxy:
endpoint="/Hello/messagebr ...
flex+java代码分两个工程 -
gaohejie:
rsrsdgrfdh坎坎坷坷
Flex 与 Spring 集成 -
李涤尘:
谢谢。不过说得有点太罗嗦了。
Oracle数据库数据的导入及导出(转)
http://www.gdal.org/ogr2ogr.html
converts simple features data between file formats
Usage:
Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-gt n]
[-select field_list] [-where restricted_where]
[-progress] [-sql <sql statement>] [-dialect dialect]
[-preserve_fid] [-fid FID]
[-spat xmin ymin xmax ymax] [-wrapdateline]
[-clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent]
[-clipsrcsql sql_statement] [-clipsrclayer layer]
[-clipsrcwhere expression]
[-clipdst [xmin ymin xmax ymax]|WKT|datasource]
[-clipdstsql sql_statement] [-clipdstlayer layer]
[-clipdstwhere expression]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]
[-segmentize max_dist] [-fieldTypeToString All|(type1[,type2]*)]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name] [-nlt type] [layer [layer ...]]
This program can be used to convert simple features data between file formats performing various operations during the process such as spatial or attribute selections, reducing the set of attributes, setting the output coordinate system or even reprojecting the features during translation.
-f format_name:
output file format name (default is ESRI Shapefile), some possible values are:
-f "ESRI Shapefile"
-f "TIGER"
-f "MapInfo File"
-f "GML"
-f "PostgreSQL"
-append:
Append to existing layer instead of creating new
-overwrite:
Delete the output layer and recreate it empty
-update:
Open existing output datasource in update mode rather than trying to create a new one
-select field_list:
Comma-delimited list of fields from input layer to copy to the new layer. A field is skipped if mentioned previously in the list even if the input layer has duplicate field names. (Defaults to all; any field is skipped if a subsequent field with same name is found.)
-progress:
(starting with GDAL 1.7.0) Display progress on terminal. Only works if input layers have the "fast feature count" capability.
-sql sql_statement:
SQL statement to execute. The resulting table/layer will be saved to the output.
-dialect dialect:
SQL dialect. In some cases can be used to use (unoptimized) OGR SQL instead of the native SQL of an RDBMS by passing OGRSQL.
-wrapdateline:
(starting with GDAL 1.7.0) split geometries crossing the dateline meridian (long. = +/- 180deg)
-where restricted_where:
Attribute query (like SQL WHERE)
-skipfailures:
Continue after a failure, skipping the failed feature.
-gt n:
group n features per transaction (default 200)
-spat xmin ymin xmax ymax:
spatial query extents. Only features whose geometry intersects the extents will be selected. The geometries will not be clipped unless -clipsrc is specified
-clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent:
(starting with GDAL 1.7.0) clip geometries to the specified bounding box (expressed in source SRS), WKT geometry (POLYGON or MULTIPOLYGON), from a datasource or to the spatial extent of the -spat option if you use the spat_extent keyword. When specifying a datasource, you will generally want to use it in combination of the -clipsrclayer, -clipsrcwhere or -clipsrcsql options
-clipsrcsql sql_statement:
Select desired geometries using an SQL query instead.
-clipsrclayer layername:
Select the named layer from the source clip datasource.
-clipsrcwhere expression:
Restrict desired geometries based on attribute query.
-clipdst xmin ymin xmax ymax:
(starting with GDAL 1.7.0) clip geometries after reprojection to the specified bounding box (expressed in dest SRS), WKT geometry (POLYGON or MULTIPOLYGON) or from a datasource. When specifying a datasource, you will generally want to use it in combination of the -clipdstlayer, -clipdstwhere or -clipdstsql options
-clipdstsql sql_statement:
Select desired geometries using an SQL query instead.
-clipdstlayer layername:
Select the named layer from the destination clip datasource.
-clipdstwhere expression:
Restrict desired geometries based on attribute query.
-dsco NAME=VALUE:
Dataset creation option (format specific)
-lco NAME=VALUE:
Layer creation option (format specific)
-nln name:
Assign an alternate name to the new layer
-nlt type:
Define the geometry type for the created layer. One of NONE, GEOMETRY, POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT, MULTIPOLYGON or MULTILINESTRING. Add "25D" to the name to get 2.5D versions.
-a_srs srs_def:
Assign an output SRS
-t_srs srs_def:
Reproject/transform to this SRS on output
-s_srs srs_def:
Override source SRS
-fid fid:
If provided, only the feature with this feature id will be reported. Operates exclusive of the spatial or attribute queries. Note: if you want to select several features based on their feature id, you can also use the fact the 'fid' is a special field recognized by OGR SQL. So, '-where "fid in (1,3,5)"' would select features 1, 3 and 5.
-segmentize max_dist:
(starting with GDAL 1.6.0) maximum distance between 2 nodes. Used to create intermediate pointsspatial query extents
-fieldTypeToString type1, ...:
(starting with GDAL 1.7.0) converts any field of the specified type to a field of type string in the destination layer. Valid types are : Integer, Real, String, Date, Time, DateTime, Binary, IntegerList, RealList, StringList. Special value All can be used to convert all fields to strings. This is an alternate way to using the CAST operator of OGR SQL, that may avoid typing a long SQL query.
Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT definition.
Example appending to an existing layer (both flags need to be used):
% ogr2ogr -update -append -f PostgreSQL PG:dbname=warmerda abc.tab
Example reprojecting from ETRS_1989_LAEA_52N_10E to EPSG:4326 and clipping to a bounding box
% ogr2ogr -wrapdateline -t_srs EPSG:4326 -clipdst -5 40 15 55 france_4326.shp europe_laea.shp
More examples are given in the individual format pages.
converts simple features data between file formats
Usage:
Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-gt n]
[-select field_list] [-where restricted_where]
[-progress] [-sql <sql statement>] [-dialect dialect]
[-preserve_fid] [-fid FID]
[-spat xmin ymin xmax ymax] [-wrapdateline]
[-clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent]
[-clipsrcsql sql_statement] [-clipsrclayer layer]
[-clipsrcwhere expression]
[-clipdst [xmin ymin xmax ymax]|WKT|datasource]
[-clipdstsql sql_statement] [-clipdstlayer layer]
[-clipdstwhere expression]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]
[-segmentize max_dist] [-fieldTypeToString All|(type1[,type2]*)]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name] [-nlt type] [layer [layer ...]]
This program can be used to convert simple features data between file formats performing various operations during the process such as spatial or attribute selections, reducing the set of attributes, setting the output coordinate system or even reprojecting the features during translation.
-f format_name:
output file format name (default is ESRI Shapefile), some possible values are:
-f "ESRI Shapefile"
-f "TIGER"
-f "MapInfo File"
-f "GML"
-f "PostgreSQL"
-append:
Append to existing layer instead of creating new
-overwrite:
Delete the output layer and recreate it empty
-update:
Open existing output datasource in update mode rather than trying to create a new one
-select field_list:
Comma-delimited list of fields from input layer to copy to the new layer. A field is skipped if mentioned previously in the list even if the input layer has duplicate field names. (Defaults to all; any field is skipped if a subsequent field with same name is found.)
-progress:
(starting with GDAL 1.7.0) Display progress on terminal. Only works if input layers have the "fast feature count" capability.
-sql sql_statement:
SQL statement to execute. The resulting table/layer will be saved to the output.
-dialect dialect:
SQL dialect. In some cases can be used to use (unoptimized) OGR SQL instead of the native SQL of an RDBMS by passing OGRSQL.
-wrapdateline:
(starting with GDAL 1.7.0) split geometries crossing the dateline meridian (long. = +/- 180deg)
-where restricted_where:
Attribute query (like SQL WHERE)
-skipfailures:
Continue after a failure, skipping the failed feature.
-gt n:
group n features per transaction (default 200)
-spat xmin ymin xmax ymax:
spatial query extents. Only features whose geometry intersects the extents will be selected. The geometries will not be clipped unless -clipsrc is specified
-clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent:
(starting with GDAL 1.7.0) clip geometries to the specified bounding box (expressed in source SRS), WKT geometry (POLYGON or MULTIPOLYGON), from a datasource or to the spatial extent of the -spat option if you use the spat_extent keyword. When specifying a datasource, you will generally want to use it in combination of the -clipsrclayer, -clipsrcwhere or -clipsrcsql options
-clipsrcsql sql_statement:
Select desired geometries using an SQL query instead.
-clipsrclayer layername:
Select the named layer from the source clip datasource.
-clipsrcwhere expression:
Restrict desired geometries based on attribute query.
-clipdst xmin ymin xmax ymax:
(starting with GDAL 1.7.0) clip geometries after reprojection to the specified bounding box (expressed in dest SRS), WKT geometry (POLYGON or MULTIPOLYGON) or from a datasource. When specifying a datasource, you will generally want to use it in combination of the -clipdstlayer, -clipdstwhere or -clipdstsql options
-clipdstsql sql_statement:
Select desired geometries using an SQL query instead.
-clipdstlayer layername:
Select the named layer from the destination clip datasource.
-clipdstwhere expression:
Restrict desired geometries based on attribute query.
-dsco NAME=VALUE:
Dataset creation option (format specific)
-lco NAME=VALUE:
Layer creation option (format specific)
-nln name:
Assign an alternate name to the new layer
-nlt type:
Define the geometry type for the created layer. One of NONE, GEOMETRY, POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT, MULTIPOLYGON or MULTILINESTRING. Add "25D" to the name to get 2.5D versions.
-a_srs srs_def:
Assign an output SRS
-t_srs srs_def:
Reproject/transform to this SRS on output
-s_srs srs_def:
Override source SRS
-fid fid:
If provided, only the feature with this feature id will be reported. Operates exclusive of the spatial or attribute queries. Note: if you want to select several features based on their feature id, you can also use the fact the 'fid' is a special field recognized by OGR SQL. So, '-where "fid in (1,3,5)"' would select features 1, 3 and 5.
-segmentize max_dist:
(starting with GDAL 1.6.0) maximum distance between 2 nodes. Used to create intermediate pointsspatial query extents
-fieldTypeToString type1, ...:
(starting with GDAL 1.7.0) converts any field of the specified type to a field of type string in the destination layer. Valid types are : Integer, Real, String, Date, Time, DateTime, Binary, IntegerList, RealList, StringList. Special value All can be used to convert all fields to strings. This is an alternate way to using the CAST operator of OGR SQL, that may avoid typing a long SQL query.
Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT definition.
Example appending to an existing layer (both flags need to be used):
% ogr2ogr -update -append -f PostgreSQL PG:dbname=warmerda abc.tab
Example reprojecting from ETRS_1989_LAEA_52N_10E to EPSG:4326 and clipping to a bounding box
% ogr2ogr -wrapdateline -t_srs EPSG:4326 -clipdst -5 40 15 55 france_4326.shp europe_laea.shp
More examples are given in the individual format pages.
发表评论
-
利用Oracle Spatial求几何对象的长度和面积
2010-04-28 16:38 2337http://www.cnblogs.com/clarkzhe ... -
数据转换系列二--shp格式数据导入PostGIS数据库之ogr2ogr命令
2010-03-31 08:12 5847http://andrewzhuyl.spaces.live. ... -
数据转换系列一--e00格式向shp(shapefile)转换
2010-03-31 08:11 4914数据转换系列一--e00格式向shp(shapefile)转换 ... -
基于Oracle Spatial的空间分析性能优化研究
2010-03-29 08:13 1294http://www.lw23.com/pdf_5c5f0e6 ... -
Oracle Spatial 和 ArcSDE区别与联系
2010-03-29 08:09 7289一、ORACLE SPATIAL概述 ORAC ... -
浅谈Oracle Spatial几何结构
2010-03-29 08:06 1260http://database.51cto.com/art/2 ... -
Oracle Spatial创建空间索引时遇到的ORA-29855问题
2009-09-16 10:18 3848过程描述: 执行的SQL语句:CREATE INDEX G ... -
Oracle Spatial 空间分析操作函数——SDO_WITHIN_DISTANCE
2009-09-16 10:16 7698SDO_GEOM.SDO_WITHIN_DISTANCE(sd ... -
Oracle Spatial 空间分析操作函数——SDO_GEOM.SDO_NN
2009-09-16 10:16 5550SDO_NN( sdo_Geometry1, sdo_Geom ... -
Oracle Spatial 空间分析操作函数——SDO_GEOM.RELATE
2009-09-16 10:15 9013http://gis8.blog.sohu.com/78072 ... -
Oracle Spatial: Spatial Concepts
2009-09-15 11:13 1424http://www.cnblogs.com/mjgforev ... -
选择矩形框内的空间对象
2009-04-16 15:25 1219select * from well t WHERE ... -
GIS中的坐标
2009-04-16 13:36 2292地图是用坐标来描述的,而坐标又是如何确定的呢?地球是一个形状不 ... -
网格索引
2009-04-16 13:34 1733http://blog.csdn.net/sjzwl/arch ... -
四叉树索引
2009-04-16 13:32 2055http://blog.csdn.net/sjzwl/arch ... -
空间索引
2009-04-16 13:27 1269http://blog.csdn.net/sjzwl/arch ... -
空间分析的基础--数据
2009-04-16 11:25 1075数据是信息化的基础,空间分析是GIS核心技术之一,深层次的数据 ... -
将 Oracle Spatial 与geoserver, Google Earth 集成
2009-04-16 11:08 3934将 Oracle Spatial 与 Google Earth ... -
执行基于位置的分析
2009-04-16 11:00 1184http://www.oracle.com/technolog ... -
Oracle Spatial User's Guide and Reference
2009-04-16 10:44 934http://download.oracle.com/docs ...
相关推荐
空间数据转换说明文档,是gis二次开发的重要工具
通过GDAL中ogr2ogr将shp数据转成SQL导入到mysql数据库中文档步骤以及碰到的问题解决方法
GDAL的ogr2ogr可执行程序的一个GUI版本,采用的是qt界面,包含源代码和可执行程序,大家可以下载学习一下
地图数据格式转换,可以转换文件,也可以转换数据库。
shpfile批量转换成mapinfo支持的tab使用ogr2ogr.py
地理信息转换转换 GIS 数据的工具 (Ogr2Ogr GUI)
它可以读取和处理多种流行的矢量数据(如ESRI的Shapefile、S-57、SDTS、PostGIS、Oracle Spatial、以及Mapinfo的mid/mif和TAB格式),本文将讲解OGR库的安装、OGR的数据模型以及主要类的函数功能,最后将通过几个...
该教程内容包含如何安装GDAL/OGR模块,矢量模块,栅格模块,投影变换模块。各个模块提供如何读取与操作矢量数据、栅格数据、投影变换的例子,简单易懂,帮助初学者快速入门,可以查找相应的函数如何使用。
GDAL/OGR是一款开源的GIS数据读取引擎,能够读取100多种影像数据和多种矢量GIS数据,十分方便数据转换
python库,解压后可用。 资源全名:ogr-0.0.3-py2.py3-none-any.whl
pgsql-ogr-fdw, 用于OGR的PostgreSQL外部数据包装 : PostgreSQL外部数据包装器动机OGR是空间数据访问库的矢量一半。 它允许使用一个简单的C API数据读取和写入来访问大量的GIS数据格式。 由于OGR公开了一个简单的表...
GDAL\OGR_2.3.1_x64 源码,gdal/ogr C++源码,GDAL\OGR_2.3.1版本的开源源码
OGR很好的一个第三方类库,可以提供各种矢量文件的读写操作,实现不同矢量文件的相互转换。该文档是在线OGR参考下载的,便于日常无网学习来参考。
OGR常用函数,帮你了解OGR的常用功能与类,十分实用。
ogr_csharpogr_
ogr_wrapogr_
要求ogr2ogr需要命令行工具ogr2ogr - 。 建议使用最新版本。安装 npm install -g ogre有关特定的OS安装帮助,请参见 。跑步要运行该应用程序: ogre -p 3000并在浏览器中访问以下网址: http://localhost:3000选项...
GDAL-python教程基础篇OGR空间计算全文共6页,当前为第1页。GDAL-python教程基础篇OGR空间计算全文共6页,当前为第1页。GDAL python教程基础篇OGR空间计算 GDAL-python教程基础篇OGR空间计算全文共6页,当前为第1页...
用doxygen和graphviz生成的针对GIS和RS开发人员的,C++OGR帮助文档html版。
支持各种空间数据转换,如gpx转tap