Oracle21C判断[点]是否在[多边形]内

环境
Oracle Database 21c Express Edition Release 21.0.0.0.0

OracleSpatial函数
SELECT 
	sdo_inside( 
		sdo_geometry( 
			2001, 
			NULL, 
			SDO_POINT_TYPE(
				118.439140, 
				31.385456, 
				NULL
			), 
			NULL, 
			NULL 
		), 
		SDO_GEOMETRY( 
			2003, 
			NULL, 
			NULL, 
			sdo_elem_info_array(
				1, 
				2003, 
				2
			), 
			SDO_ORDINATE_ARRAY( 
				118.392992, 31.381136 , 
				118.39694, 31.377399 , 
				118.433933, 31.378169 , 
				118.479852, 31.372599 , 
				118.510322, 31.366883 , 
				118.51663, 31.394503 , 
				118.435605, 31.436145 , 
				118.392992, 31.381136
			) 
		) 
	) 
FROM DUAL 
;

在这里插入图片描述


百度地图验证
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>添加点标记</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <style>
    body,
    html,
    #container {
        overflow: hidden;
        width: 100%;
        height: 100%;
        margin: 0;
        font-family: "微软雅黑";
    }
    </style>
    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=百度地图APIKEY"></script>
</head>
<body>
    <div id="container"></div>
</body>
</html>
<script>
	var map = new BMapGL.Map('container');
	map.centerAndZoom(new BMapGL.Point(118.439140, 31.385456), 15);
	map.enableScrollWheelZoom(true);
	// 创建点标记
	var marker = new BMapGL.Marker(new BMapGL.Point(118.439, 31.385));

	// 在地图上添加点标记
	map.addOverlay(marker);

	var polygon = new BMapGL.Polygon([
			new BMapGL.Point(118.392992, 31.381136),
			new BMapGL.Point(118.39694, 31.377399),
			new BMapGL.Point(118.433933, 31.378169),
			new BMapGL.Point(118.479852, 31.372599),
			new BMapGL.Point(118.510322, 31.366883),
			new BMapGL.Point(118.51663, 31.394503),
			new BMapGL.Point(118.435605, 31.436145)
		], {strokeColor:"blue", strokeWeight:2, strokeOpacity:0.5});
	map.addOverlay(polygon);

</script>

在这里插入图片描述

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-01 05:16:05       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-01 05:16:05       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-01 05:16:05       87 阅读
  4. Python语言-面向对象

    2024-05-01 05:16:05       96 阅读

热门阅读

  1. QT学习之QFileDialog

    2024-05-01 05:16:05       31 阅读
  2. FlaUI

    FlaUI

    2024-05-01 05:16:05      34 阅读
  3. Axios 库相关

    2024-05-01 05:16:05       33 阅读
  4. 几种计算图像/向量相似度的指标(实现)

    2024-05-01 05:16:05       36 阅读
  5. pyflink yield return

    2024-05-01 05:16:05       34 阅读
  6. 【Spring AI】02. AI 概念

    2024-05-01 05:16:05       35 阅读
  7. springboot AOP

    2024-05-01 05:16:05       30 阅读
  8. 时间复杂度&&空间复杂度

    2024-05-01 05:16:05       31 阅读
  9. Spring

    2024-05-01 05:16:05       30 阅读