Re: [QGIS-Developer] v.net.centrality: Sorry, is not a valid parameter

2019-10-31 Thread Giovanni Manghi
Hi,

Thanks for clearing that up
>
> I have made v.net.centrality run in QGIS 2.18 without any problems - even
> though the setup is a little different in 2.18 as you do not need to
> provide
> a point layer and you unfortunately cannot add costs on the network.
>

several issues here, see:

https://github.com/qgis/QGIS/pull/32562
https://github.com/qgis/QGIS/issues/32560

cheers

-- G --
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] v.net.centrality: Sorry, is not a valid parameter

2019-10-31 Thread magerlin
Thanks for clearing that up

I have made v.net.centrality run in QGIS 2.18 without any problems - even
though the setup is a little different in 2.18 as you do not need to provide
a point layer and you unfortunately cannot add costs on the network.



-
Regards Morten

Currently using Qgis 2.18.23 (OSGeo4) and Qgis 3.10.0 in parallel
Windows 7, 64bit
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] v.net.centrality: Sorry, is not a valid parameter

2019-10-31 Thread Bernd Vogelgesang

According to https://gis.stackexchange.com/a/309445 this warning is
raised by default it seems.

So, no ideas where your problem comes from. Over here the function works
and produces a result.

Bernd

Am 31.10.19 um 09:57 schrieb magerlin:

Yes you need to chose an output type yourself, but nomatter what I choose I
get the same error message.

I am running on windows and no matter what Grass procedure I run I get this
warning:
WARNING: Concurrent mapset locking is not supported on Windows.
Do not know what it means or whether it is relevant in this case?


Error message from v.centrality.net:

QGIS version: 3.10.0-A Coruña
QGIS code revision: 6c816b4204
Qt version: 5.11.2
GDAL version: 2.4.1
GEOS version: 3.8.0-CAPI-1.13.1
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…
Algorithm 'v.net.centrality' starting…
Input parameters:
{ '-a' : True, '-g' : False, 'GRASS_MIN_AREA_PARAMETER' : 0.0001,
'GRASS_OUTPUT_TYPE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None,
'GRASS_SNAP_TOLERANCE_PARAMETER' : -1, 'GRASS_VECTOR_DSCO' : '',
'GRASS_VECTOR_EXPORT_NOCAT' : False, 'GRASS_VECTOR_LCO' : '',
'arc_backward_column' : None, 'arc_column' : None, 'betweenness' : '',
'cats' : '', 'closeness' : 'closeness', 'degree' : 'degree', 'eigenvector' :
'', 'error' : 0.1, 'input' : 'C:\\@Temp\\net.shp|layername=net',
'iterations' : 1000, 'node_column' : None, 'output' :
'C:/@Temp/central.shp', 'points' : 'C:\\@Temp\\Poi.shp|layername=Poi',
'threshold' : 50, 'where' : '' }

Attempting to use v.external for direct layer read
Attempting to use v.external for direct layer read
g.proj -c proj4="+proj=longlat +datum=WGS84 +no_defs"
v.external input="C:\@Temp\net.shp" layer="net"
output="vector_5dba985f06fbb16" --overwrite -o
v.external input="C:\@Temp\Poi.shp" layer="Poi"
output="vector_5dba985f09e9b17" --overwrite -o
g.region n=9.327649580604518 s=9.271627488192191 e=38.7617967871377
w=38.74138436843244
v.net -s input=vector_5dba985f06fbb16 points=vector_5dba985f09e9b17
output=net5dba985f0b22318 operation=connect threshold=50.0
v.db.connect -o map=net5dba985f0b22318 table=vector_5dba985f09e9b17 layer=2
v.net.centrality input=net5dba985f0b22318 degree="degree"
closeness="closeness" iterations=1000 error=0.1 -a
output=output94c0c01b65de4586878116ac9fa984ae --overwrite
v.out.ogr type="point" input="output94c0c01b65de4586878116ac9fa984ae"
output="C:/@Temp/central.shp" format="ESRI_Shapefile" layer=1 --overwrite
Cleaning up temporary files...
Starting GRASS GIS...
WARNING: Concurrent mapset locking is not supported on Windows
Executing

