Problem Running v.sample in QGIS 3

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem Running v.sample in QGIS 3

Terry Morse
I am trying to run the GRASS tool v.sample in 64 bit QGIS 3.8.2 and 3.4.11 with GRASS 7.6.1, and 3.2.3 with GRASS 7.4.1 on a 64-bit Windows 10 laptop, following directions in Learn QGIS, Fourth Edition: Your step-by-step guide to the fundamental of QGIS 3.4, by Andrew Cutts and Anita Glaser (Packt Publishing, 2018).

The data layers are from the QGIS Alaska sample data set: airports.shp and landcover.img, both EPSG 2964.. I've attached a screen capture of the dialog box showing the main settings. All advanced settings are the defaults.

When I run v.sample, I get the following errors:

1) WARNING: Concurrent mapset locking is not supported on Windows. [I've read on the internet that this error isn't significant]
2) WARNING: Unable to initialise PROJ with the following parameter list: +proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +no_defs +a=6378206.4 +rf=294.9786982 +nadgrids=C:\PROGRA~1\QGIS3~1.4\share\proj\@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat
3) WARNING: Unable parse GRASS PROJ_INFO file
4) ERROR: Unable to create OGR spatial reference
5) The following layers were not correctly generated.<ul><li>C:/Users/Terry/Documents/My Books/Learn QGIS 4th ed/Data/samples_2.shp</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

Perplexingly, the algorithm ran successfully back in January, but not this week. I ran it from the processing history from January to ensure the settings were all the same. The only difference I can think of between then and now is that I was running QGIS under 64-bit Windows 7 at the time. I installed Windows 10 a couple weeks ago. I'm not sure which version of QGIS 3 I had installed at the time, which is why I tried running it with 3.2, 3.4, and 3.6 this week. It didn't work in any of them.

Can anyone help me figure this out? I've copied the full log file below.

Thank you,
Terry Morse

Full log file:

QGIS version: 3.8.2-Zanzibar

QGIS code revision: 4470baa1a3

Qt version: 5.11.2

GDAL version: 2.4.1

GEOS version: 3.7.2-CAPI-1.11.0 b55d2125

PROJ version: Rel. 5.2.0, September 15th, 2018

Processing algorithm…

Algorithm 'v.sample' starting…

Input parameters:

{ 'GRASS_MIN_AREA_PARAMETER' : 0.0001, 'GRASS_OUTPUT_TYPE_PARAMETER' : 0, 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'GRASS_SNAP_TOLERANCE_PARAMETER' : -1, 'GRASS_VECTOR_DSCO' : '', 'GRASS_VECTOR_EXPORT_NOCAT' : False, 'GRASS_VECTOR_LCO' : '', 'column' : 'ID', 'input' : 'C:/Users/Terry/Documents/GIS/QGIS Sample Data/qgis_sample_data/shapefiles/airports.shp', 'method' : 0, 'output' : 'C:/Users/Terry/Documents/My Books/Learn QGIS 4th ed/Data/sampled_points.shp', 'raster' : 'C:/Users/Terry/Documents/GIS/QGIS Sample Data/qgis_sample_data/raster/landcover.img', 'zscale' : 1 }


g.proj -c proj4="+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +datum=NAD27 +units=us-ft +no_defs"

v.in.ogr min_area=0.0001 snap=-1.0 input="C:\Users\Terry\Documents\GIS\QGIS Sample Data\qgis_sample_data\shapefiles\airports.shp" output="vector_5d809faeb5d0d2" --overwrite -o

r.external input="C:\Users\Terry\Documents\GIS\QGIS Sample Data\qgis_sample_data\raster\landcover.img" band=1 output="rast_5d809faebafab3" --overwrite -o

g.region n=7809680.0 s=1367760.0 e=4897040.0 w=-7117600.0 res=3280.0

