mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix recording of points for live GPS tracking (fixes #14996)
This commit is contained in:
parent
47eae5865a
commit
1cb4adc084
@ -818,19 +818,16 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
|
||||
{
|
||||
QgsFeature* f = new QgsFeature( 0 );
|
||||
|
||||
int size = 0;
|
||||
int wkbtype = 0;
|
||||
|
||||
QgsCoordinateTransform t( mWgs84CRS, vlayer->crs() );
|
||||
QgsPoint myPoint = t.transform( mLastGpsPosition );
|
||||
double x = myPoint.x();
|
||||
double y = myPoint.y();
|
||||
|
||||
size = 1 + sizeof( int ) + 2 * sizeof( double );
|
||||
int size = 1 + sizeof( int ) + 2 * sizeof( double );
|
||||
unsigned char *buf = new unsigned char[size];
|
||||
|
||||
QgsWkbPtr wkbPtr( buf, size );
|
||||
wkbPtr << ( char ) QgsApplication::endian() << wkbtype << x << y;
|
||||
wkbPtr << ( char ) QgsApplication::endian() << QGis::WKBPoint << x << y;
|
||||
|
||||
QgsGeometry *g = new QgsGeometry();
|
||||
g->fromWkb( buf, size );
|
||||
|
Loading…
x
Reference in New Issue
Block a user