- 浏览: 1045359 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (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 2377http://www.cnblogs.com/clarkzhe ... -
数据转换系列二--shp格式数据导入PostGIS数据库之ogr2ogr命令
2010-03-31 08:12 5966http://andrewzhuyl.spaces.live. ... -
数据转换系列一--e00格式向shp(shapefile)转换
2010-03-31 08:11 5074数据转换系列一--e00格式向shp(shapefile)转换 ... -
基于Oracle Spatial的空间分析性能优化研究
2010-03-29 08:13 1338http://www.lw23.com/pdf_5c5f0e6 ... -
Oracle Spatial 和 ArcSDE区别与联系
2010-03-29 08:09 7341一、ORACLE SPATIAL概述 ORAC ... -
浅谈Oracle Spatial几何结构
2010-03-29 08:06 1290http://database.51cto.com/art/2 ... -
Oracle Spatial创建空间索引时遇到的ORA-29855问题
2009-09-16 10:18 3958过程描述: 执行的SQL语句:CREATE INDEX G ... -
Oracle Spatial 空间分析操作函数——SDO_WITHIN_DISTANCE
2009-09-16 10:16 7768SDO_GEOM.SDO_WITHIN_DISTANCE(sd ... -
Oracle Spatial 空间分析操作函数——SDO_GEOM.SDO_NN
2009-09-16 10:16 5620SDO_NN( sdo_Geometry1, sdo_Geom ... -
Oracle Spatial 空间分析操作函数——SDO_GEOM.RELATE
2009-09-16 10:15 9069http://gis8.blog.sohu.com/78072 ... -
Oracle Spatial: Spatial Concepts
2009-09-15 11:13 1450http://www.cnblogs.com/mjgforev ... -
选择矩形框内的空间对象
2009-04-16 15:25 1256select * from well t WHERE ... -
GIS中的坐标
2009-04-16 13:36 2343地图是用坐标来描述的,而坐标又是如何确定的呢?地球是一个形状不 ... -
网格索引
2009-04-16 13:34 1762http://blog.csdn.net/sjzwl/arch ... -
四叉树索引
2009-04-16 13:32 2094http://blog.csdn.net/sjzwl/arch ... -
空间索引
2009-04-16 13:27 1305http://blog.csdn.net/sjzwl/arch ... -
空间分析的基础--数据
2009-04-16 11:25 1108数据是信息化的基础,空间分析是GIS核心技术之一,深层次的数据 ... -
将 Oracle Spatial 与geoserver, Google Earth 集成
2009-04-16 11:08 3990将 Oracle Spatial 与 Google Earth ... -
执行基于位置的分析
2009-04-16 11:00 1215http://www.oracle.com/technolog ... -
Oracle Spatial User's Guide and Reference
2009-04-16 10:44 968http://download.oracle.com/docs ...
相关推荐
ogr2ogr是GDAL(Geospatial Data Abstraction Library)的一部分,它是一个强大的开源库,用于处理多种地理空间数据格式。这个工具的主要功能是进行数据转换,它支持大量的GIS(地理信息系统)数据格式,包括矢量和...
- **数据类型不兼容**:检查Shapefile字段类型与MySQL表字段类型是否兼容,如有需要,可以使用 ogr2ogr 的 `-nlt` 参数指定几何类型。 6. **优化与注意事项**:为了提高性能,可以考虑使用InnoDB引擎代替MyISAM,...
标题中的“一个好用的各种空间数据转换工具ogr2gui”指的是OGR2GUI,这是一个基于开源库GDAL(Geospatial Data Abstraction Library)的图形用户界面应用,用于方便地进行空间数据格式之间的转换。GDAL是处理地理...
GIS转换工具GisConvert,基于开源的Ogr2Ogr库,是一款强大的地理信息系统数据转换软件。Ogr2Ogr是GDAL(Geospatial Data Abstraction Library)的一部分,用于处理多种格式的地理空间数据。GDAL是一个强大的开源库,...
2. **数据模型**:OGR提供了简单的特征(Feature)模型,每个特征包含几何对象(Geometry)和属性字段(Attribute Field)。几何对象可以是点、线或多边形等,属性字段则存储与几何相关的元数据。 3. **数据读写...
##### 2. 打开数据源 ```cpp OGRDataSource *poDS = OGRSFDriverRegistrar::Open("point.shp", FALSE); // FALSE表示只读模式 if (poDS == NULL) { printf("Open failed.\n"); exit(1); } ``` 这里使用`...
在IT行业中,GIS(地理信息系统)是用于处理和分析地理数据的重要工具,而GDAL(Geospatial Data Abstraction Library)和OGR2OGR则是GIS领域的两个关键组件。这两个开源库提供了强大的功能,用于读取、转换和操作...
导入SHP文件到Oracle Spatial时,可以使用多种工具,如Oracle Data Integrator (ODI)、FME (Feature Manipulation Engine)、 ogr2ogr(GDAL库的一部分)等。这些工具提供了图形化界面或命令行接口,方便用户进行...
2. **数据读写**:OGR提供API,用于读取、创建和编辑矢量数据,支持多种操作,如添加、删除、修改特征,以及创建新的图层。 3. **几何对象**:OGR定义了一套通用的几何对象,如点、线串、多边形等,方便在不同格式...
ogrtool是一个命令行实用程序,它封装了用于操作地图数据的ogr2ogr程序。 它旨在使重复性任务更简单,更容易记住如何做(并简化自动化)。 不要太当真,主要是让我作为非程序员的生活更轻松。 安装 首先模板连接文件...
为了将读取的海图数据更好地存储起来,定义了转换过程中所需的数据参数描述、特征记录和空间记录类。根据空间记录元素之间的拓扑关系,定义了CPointFeature、CLineFeature和CAreaFeature 3个类,分别用于存储描述点...
在创建数据源之前,使用`gdal.SetConfigOption()`设置两个参数: - `GDAL_FILENAME_IS_UTF8` 设置为 "YES",告诉GDAL文件名是UTF-8编码。 - `SHAPE_ENCODING` 设置为 "GBK" 或者其他合适的编码,如 "UTF-8",指定...
2. **OGR数据读取**:OGR通过`Ogr.Open`方法读取矢量数据,返回一个`DataSource`对象。你可以列举图层`dataSource.GetLayerCount()`,并访问每个图层`dataSource.GetLayer(index)`,图层中的特征可以通过`layer....
- **设备参数读取与验证**:确保模型中的参数准确无误。 - **状态估计**:基于实时数据估计电网状态。 **2. 状态估计** 状态估计是EMS(能量管理系统)的核心组成部分,其目标是构建一个完整且可靠的实时网络状态...
在GIS(地理信息系统)领域,SHP文件是一...注意,根据SHP文件的具体内容和需求,可能需要调整数据类型、坐标系或其他 ogr2ogr 参数。同时,为了性能考虑,建议使用InnoDB引擎代替MyISAM,并启用InnoDB的Spatial扩展。
除此之外, ogr_*.dll 和 osr_*.dll 文件与GDAL的矢量数据处理部分有关,它们处理地理空间数据如形状文件和坐标系统。`gdalconst_*.dll`和`gdalconst_wrap.dll`则包含了GDAL库中常量定义的相关功能。 总的来说,...
在2009年12月10日这个时间点,常见的转换工具可能包括MapGIS自身的导出功能,以及第三方软件如FME(Feature Manipulation Engine)或ogr2ogr(GDAL库的一部分)。 ogr2ogr是一款开源命令行工具,可以处理多种GIS...
这个脚本可能利用了像是`geopandas`、`ogr2ogr`或`pykml`等Python库来处理地理空间数据。 "运行说明.swf"可能是一个Flash动画教程或指南,提供了关于如何使用`kml2shp.py`脚本的步骤和说明。SWF是Adobe Flash ...
2. **使用GDAL/OGR**:通过GDAL/OGR的`ogr2ogr`命令,我们可以实现KML到SHP的转换。基本命令格式如下: ``` ogr2ogr -f "ESRI Shapefile" 输出.shp 输入.kml ``` 其中,`输入.kml`是你的KML文件路径,`输出.shp`...
ogr2ogr是FWtools中的关键组件,它是一个多功能的地理数据转换工具,支持多种数据格式间的转换,包括ESRI的Shapefile、PostGIS数据库、KML、GML等。在FWtools 2.4.7中, ogr2ogr可以用于将shapefile数据转换为MySQL...