ogr2ogr使用
简介
- org2ogr是OGR模块中提供的一个重要工具,用于对数据源进行格式转换
使用方式
- 命令行参数
[xingxing.dxx@30_28_6_20 J50F001020]$ ogr2ogr --long-usage
Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update]
[-select field_list] [-where restricted_where]
[-progress] [-sql <sql statement>] [-dialect dialect]
[-preserve_fid] [-fid FID]
[-spat xmin ymin xmax ymax] [-spat_srs srs_def] [-geomfield field]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name]
[-nlt type|PROMOTE_TO_MULTI|CONVERT_TO_LINEAR]
[-dim ||layer_dim] [layer [layer ...]] Advanced options :
[-gt n] [-ds_transaction]
[[-oo NAME=VALUE] ...] [[-doo NAME=VALUE] ...]
[-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]
[-wrapdateline][-datelineoffset val]
[[-simplify tolerance] | [-segmentize max_dist]]
[-addfields] [-unsetFid]
[-relaxedFieldNameMatch] [-forceNullable] [-unsetDefault]
[-fieldTypeToString All|(type1[,type2]*)] [-unsetFieldWidth]
[-mapFieldType srctype|All=dsttype[,srctype2=dsttype2]*]
[-fieldmap identity | index1[,index2]*]
[-splitlistfields] [-maxsubfields val]
[-explodecollections] [-zfield field_name]
[-gcp pixel line easting northing [elevation]]* [-order n | -tps]
[-nomd] [-mo "META-TAG=VALUE"]*
例子
- shape 转mapinfo文件
ogr2ogr -f "MapInfo File" -fieldTypeToString "Integer64" road Railway.shp
- shape转GeoJSON格式
ogr2ogr -f "GeoJSON" -fieldTypeToString "Integer64" road Railway.shp
- shape转wkt格式
ogr2ogr -lco "GEOMETRY=AS_WKT" -lco "SEPARATOR=TAB" -f CSV railway.csv -sql "select LUA_ID from LandUseArea" LandUseArea.shp
ogr2ogr使用的更多相关文章
- ogr2ogr: Export Well Known Text (WKT) for one feature to a CSV file
Perhaps you’re looking for this? ogr2ogr -f “CSV” “E:\4_GIS\NorthArkCartoData\UnitedStates\MO_wkt” “ ...
- GADL针对矢量数据格式转换的实用工具 —— ogr2ogr
最初,因为可爱的学弟请教如何将ESRI Shapefile文件导入Google Earth接触到了Ogr2Ogr.粗略了解之后发现,这小东西功能强大. 谷歌地球支持矢量数据的展示,前提是数据符合KML ...
- ogr ogr2ogr 矢量数据格式转换 ogrinfo 矢量数据图层信息操作 ogr gdal的一部分 gdal 命令行 库操作
- 将SHP导入MySQL中
ogr2ogr -f MySQL MySQL:smfs,host=127.0.0.1,user=root,password=gis D:\spatialData\HB\HuBeiPicture\HuB ...
- 使用FWTools来导入shp数据到mysql
使用FWTools来导入shp数据到mysql 参考地址 http://forums.mysql.com/read.php?23,122827,206841 软件下载链接 http://fwtools ...
- 将数据导入PostGIS
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess # database options db_schema = " ...
- UDF2
问题 根据给定的gps点point(x,y)和北京的shape数据,关联出 AOI ID IO 输入 gps点表 create table gps ( x double, //经度 y double ...
- GeoServer+MySQL安装及配置过程
GeoServer的安装配置请参考 http://simen-net.iteye.com/blog/609078 由于大部分WEBGIS不仅仅只是一个地图的显示,还需要一些业务处理,会有用到数据库地方 ...
- 部分GDAL工具功能简介
主要转自http://blog.csdn.net/liminlu0314?viewmode=contents 部分GDAL工具功能简介 gdalinfo.exe 显示GDAL支持的各种栅格文件的信息. ...
随机推荐
- wordcloud词云--可视化
import jieba import wordcloud f = open("新时代中国特色社会主义.txt", "r", encoding="gb ...
- [转] kerberos安装配置与使用
[From] https://blog.csdn.net/lovebomei/article/details/79807484 1.Kerberos协议: Kerberos协议主要用于计算机网络的身份 ...
- mAP(mean Average Precision)应用(转)
原文章地址来自于知乎:https://www.zhihu.com/question/41540197 1. precision 和 recall 的计算(没什么好说的,图片示例相当棒): 图1 图中上 ...
- linux 安装python
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz #下载安装包 tar zxvf Python-3.6.0.tgz #解压 . ...
- 一个数字键盘引发的血案——移动端H5输入框、光标、数字键盘全假套件实现
https://juejin.im/post/5a44c5eef265da432d2868f6 为啥要写假键盘? 还是输入框.光标全假的假键盘? 手机自带的不用非得写个假的,吃饱没事干吧? 装逼?炫技 ...
- [JAVA]Apache FTPClient操作“卡死”问题的分析和解决
最近在和一个第三方的合作中不得已需要使用FTP文件接口.由于FTP Server由对方提供,而且双方背后各自的网络环境都很不单纯等等原因,造成测试环境无法模拟实际情况.测试环境中程序一切正常,但是在部 ...
- 用泛型T替代object做为万能参数传递
using System;using System.Collections;using System.Collections.Generic;using UnityEngine; public cla ...
- shell之“>/dev/null 2>&1” 详解
shell中可能经常能看到:>/dev/null 2>&1 命令的结果可以通过 %> 的形式来定义输出,其中 %> 代表文件描述符 我们将这个命令组合:"& ...
- 【c++】类管理指针成员
c++编程提倡使用标准库,一个原因是标准库大胆减少对指针的使用.但是许多程序是离不开指针的.包含指针的类需要特别注意复制控制,原因是复制指针时只复制指针中的地址,而不复制指针所指向的对象.这样当把一个 ...
- Firebird execute block 批处理
火鸟的批处理,效率好高,使用简单. execute block as declare variable i ; begin ) do begin :i = :i + ; insert into m_u ...