File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -818,19 +818,16 @@ void QgsGPSInformationWidget::on_mBtnCloseFeature_clicked()
818
818
{
819
819
QgsFeature* f = new QgsFeature ( 0 );
820
820
821
- int size = 0 ;
822
- int wkbtype = 0 ;
823
-
824
821
QgsCoordinateTransform t ( mWgs84CRS , vlayer->crs () );
825
822
QgsPoint myPoint = t.transform ( mLastGpsPosition );
826
823
double x = myPoint.x ();
827
824
double y = myPoint.y ();
828
825
829
- size = 1 + sizeof ( int ) + 2 * sizeof ( double );
826
+ int size = 1 + sizeof ( int ) + 2 * sizeof ( double );
830
827
unsigned char *buf = new unsigned char [size];
831
828
832
829
QgsWkbPtr wkbPtr ( buf, size );
833
- wkbPtr << ( char ) QgsApplication::endian () << wkbtype << x << y;
830
+ wkbPtr << ( char ) QgsApplication::endian () << QGis::WKBPoint << x << y;
834
831
835
832
QgsGeometry *g = new QgsGeometry ();
836
833
g->fromWkb ( buf, size );
You can’t perform that action at this time.
0 commit comments