我将尝试构建一个函数来创建一个椭圆,而无需通过传统的编程语言。
我已经把这些参数存储在自定义的GeoJSON中。
小边和大边必须用米来表示。结果几何图形必须使用EPSG 4326创建:
我的参数是:
在网上搜索时,我找到了一种非常接近解决我的问题的解决方案:
我的参数是:
"geography" : {"type":"Ellipse",
"smallSide":100,
"bigSide" : 110,
"rotation" : 0,
"coordinates":[8.54736328125,46.37156925087649]}
在网上搜索时,我找到了一种非常接近解决我的问题的解决方案:
ST_AsEWKT(ST_Translate( ST_Rotate( ST_Scale( ST_Buffer(ST_Point(8.54736328125,46.37156925087649)::geography, 3000)::geometry, 0.3,0.5)::geometry, 0), 8.54736328125,46.37156925087649))
该函数创建了一个椭圆形,位于挪威附近。可以使用以下链接进行尝试:http://geojson.io/#map=11/69.5354/11.1216
原始中心点位于瑞士。
该函数存在两个大问题: 1. 该椭圆不在给定的坐标中心; 2. 我不知道如何将比例尺的 xFactor/yFactor 转换为匹配米参数;
备注:以上函数的 WKT 如下:
SRID=4326;POLYGON((11.123273576134 69.5574277440815,11.1230606869505 69.5547928070317,11.1224064250309 69.55225640052,11.1213360407351 69.5499159578464,11.1198907409861 69.547861360983,11.1181260946945 69.5461714955871,11.1161098932273 69.5449112303195,11.1139195487472 69.544128934906,11.1116391298573 69.5438546306632,11.1093561468668 69.5440988431489,11.1071582077927 69.5448522000687,11.1051296707337 69.5460857895281,11.1033484183676 69.5477522651534,11.1018828760511 69.5497876565102,11.100789386429 69.5521138166206,11.1001100408036 69.554641414163,11.099871051113 69.5572733570283,11.1000817266595 69.5599085170987,11.1007340973332 69.5624456140896,11.1018032006992 69.5647871095818,11.1032480248444 69.5668429613212,11.105013073265 69.5685340926073,11.107030493374 69.5697954420587,11.1092226874817 69.5705784748924,11.1115053053956 69.5708530575261,11.1137905020249 69.5706086220194,11.1159903323456 69.5698545746198,11.1180201503338 69.568619932341,11.1198018783021 69.5669522018393,11.1212670184877 69.5649155445927,11.1223592894673 69.5625883002992,11.1230367854657 69.5600599653373,11.123273576134 69.5574277440815))