[Marble-devel] Re: how to draw a circle with two GeoDataCoordinates points?
Torsten Rahn
tackat at t-online.de
Thu Jan 13 10:20:24 CET 2011
Hi jun,
Sorry for the late reply. But I think now I understand what you want to do.
The solution you came up with will only deliver an approximation:
The circle that is created on the globe will only be a circle in "cartesian"
lat / lon space. With reasonably small circles at low to average latitudes the
difference might be small.
GeoPainter doesn't provide circles in terms of a circle representing the
intersection of a cone with the sphere (where the top of the cone is at the
center of the sphere). That's still a feature that hasn't been implemented
yet. Patches are welcome ...
Best Regards,
Torsten
On Monday, 10. January 2011 07:31:46 jun yang wrote:
> I got it.
>
> GeoDataLineString line;
> line.append(point_center);
> line.append(point_on_circle);
> ? = 2 *
> line.length(marble_widget->model()->planet()->radius())/111.12/1000;
>
> 2011/1/10 jun yang <slickqt at gmail.com>:
> > GeoDataCoordinates point_center;
> > GeoDataCoordinates point_on_circle;
> > GeoPainter *painter;
> > painter->drawEllipse(center,?,?,true); //? should fill what ?
> > doc said:
> > If \a isGeoProjected is true then the outline of the ellipse is drawn
> > in geographic coordinates. In this case the \a width and the \a height
> > are interpreted to be degrees.
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
More information about the Marble-devel
mailing list