IdleResources
冉成楼 2025-04-21 16:49:09 +08:00
parent c6add3aa20
commit 079c153740
2 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,7 @@ namespace OpenAuth.App
}
sql.AppendFormat(
$"SELECT \"Id\",ST_AsText(ST_Transform(ST_Centroid(\"Geom\"), 4326)) AS centroid_point FROM {tablename} where {filter}");
$"SELECT \"Id\",ST_AsText(ST_Centroid(ST_SetSRID(\"Geom\",4326))) AS centroid_point FROM {tablename} where {filter}");
var result = client.Ado.SqlQuery<dynamic>(sql.ToString());
return result;

View File

@ -6,6 +6,7 @@ using OpenAuth.App;
using Infrastructure;
using OpenAuth.Repository.Domain;
using DocumentFormat.OpenXml.Office2010.Excel;
using JetBrains.Annotations;
namespace OpenAuth.WebApi.Controllers
{
@ -78,6 +79,7 @@ namespace OpenAuth.WebApi.Controllers
/// <param name="filter"></param>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public Response<dynamic> GetCenterPoints(string tablename, string filter)
{
Response<dynamic> response = new Response<dynamic>();