...
C:\Users\map\Documents>chcp 1252 1>NUL
C:\Users\map\Documents>g.proj -c proj4="+proj=longlat +datum=WGS84 +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\map\Documents>v.external input="C:\@Temp\net.shp" layer="net"
output="vector_5dba985f06fbb16" --overwrite -o
Over-riding projection check
Building topology for vector map ...
Using external data format 'ESRI Shapefile' (feature type 'linestring')
Registering primitives...
One primitive registered
43 vertices registered
v.external complete. Link to vector map  created.
C:\Users\map\Documents>v.external input="C:\@Temp\Poi.shp" layer="Poi"
output="vector_5dba985f09e9b17" --overwrite -o
Over-riding projection check
Building topology for vector map ...
Using external data format 'ESRI Shapefile' (feature type 'point')
Registering primitives...
334 primitives registered
334 vertices registered
v.external complete. Link to vector map  created.
C:\Users\map\Documents>g.region n=9.327649580604518 s=9.271627488192191
e=38.7617967871377 w=38.74138436843244
C:\Users\map\Documents>v.net -s input=vector_5dba985f06fbb16
points=vector_5dba985f09e9b17 output=net5dba985f0b22318 operation=connect
threshold=50.0
Copying features...
100
Building topology for vector map ...
Registering primitives...
Copying attributes...
WARNING: Unable to create index
WARNING: Unable to copy table  for layer 1 from
 to 
WARNING: Failed to copy attribute table to output map
Building topology for vector map ...
Registering primitives...
v.net complete. 9 lines (network arcs) written to output.
C:\Users\map\Documents>v.db.connect -o map=net5dba985f0b22318
table=vector_5dba985f09e9b17 layer=2
WARNING: Table  does not exist in database
<$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db>
The table  is now part of vector map
 and may be deleted or overwritten by GRASS modules
WARNING: Cannot create index
Select privileges were granted on the table
C:\Users\map\Documents>v.net.centrality input=net5dba985f0b22318
degree="degree" closeness="closeness" iterations=1000 error=0.1 -a
output=output94c0c01b65de4586878116ac9fa984ae --overwrite
Building graph...
Registering arcs...

Re: [QGIS-Developer] v.net.centrality: Sorry, is not a valid parameter

2019-10-31 Thread magerlin
Yes you need to chose an output type yourself, but nomatter what I choose I
get the same error message.

I am running on windows and no matter what Grass procedure I run I get this
warning: 
WARNING: Concurrent mapset locking is not supported on Windows.
Do not know what it means or whether it is relevant in this case?


Error message from v.centrality.net:

QGIS version: 3.10.0-A Coruña
QGIS code revision: 6c816b4204
Qt version: 5.11.2
GDAL version: 2.4.1
GEOS version: 3.8.0-CAPI-1.13.1 
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…
Algorithm 'v.net.centrality' starting…
Input parameters:
{ '-a' : True, '-g' : False, 'GRASS_MIN_AREA_PARAMETER' : 0.0001,
'GRASS_OUTPUT_TYPE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None,
'GRASS_SNAP_TOLERANCE_PARAMETER' : -1, 'GRASS_VECTOR_DSCO' : '',
'GRASS_VECTOR_EXPORT_NOCAT' : False, 'GRASS_VECTOR_LCO' : '',
'arc_backward_column' : None, 'arc_column' : None, 'betweenness' : '',
'cats' : '', 'closeness' : 'closeness', 'degree' : 'degree', 'eigenvector' :
'', 'error' : 0.1, 'input' : 'C:\\@Temp\\net.shp|layername=net',
'iterations' : 1000, 'node_column' : None, 'output' :
'C:/@Temp/central.shp', 'points' : 'C:\\@Temp\\Poi.shp|layername=Poi',
'threshold' : 50, 'where' : '' }

Attempting to use v.external for direct layer read
Attempting to use v.external for direct layer read
g.proj -c proj4="+proj=longlat +datum=WGS84 +no_defs"
v.external input="C:\@Temp\net.shp" layer="net"
output="vector_5dba985f06fbb16" --overwrite -o
v.external input="C:\@Temp\Poi.shp" layer="Poi"
output="vector_5dba985f09e9b17" --overwrite -o
g.region n=9.327649580604518 s=9.271627488192191 e=38.7617967871377
w=38.74138436843244
v.net -s input=vector_5dba985f06fbb16 points=vector_5dba985f09e9b17
output=net5dba985f0b22318 operation=connect threshold=50.0
v.db.connect -o map=net5dba985f0b22318 table=vector_5dba985f09e9b17 layer=2
v.net.centrality input=net5dba985f0b22318 degree="degree"
closeness="closeness" iterations=1000 error=0.1 -a
output=output94c0c01b65de4586878116ac9fa984ae --overwrite
v.out.ogr type="point" input="output94c0c01b65de4586878116ac9fa984ae"
output="C:/@Temp/central.shp" format="ESRI_Shapefile" layer=1 --overwrite
Cleaning up temporary files...
Starting GRASS GIS...
WARNING: Concurrent mapset locking is not supported on Windows
Executing

