我想在C做些什么,我正在建立一个服务器,将会收到一个经纬度坐标-23.0001,-43.3417是确切的,我正在尝试做一个10km围绕该坐标的半径圆,有可能吗?我放弃了试图使一个圆圈,并试图让一个正方形20公里边,在这里我给的是中心的坐标,但我一直没有,这里是我想要帮助Circle in C
Quad *cria_quadrado_complex(Coords *b)
{
Quad* a = (Quad*) malloc(sizeof(Quad));
a->x1 = b->x + 0.0433;
a->x2 = b->x + 0.0587;
a->y1 = b->y + 0.0433;
a->y2 = b->y + 0.0490;
return a;
}
使用的结构分别是:
struct coordenadas
{
double x,
y;
};
struct quadrado
{
double x1,
x2,
y1,
y2;
};
typedef struct coordenadas Coords;
typedef struct quadrado Quad;
这些东西0.0的值是我从谷歌地图的测量值,但他们是从中央和dindn't工作faar,有没有更好的方式来做到这一点?帮助
PS -23.0001,-43.3417是坐标从谷歌地图
这里是我想要做的一个例子:
1---------- 1 : top coordinate of the square
-----------
-----C----- C : center coordinate (-23.0001, -43.3417)
-----------
----------2 2 : bottom coordinate of the square
1和2我要与自动生成中心坐标,他们将远离中心,所以广场的两边是10公里
你的用例是什么? – Trott 2011-05-24 00:49:04