资源简介
将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
相关资源
- php mysql经典留言本源码 代码通俗易懂
- PHP MySQL 物流管理 数据库文件
- PHP MySQL 技术 毕业设计 物流管理系统
- php mysql 在线作业管理系统
- MySql.data.dll +使用说明
- 图书管理系统 PHP MYSQL实现
- [PHP MySQL]图书馆管理系统前后台全部代
- 基于PHP+MYSQL的学生成绩管理系统
- Spring+Struts2+Hibernate人力资源管理系统
- 我自己写php mysql聊天室
- mysql 数据库连接池
- 完整的php mysql js用户注册与登陆
- MySQL数据库用户在线注册系统
- mysql数据库驱动8.0.12版本
- mha4mysql-0.56-0.el6
- mysql_5.6.24_winx64
- MYSQL作业提交作业批改系统.zip
- Maven搭建Spring+Mybatis+MySql
- 成语首尾字用于成语接龙.sql
- MySQL中文手册api帮助文档
- linux_mysql5.1.66x86_64.zip
- oracle 到mysql转换工具
- 数据库原理实验指导书Mysql
- mysql 5.6 绿色精简版 5Mb
- mysql Premium 破解
- 深入浅出MySQL第二版本pdf
- 深入浅出MySQL.pdf
- 深入浅出mysql全文
- 全球国家及地区库,采集自腾讯QQ国内
- mysql操作练习的表数据
评论
共有 条评论