v.sample input=vector_5d809faeb5d0d2 column=ID raster=rast_5d809faebafab3 zscale=1 method="nearest" output=output3138c3949b014923adb9b8d44c37e6ba --overwrite

v.out.ogr type="point" input="output3138c3949b014923adb9b8d44c37e6ba" output="C:\Users\Terry\Documents\My Books\Learn QGIS 4th ed\Data\sampled_points.shp" format="ESRI_Shapefile" --overwrite

Starting GRASS GIS...

WARNING: Concurrent mapset locking is not supported on Windows

Executing <C:\Users\Terry\AppData\Local\Temp\processing_2b250d50fb6d452a811e6d4d9b4d009b\grassdata\grass_batch_job.cmd> ...

C:\Users\Terry\Documents>chcp 1252 1>NUL

C:\Users\Terry\Documents>g.proj -c proj4="+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +datum=NAD27 +units=us-ft +no_defs"

Default region was updated to the new projection, but if you have multiple mapsets `g.region -d` should be run in each to update the region from the default

Projection information updated

C:\Users\Terry\Documents>v.in.ogr min_area=0.0001 snap=-1.0 input="C:\Users\Terry\Documents\GIS\QGIS Sample Data\qgis_sample_data\shapefiles\airports.shp" output="vector_5d809faeb5d0d2" --overwrite -o

Over-riding projection check

Check if OGR layer <airports> contains polygons...

0..2..5..7..9..11..13..15..17..19..21..23..25..27..30..32..34..36..38..40..42..44..46..48..50..52..55..57..59..61..63..65..67..69..71..73..75..77..80..82..84..86..88..90..92..94..96..98..100

Creating attribute table for layer <airports>...

Importing 76 features (OGR layer <airports>)...

0..2..5..7..9..11..13..15..17..19..21..23..25..27..30..32..34..36..38..40..42..44..46..48..50..52..55..57..59..61..63..65..67..69..71..73..75..77..80..82..84..86..88..90..92..94..96..98..100

-----------------------------------------------------

Building topology for vector map <vector_5d809faeb5d0d2@PERMANENT>...

Registering primitives...

C:\Users\Terry\Documents>r.external input="C:\Users\Terry\Documents\GIS\QGIS Sample Data\qgis_sample_data\raster\landcover.img" band=1 output="rast_5d809faebafab3" --overwrite -o

Over-riding projection check

Reading band 1 of 1...

Link to raster map <rast_5d809faebafab3> created.

C:\Users\Terry\Documents>g.region n=7809680.0 s=1367760.0 e=4897040.0 w=-7117600.0 res=3280.0

C:\Users\Terry\Documents>v.sample input=vector_5d809faeb5d0d2 column=ID raster=rast_5d809faebafab3 zscale=1 method="nearest" output=output3138c3949b014923adb9b8d44c37e6ba --overwrite

Reading points...

2..5..9..13..17..21..25..28..31..34..38..42..46..50..53..56..59..63..67..71..75..78..81..84..88..92..96..100

Building topology for vector map <output3138c3949b014923adb9b8d44c37e6ba@PERMANENT>...

Registering primitives...

C:\Users\Terry\Documents>v.out.ogr type="point" input="output3138c3949b014923adb9b8d44c37e6ba" output="C:\Users\Terry\Documents\My Books\Learn QGIS 4th ed\Data\sampled_points.shp" format="ESRI_Shapefile" --overwrite

WARNING: Unable to initialise PROJ with the following parameter list: +proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +no_defs +a=6378206.4 +rf=294.9786982 +nadgrids=C:\PROGRA~1\QGIS3~1.8\share\proj\@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat

WARNING: Unable parse GRASS PROJ_INFO file

ERROR: Unable to create OGR spatial reference

C:\Users\Terry\Documents>exit

Execution of <C:\Users\Terry\AppData\Local\Temp\processing_2b250d50fb6d452a811e6d4d9b4d009b\grassdata\grass_batch_job.cmd> finished.

Cleaning up default sqlite database ...

Cleaning up temporary files...

Press any key to continue . . .

Execution completed in 17.65 seconds

Results:

{'output': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/Terry/Documents/My Books/Learn QGIS 4th ed/Data/sampled_points.shp, 'createOptions': {'fileEncoding': 'System'}}>}


Loading resulting layers

The following layers were not correctly generated.<ul><li>C:/Users/Terry/Documents/My Books/Learn QGIS 4th ed/Data/sampled_points.shp</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Question about Weighting Power value when running Grid-Inverse Distance to a Power

Daniel Zepeda Rivas

When using the Raster -> Analysis -> Grid (Inverse Distance to a Power)

At the menu just before pressing run, can somebody please explain me the effect of the "Weighting power" option in the interpolation process?

I'm trying to make a temperature map based on points representing each weather station, containing the yearly averages values of temperature, and when moving the number from the 2 (set it by default) to 4, 6 or 10, the map changes significantly



_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Question about Weighting Power value when running Grid-Inverse Distance to a Power

DelazJ
Hi,
Tracking information from the Help button in the algorithm dialog led me to https://gdal.org/tutorials/gdal_grid_tut.html#inverse-distance-to-a-power

Hope that helps,
Harrissou

Le mar. 17 sept. 2019 à 12:00, Daniel Zepeda Rivas <[hidden email]> a écrit :

When using the Raster -> Analysis -> Grid (Inverse Distance to a Power)

At the menu just before pressing run, can somebody please explain me the effect of the "Weighting power" option in the interpolation process?

I'm trying to make a temperature map based on points representing each weather station, containing the yearly averages values of temperature, and when moving the number from the 2 (set it by default) to 4, 6 or 10, the map changes significantly


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Question about Weighting Power value when running Grid-Inverse Distance to a Power

Falk Huettmann
Dear Colleagues,

as we work on such topics ourselves,
let me point out please that those 'sophisticated methods' of interpolation etc
have 100% nothing to do with climate, or temperature, and such units,
and likely are very misleading for outcome.

One may call it 'data smearing' but not more.

(Scientifically,
if we see it, we usually reject it in full;
student failed and publication rejected.
No kidding. Lots of literature on what I state here;
krigging being among the worse).

So I propose not to fall into that trap.

"It can be done" (Ronald Reagan)
Reply: " Yeah, technically, but if it's crap, no need to".
Coder's delight.

Very best
    Falk Huettmann PhD, Professor
      Uni of Alaska Fairbanks

PS I am sorry to raise those issues sometimes,
but it matters for context and best performance
and tools + relevant progress.
Follow up as needed please.


On Tue, Sep 17, 2019 at 2:39 AM DelazJ <[hidden email]> wrote:
Hi,
Tracking information from the Help button in the algorithm dialog led me to https://gdal.org/tutorials/gdal_grid_tut.html#inverse-distance-to-a-power

Hope that helps,
Harrissou

Le mar. 17 sept. 2019 à 12:00, Daniel Zepeda Rivas <[hidden email]> a écrit :

When using the Raster -> Analysis -> Grid (Inverse Distance to a Power)

At the menu just before pressing run, can somebody please explain me the effect of the "Weighting power" option in the interpolation process?

I'm trying to make a temperature map based on points representing each weather station, containing the yearly averages values of temperature, and when moving the number from the 2 (set it by default) to 4, 6 or 10, the map changes significantly


_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Question about Weighting Power value when running Grid-Inverse Distance to a Power

J.O. Williams
In reply to this post by Daniel Zepeda Rivas

A power of 1 is a linear interpolation among all points in the search radius.


A power of 2 causes the "closest point" in the search radius to have a slightly higher weight.


A power of 4, 6 and especially 10 causes the closest point to behave like a polygonal or  theissen polygon.


A power of 0.5 causes the farther away points to have a larger influence than closer points....