...
C:\Users\map\Documents>chcp 1252 1>NUL
C:\Users\map\Documents>g.proj -c proj4="+proj=longlat +datum=WGS84 +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\map\Documents>v.external input="C:\@Temp\net.shp" layer="net"
output="vector_5dba985f06fbb16" --overwrite -o
Over-riding projection check
Building topology for vector map ...
Using external data format 'ESRI Shapefile' (feature type 'linestring')
Registering primitives...
One primitive registered
43 vertices registered
v.external complete. Link to vector map  created.
C:\Users\map\Documents>v.external input="C:\@Temp\Poi.shp" layer="Poi"
output="vector_5dba985f09e9b17" --overwrite -o
Over-riding projection check
Building topology for vector map ...
Using external data format 'ESRI Shapefile' (feature type 'point')
Registering primitives...
334 primitives registered
334 vertices registered
v.external complete. Link to vector map  created.
C:\Users\map\Documents>g.region n=9.327649580604518 s=9.271627488192191
e=38.7617967871377 w=38.74138436843244
C:\Users\map\Documents>v.net -s input=vector_5dba985f06fbb16
points=vector_5dba985f09e9b17 output=net5dba985f0b22318 operation=connect
threshold=50.0
Copying features...
100
Building topology for vector map ...
Registering primitives...
Copying attributes...
WARNING: Unable to create index
WARNING: Unable to copy table  for layer 1 from
 to 
WARNING: Failed to copy attribute table to output map
Building topology for vector map ...
Registering primitives...
v.net complete. 9 lines (network arcs) written to output.
C:\Users\map\Documents>v.db.connect -o map=net5dba985f0b22318
table=vector_5dba985f09e9b17 layer=2
WARNING: Table  does not exist in database
<$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db>
The table  is now part of vector map
 and may be deleted or overwritten by GRASS modules
WARNING: Cannot create index
Select privileges were granted on the table
C:\Users\map\Documents>v.net.centrality input=net5dba985f0b22318
degree="degree" closeness="closeness" iterations=1000 error=0.1 -a
output=output94c0c01b65de4586878116ac9fa984ae --overwrite
Building graph...
Registering arcs...
1..3..5..7..9..11..13..15..17..19..21..23..25..27..29..31..33..35..37..39..41..43..45..47..49..51..53..55..57..59..61..63..65..67..69..71..73..75..77..79..81..83..85..87..89..91..93..95..97..99..100
Flattening the graph...
Graph was built
Computing degree centrality measure
Computing betweenness and/or closeness centrality measure
0..9..18..27..36..45..54..63..72..81..90..Writing data 

Re: [QGIS-Developer] v.net.centrality: Sorry, is not a valid parameter

2019-10-31 Thread Bernd Vogelgesang

I have no idea what this function does, but when trying with your data
on 3.10 on Linux without any default parameter changes, it first
complains about a wrong output type, because in the advanced parameters,
there is no output type selected by default. Switching this to auto
gives a resulting point layer.

Cheers,
Bernd

Am 31.10.19 um 09:13 schrieb magerlin:

In trying to use v.net.centrality I get the error "Sorry,  is not a
valid parameter"

I have tried several settings when running but keep on getting this error -
cannot figure out from where the word  origins - it must be
something internal in the script as I am not using this word.

Data sample is here:  Poi.zip







-
Regards Morten

Currently using Qgis 2.18.23 (OSGeo4) and Qgis 3.10.0 in parallel
Windows 7, 64bit
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] v.net.centrality: Sorry, is not a valid parameter

2019-10-31 Thread magerlin
In trying to use v.net.centrality I get the error "Sorry,  is not a
valid parameter"

I have tried several settings when running but keep on getting this error -
cannot figure out from where the word  origins - it must be
something internal in the script as I am not using this word.

Data sample is here:  Poi.zip
  






-
Regards Morten

Currently using Qgis 2.18.23 (OSGeo4) and Qgis 3.10.0 in parallel
Windows 7, 64bit
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer