根据sqlserver geometry数据定义获取空间类型边界范围

--获取指定街道边界的xy最大最小值
declare @point_cnt int,@i int,@point geometry,@jdcode nvarchar(50) set @jdcode=''--街道编码 create table #temp_point(id int identity,x float,y float)
select @point_cnt =geom.STNumPoints()
from [dbo].[jd]
where jdcode=@jdcode set @i=1
while @i<=@point_cnt
begin
select @point = geom.STPointN(@i)
from [dbo].[jd]
where jdcode=@jdcode insert into #temp_point(x,y)
values(@point.STX,@point.STY)
set @i = @i+1
end select min(x) as minx,min(y) as miny,max(x) as maxx,max(y) as maxy
from #temp_point truncate table #temp_point;
drop table #temp_point

最新文章

  1. solr清空全部索引
  2. 那些年我们用到的jquery选择器!!
  3. [插件]jQuery multiselect初始化及默认值修改
  4. TYVJ P1032 零用钱 Label:贪心
  5. 【python】filter,map,reduce和lambda函数介绍
  6. 使用Unity拦截一个返回Task的方法
  7. 根据查询结果创建新表create table .. as (select....)
  8. rational rose 2003安装及破解
  9. BZOJ 1832: [AHOI2008]聚会( LCA )
  10. Linux 查看 硬件配置
  11. Unity应用架构设计(10)————绕不开的协程和多线程(Part 1)
  12. jquery页面水印插件,支持多行水印、行错开
  13. Ubuntu 16.04 安装和使用QQ最简洁的方式
  14. Ubuntu 15.10下的WebStorm-11.0.3完美破解
  15. 手把手教你“将系统安装在U盘”上,实现个人系统随身带!
  16. 用RIPv2实现网络区域的互通
  17. 机器学习笔记(6):多类逻辑回归-使用gluon
  18. iOS - 导航栏设置半透明或取消半透明
  19. Mustache应用——渲染二级菜单
  20. elasticsearch安装kibana插件

热门文章

  1. python学习笔记——(三)文件操作
  2. php 调用接口
  3. matlab中特殊符号如希腊字符
  4. SpringJPA主键生成采用自定义ID,自定义ID采用年月日时间格式
  5. Codeforces1099D.Sum in the tree(贪心)
  6. 关于java中为什么尽量把受检异常转化为非受检异常
  7. python自动化框架(一)
  8. Ubuntu16.04中如何启用floodlight的一种方式
  9. 523. Continuous Subarray Sum
  10. MySQL Hardware--CentOS 6修改CPU性能模式