资源简介
将shp文件导入到mysql完整过程及详细代码实现包含其他资料缺失的cygwin1.dll
代码片段和文件信息
// **********************************************************
// *** BJK = quick and dirty hack to make it work for MySQL alpha 4.1
// *** Barend K鯾ben
// ** WARNING: NO TESTING DONE TO SPEAK OFF !!!
// version 0.2 - november 2003
// port from PostGIS SQL to MySQL
// version 0.3 - may 2004
// changed all coordinate output to fixed decimal places as JTS does not accept 1234e-xxx notation
// version 0.4 - July 2004
// changed primary from being called gid to ID
// fixed a bug where Add geometry statement was not endend properly with “;“
//
//**********************************************************
// released under GPL http://www.gnu.org/copyleft/gpl.html
//
//*** ORIGINAL:
/*
* $Id: shp2pgsql.cv 1.33 2003/04/01 23:02:50 jeffloun Exp $
*
* Author: Jeff Lounsbury jeffloun@refractions.net
*
* $Log: shp2pgsql.cv $
* Revision 1.33 2003/04/01 23:02:50 jeffloun
*
* Fixed a bug which dropped the last Z value of each line in 3d lines.
*
* Revision 1.32 2003/03/07 16:39:53 pramsey
* M-handling patch and some Z-recognition too.
* From strk@freek.keybit.net.
*
* Revision 1.31 2003/02/15 00:27:14 jeffloun
* added more type checking into the create table statment.
* Now uses int8 and numeric types if the columns definitions are too big
*
* Revision 1.30 2003/02/14 20:07:26 jeffloun
* changed the PIP function to loop from i=0 to 1 *
* Revision 1.29 2003/02/04 22:57:44 pramsey
* Fix memory management error array of pointers allocated insufficient space.
*
* Revision 1.28 2003/02/04 21:39:20 pramsey
* Added CVS substitution strings for logging.
*
*
* Using shapelib 1.2.8 this program reads in shape files and
* processes it‘s contents into a Insert statements which can be
* easily piped into a database frontend.
* Specifically designed to insert type ‘geometry‘ (a custom
* written PostgreSQL type) for the shape files and PostgreSQL
* standard types for all attributes of the entity.
*/
#include “shapefil.h“
#include
#include
#include
#include “getopt.h“
typedef struct {double x y z;} Point;
typedef struct Ring{
Point *list; //list of points
struct Ring *next;
int n; //number of points in list
} Ring;
int dump_format = 0; //0=insert statements 1 = dump
int Insert_attributes(DBFHandle hDBFHandle int row);
char *make_good_string(char *str);
int ring_check(SHPobject* obj char *table char *sr_id int rings
DBFHandle hDBFHandle);
char *protect_quotes_string(char *str);
int PIP( Point P Point* V int n );
char *make_good_string(char *str){
//find all the tabs and make them \s
//
// 1. find # of tabs
// 2. make new string
//
// we dont escape already escaped tabs
char *result;
char *str2;
char *start*end;
int num_tabs = 0;
(str2) = (str);
while ((str2 = strchr(str2 ‘\t‘)) )
{
if ( (str2 == str) || (str2[-1] != ‘\\‘) ) //the previous char isnt a ‘\‘
num_tabs ++;
str2++;
}
if (num_tabs == 0)
return str;
re
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 971618 2003-09-20 22:32 将shp文件导入到mysql的命令\cygwin1.dll
文件 1565 2009-12-14 14:47 将shp文件导入到mysql的命令\DOShere.lnk
文件 357 2018-10-15 00:22 将shp文件导入到mysql的命令\readme.txt
文件 53855 2009-12-14 15:04 将shp文件导入到mysql的命令\shp2mysql.exe
文件 9544 2009-12-14 15:05 将shp文件导入到mysql的命令\src\dbfopen.o
文件 4376 2009-12-14 15:05 将shp文件导入到mysql的命令\src\getopt.h
文件 4701 2009-12-14 15:05 将shp文件导入到mysql的命令\src\getopt.o
文件 285 2009-12-14 15:05 将shp文件导入到mysql的命令\src\Makefile
文件 13192 2009-12-14 15:05 将shp文件导入到mysql的命令\src\shapefil.h
文件 33877 2009-12-14 15:05 将shp文件导入到mysql的命令\src\shp2mysql.c
文件 18636 2009-12-14 15:05 将shp文件导入到mysql的命令\src\shp2mysql.o
文件 33522 2009-12-14 15:05 将shp文件导入到mysql的命令\src\shp2mysql_0.2.c
文件 16937 2009-12-14 15:05 将shp文件导入到mysql的命令\src\shpopen.o
目录 0 2009-12-16 10:56 将shp文件导入到mysql的命令\src
目录 0 2018-10-15 00:20 将shp文件导入到mysql的命令
----------- --------- ---------- ----- ----
1162465 15
相关资源
- mysql大作业报告.docx
- nacicatformysql注册码.docx
- idea+springboot+MySQL+jdk1.8实现简单的注册
- mysql数据库world
- 关于QSqlTableModel的使用说明(QT上创建
- MySQL下数据备份的系统解决方案简介
- 四六级词库sql文件版可以直接导入m
- libaio1 deb 乌班图 mysql
- MySQL5.1.7版本的数据库驱动包
- Node.js+Vue+MySQL 新人入门参考项目
- MYSQL高版本低版本UDF提权工具
- libmysql.dll 64位
- MySQL数据库考试试题及答案
- 解决动软代码生成器2.78生成MySQL表代
- MySQL数据库应用从入门到精通第2版-网
- mysql 数据库练习50题
- 全球地址表,包括所有国家,地区,
-
Oracle通过Dbl
ink连接MySQL.doc - 之前上传的ssm商城的数据库文件
- 2009-2018节假日mysql数据库SQL文件
- springboot druid maven多数据源mysql+SqlSer
- qsqlmysql.dll 5.12.1版本
- labsql的压缩包,用于labview与mysql连接
- mysql-8.0.16-macos10.14-x86_64
- MySQL WorkBench 8.0汉化资源包.zip
- 最新城市mysql数据表
- SpringMVC+Mybaits+Spring+MySQL实现登录注册
- 带拼音及缩写的mysql省市区sql
- perl-Class-MethodMaker
- 1.MySQL Workbench 6.3 CE 汉化文件v0.3
评论
共有 条评论