没有合适的资源?快使用搜索试试~ 我知道了~
postgrel空间关系查询,面的包含关系查询,通过输入矩形四个角点的经纬度信息来查询库中包含在该矩形内的多边形信息。
资源推荐
资源详情
资源评论
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="SystemManage.QueryManage.dao.QueryDao">
<!-- 查询影像信息 -->
<!-- <select id="queryTcList" parameterType="com.hangyao.ssm.po.Qureo" resultType="com.hangyao.ssm.po.Yxtc">
SELECT * from sjdb where ST_Contains( ST_MakePolygon(ST_GeomFromText('LINESTRING ('||zslon||' '||zslat||',' ||zxlon||' '||zxlat||','||yxlon||' '||yxlat||','||yslon||' '||yslat||','||zslon||' '||zslat||')' )) ,st_point(${x},${y}))
</select>-->
<resultMap id="BaseResultMap" type="SystemManage.QueryManage.entity.Query">
<id column="gid" jdbcType="INTEGER" property="gid" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="time" jdbcType="VARCHAR" property="time" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="zslat" jdbcType="FLOAT" property="zslat" />
<result column="zslon" jdbcType="FLOAT" property="zslon" />
<result column="yslat" jdbcType="FLOAT" property="yslat" />
<result column="yslon" jdbcType="FLOAT" property="yslon" />
<result column="yxlat" jdbcType="FLOAT" property="yxlat" />
<result column="yxlon" jdbcType="FLOAT" property="yxlon" />
<result column="zxlat" jdbcType="FLOAT" property="zxlat" />
<result column="zxlon" jdbcType="FLOAT" property="zxlon" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
gid, name, time, type,address, zslat,zslon,yslat,yslon,yxlat,yxlon,zxlat,zxlon
</sql>
<select id="queryTcList" parameterType="java.util.HashMap" resultType="SystemManage.Common.entity.Yxtc">
SELECT * from sjdb where ST_Contains(ST_MakePolygon(ST_GeomFromText('LINESTRING(${x} ${y},${x1} ${y1},${x2} ${y2}, ${x3} ${y3},${x} ${y})')),ST_MakePolygon(ST_GeomFromText('LINESTRING ('||zslon||' '||zslat||',' ||zxlon||' '||zxlat||','||yxlon||' '||yxlat||','||yslon||' '||yslat||','||zslon||' '||zslat||')' )))
</select>
<select id="findQueryCondition" resultMap="BaseResultMap" parameterType="PageInfo">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="SystemManage.QueryManage.dao.QueryDao">
<!-- 查询影像信息 -->
<!-- <select id="queryTcList" parameterType="com.hangyao.ssm.po.Qureo" resultType="com.hangyao.ssm.po.Yxtc">
SELECT * from sjdb where ST_Contains( ST_MakePolygon(ST_GeomFromText('LINESTRING ('||zslon||' '||zslat||',' ||zxlon||' '||zxlat||','||yxlon||' '||yxlat||','||yslon||' '||yslat||','||zslon||' '||zslat||')' )) ,st_point(${x},${y}))
</select>-->
<resultMap id="BaseResultMap" type="SystemManage.QueryManage.entity.Query">
<id column="gid" jdbcType="INTEGER" property="gid" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="time" jdbcType="VARCHAR" property="time" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="zslat" jdbcType="FLOAT" property="zslat" />
<result column="zslon" jdbcType="FLOAT" property="zslon" />
<result column="yslat" jdbcType="FLOAT" property="yslat" />
<result column="yslon" jdbcType="FLOAT" property="yslon" />
<result column="yxlat" jdbcType="FLOAT" property="yxlat" />
<result column="yxlon" jdbcType="FLOAT" property="yxlon" />
<result column="zxlat" jdbcType="FLOAT" property="zxlat" />
<result column="zxlon" jdbcType="FLOAT" property="zxlon" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
gid, name, time, type,address, zslat,zslon,yslat,yslon,yxlat,yxlon,zxlat,zxlon
</sql>
<select id="queryTcList" parameterType="java.util.HashMap" resultType="SystemManage.Common.entity.Yxtc">
SELECT * from sjdb where ST_Contains(ST_MakePolygon(ST_GeomFromText('LINESTRING(${x} ${y},${x1} ${y1},${x2} ${y2}, ${x3} ${y3},${x} ${y})')),ST_MakePolygon(ST_GeomFromText('LINESTRING ('||zslon||' '||zslat||',' ||zxlon||' '||zxlat||','||yxlon||' '||yxlat||','||yslon||' '||yslat||','||zslon||' '||zslat||')' )))
</select>
<select id="findQueryCondition" resultMap="BaseResultMap" parameterType="PageInfo">
SELECT
<include refid="Base_Column_List" />
FROM
sjdb t
order by gid ${order}
limit #{size} OFFSET #{from}
</select>
<select id="findQueryPageCount" resultType="java.lang.Integer" parameterType="PageInfo">
select count(*) count
from sjdb t
</select>
<select id="findQueryById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sjdb where gid = #{gid,jdbcType=INTEGER}
</select>
<insert id="insertSelective" keyColumn="gid" keyProperty="gid" parameterType="SystemManage.QueryManage.entity.Query" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into sjdb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
name,
</if>
<if test="zslat != null">
zslat,
</if>
<if test="zslon != null">
zslon,
<include refid="Base_Column_List" />
FROM
sjdb t
order by gid ${order}
limit #{size} OFFSET #{from}
</select>
<select id="findQueryPageCount" resultType="java.lang.Integer" parameterType="PageInfo">
select count(*) count
from sjdb t
</select>
<select id="findQueryById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sjdb where gid = #{gid,jdbcType=INTEGER}
</select>
<insert id="insertSelective" keyColumn="gid" keyProperty="gid" parameterType="SystemManage.QueryManage.entity.Query" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into sjdb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
name,
</if>
<if test="zslat != null">
zslat,
</if>
<if test="zslon != null">
zslon,
剩余5页未读,继续阅读
资源评论
ljw-2020
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 电力场景设备漏油检测数据集VOC+YOLO格式338张1类别.7z
- 基于yolov8+pyqt5实现精美界面支持图片视频和摄像检测源码.zip
- 用C语言为母亲节献上一份特别的祝福.zip
- LCD1602液晶显示屏的深入探索与实用指南.zip
- 基于Matlab人脸肤色定理的教师人数统计+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab霍夫曼变换的表盘读数识别+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab火灾烟雾检测源码带GUI界面+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的恶劣天气交通标志识别系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于MATLAB的霍夫曼变换的表盘示数识别+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的车道线识别系统 +源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功