Geoserver+mysql+openlayers2

Geoserver+mysql+openlayers2
mysql几何数据数据存储参考:

DROP TABLE IF EXISTS `points`;

CREATE TABLE `points`  (

  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,

  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',

  `x` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,

  `y` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,

  `location` point NOT NULL,

  PRIMARY KEY (`id`) USING BTREE,

  SPATIAL INDEX `sp_index`(`location`)

) ENGINE = MyISAM AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
INSERT INTO `points` VALUES (1, '圆明园', '116.310558', '40.014033', ST_GeomFromText('POINT(116.311 40.014)'));

INSERT INTO `points` VALUES (2, '清华大学', '116.335279', '40.010497', ST_GeomFromText('POINT(116.335 40.0105)'));

INSERT INTO `points` VALUES (3, '颐和园', '116.277787', '116.277787', ST_GeomFromText('POINT(116.278 40.0065)'));

INSERT INTO `points` VALUES (4, '天安门', '116.404844', '39.915378', ST_GeomFromText('POINT(116.405 39.9154)'));

INSERT INTO `points` VALUES (5, '北京站', '116.434164', '39.910065', ST_GeomFromText('POINT(116.434 39.9101)'));

INSERT INTO `points` VALUES (6, '卢沟桥', '116.224895', '39.85647', ST_GeomFromText('POINT(116.225 39.8565)'));

INSERT INTO `points` VALUES (7, '北京西站', '116.32723', '39.901652', ST_GeomFromText('POINT(116.327 39.9025)'));

INSERT INTO `points` VALUES (8, '北京首都国际机场', '116.612388', '40.085613', ST_GeomFromText('POINT(116.612 39.9025)'));
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jennifer33K

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值