The equations used only depend on the distance the points are from each other.  NOT the value of any of the points.  Though David has a section on how the variogram can be applied to IDS.


All the power IDS theory (if there is one) came out of the mining industry in the early 1960's because it was simple.


Hope this helps.

J.O. Williams


On 9/17/19 4:00 AM, Daniel Zepeda Rivas wrote:

When using the Raster -> Analysis -> Grid (Inverse Distance to a Power)

At the menu just before pressing run, can somebody please explain me the effect of the "Weighting power" option in the interpolation process?

I'm trying to make a temperature map based on points representing each weather station, containing the yearly averages values of temperature, and when moving the number from the 2 (set it by default) to 4, 6 or 10, the map changes significantly



_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: [EXTERNAL] Re: Question about Weighting Power value when running Grid-Inverse Distance to a Power

Ross, Kenton W. (LARC-E3)

I would offer a slightly different take on inverse distance weighting. All inverse distance weighting is proportional to inverse distance to a power, so there is never a case where an individual farther away point has more influence than an individual near point. It’s just that as the power approaches 0 then then the weights approach 1, so all points in the search radius approach being equally weighted, and if there are more far points than near, then they will have the stronger influence as a group.

 

In the case of large powers, as the power approaches infinity, the weight of the nearest point becomes much, much greater than any others and inverse distance weighting interpolations becomes equivalent to a nearest neighbor approach. This is essentially what the previous response was saying as well.

 

Cheers,

--Kenton Ross

 

From: Qgis-user <[hidden email]> On Behalf Of J.O.Williams
Sent: Tuesday, September 17, 2019 1:24 PM
To: [hidden email]
Subject: [EXTERNAL] Re: [Qgis-user] Question about Weighting Power value when running Grid-Inverse Distance to a Power

 

A power of 1 is a linear interpolation among all points in the search radius.

 

A power of 2 causes the "closest point" in the search radius to have a slightly higher weight.

 

A power of 4, 6 and especially 10 causes the closest point to behave like a polygonal or  theissen polygon.

 

A power of 0.5 causes the farther away points to have a larger influence than closer points....

 

The equations used only depend on the distance the points are from each other.  NOT the value of any of the points.  Though David has a section on how the variogram can be applied to IDS.

 

All the power IDS theory (if there is one) came out of the mining industry in the early 1960's because it was simple.

 

Hope this helps.

J.O. Williams

 

On 9/17/19 4:00 AM, Daniel Zepeda Rivas wrote:

When using the Raster -> Analysis -> Grid (Inverse Distance to a Power)

At the menu just before pressing run, can somebody please explain me the effect of the "Weighting power" option in the interpolation process?

I'm trying to make a temperature map based on points representing each weather station, containing the yearly averages values of temperature, and when moving the number from the 2 (set it by default) to 4, 6 or 10, the map changes significantly

 



_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem Running v.sample in QGIS 3

Anita Graser
In reply to this post by Terry Morse
I can confirm this error in both QGIS 3.4 and the current dev version 3.9.

Even in the GRASS GUI itself, trying to v.in.ogr shapefiles from the QGIS
sample data fails if it's not told explicitly to override the projection
check using the -o flag.

Should I open a ticket for this?

Regards,
Anita



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem Running v.sample in QGIS 3

Anita Graser


On Thu, Oct 3, 2019 at 6:36 PM Anita Graser <[hidden email]> wrote:
I can confirm this error in both QGIS 3.4 and the current dev version 3.9.

Even in the GRASS GUI itself, trying to v.in.ogr shapefiles from the QGIS
sample data fails if it's not told explicitly to override the projection
check using the -o flag.

To follow up on this issue: The error seems to be somehow specific to the CRS EPSG:2964 of the QGIS sample data because it disappears if I first reproject the data to WGS84 ...

Should I open a ticket for this?

Could this be related to the new proj?

Regards,
Anita




_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user