[GRASS-user] v.isochrones : error message

Hello,

I'm working with grass 7 on windows 7 8 go RAM 64 bits.

When i execute the v.isochrones process, there is an error message and the
process does not work.

Below, i paste the interface of the v.isochrones output command:
-------------------------------------------------------------------------------------------------
/(Sat Apr 04 23:55:36 2015)
v.isochrones --overwrite map=roads_merge_idf_picardie_L93@data_set layer=1
speed_column=maxspeed start_points=MANUTAN_starting_points_L93@data_set
isochrones=vector_map timemap=raster_map time_steps=15,30,45
Pass 1 of 163659:
Reading features...
Writing raster map...
Traceback (most recent call last):
  File "C:\Users\ramaioli\AppData\Roaming\GRASS7\addons/scri
pts/v.isochrones.py", line 211, in <module>
    main()
  File "C:\Users\ramaioli\AppData\Roaming\GRASS7\addons/scri
pts/v.isochrones.py", line 154, in main
    type='line')
  File "C:\Program Files (x86)\GRASS GIS
7.0.0\etc\python\grass\script\core.py", line 375, in
run_command
    return handle_errors(returncode, returncode, args,
kwargs)
  File "C:\Program Files (x86)\GRASS GIS
7.0.0\etc\python\grass\script\core.py", line 310, in
handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None
['v.to.rast', 'input=roads_merge_idf_picardie_L93@data_set',
'use=attr', 'out=cost_map_tmp_5488', 'type=line',
'attrcolumn=tmp5488'] ended with error
Process ended with non-zero return code -1073741571. See
errors in the (error) output.
(Sat Apr 04 23:57:02 2015) La commande s'est terminée (1 min 25 sec)
-------------------------------------------------------------------------------/

Could you help me? Thanks.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-isochrones-error-message-tp5199989.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hello,

···

On Sat, Apr 4, 2015 at 6:03 PM, image93 <lcelati@cci-paris-idf.fr> wrote:

Hello,

I’m working with grass 7 on windows 7 8 go RAM 64 bits.

When i execute the v.isochrones process, there is an error message and the
process does not work.

Below, i paste the interface of the v.isochrones output command:

/(Sat Apr 04 23:55:36 2015)
v.isochrones --overwrite map=roads_merge_idf_picardie_L93@data_set layer=1
speed_column=maxspeed start_points=MANUTAN_starting_points_L93@data_set
isochrones=vector_map timemap=raster_map time_steps=15,30,45
Pass 1 of 163659:
Reading features…
Writing raster map…
Traceback (most recent call last):
File “C:\Users\ramaioli\AppData\Roaming\GRASS7\addons/scri
pts/v.isochrones.py”, line 211, in
main()
File “C:\Users\ramaioli\AppData\Roaming\GRASS7\addons/scri
pts/v.isochrones.py”, line 154, in main
type=‘line’)
File “C:\Program Files (x86)\GRASS GIS
7.0.0\etc\python\grass\script\core.py”, line 375, in
run_command
return handle_errors(returncode, returncode, args,
kwargs)
File “C:\Program Files (x86)\GRASS GIS
7.0.0\etc\python\grass\script\core.py”, line 310, in
handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run None
[‘v.to.rast’, ‘input=roads_merge_idf_picardie_L93@data_set’,
‘use=attr’, ‘out=cost_map_tmp_5488’, ‘type=line’,
‘attrcolumn=tmp5488’] ended with error
Process ended with non-zero return code -1073741571. See
errors in the (error) output.
(Sat Apr 04 23:57:02 2015) La commande s’est terminée (1 min 25 sec)
-------------------------------------------------------------------------------/

Could you help me? Thanks.

What is your computational region setting? The error seems to mean stack overflow/exhausted but I don’t know what in v.to.rast could cause that.

Anna


View this message in context: http://osgeo-org.1560.x6.nabble.com/v-isochrones-error-message-tp5199989.html
Sent from the Grass - Users mailing list archive at Nabble.com.


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Apr 5, 2015 3:07 AM, “Anna Petrášová” <kratochanna@gmail.com> wrote:

7.0.0\etc\python\grass\script\core.py", line 375, in

run_command
return handle_errors(returncode, returncode, args,
kwargs)
File “C:\Program Files (x86)\GRASS GIS
7.0.0\etc\python\grass\script\core.py”, line 310, in
handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run None

… could this error become a bit more human readable? Or have more hints in the error message?

Thanks,
Markus

On Sat, Apr 4, 2015 at 9:14 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Apr 5, 2015 3:07 AM, “Anna Petrášová” <kratochanna@gmail.com> wrote:

7.0.0\etc\python\grass\script\core.py", line 375, in

run_command
return handle_errors(returncode, returncode, args,
kwargs)
File “C:\Program Files (x86)\GRASS GIS
7.0.0\etc\python\grass\script\core.py”, line 310, in
handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run None

… could this error become a bit more human readable?

There can be nicer formatting of the things which are there and better wording. This is definitively a TODO. If this will be more (or enough) human readable, I don’t know.

Can somebody suggest some wording? (I can then change it to include all the information available.) The sentence in question is:

Module run {module_name} {module_and_its_parameters} ended with error. Process ended with non-zero return code {number}. See errors in the (error) output.

https://trac.osgeo.org/grass/browser/grass/trunk/lib/python/exceptions/init.py#L55

Or have more hints in the error message?

It is hard to say what could be those hints. There is see errors in error output. The sentence is so general (it’s not pointing above or below) because it is not clear in which context the error message is shown. In this case for example, there is actually no error output but this is impossible to know that with most of the start_command functions. We can put there that it is a probably a bug and it should be reported.

It is important to realize that this error message is a fallback error message; a message which is shown at occasions which were not anticipated by the programmer. The traceback, as annoying as it may seem, is actually one of the hints for fixing the bug. The 6.4 behavior is that the next lines are executed and they may or may not fail. Even if they fail which is desirable in error state, the error message is unrelated to the actual problem which happened earlier. The program return code which is shown now, even though it must be decoded by Google search, is huge luxury compared to 6.4. The traceback is a bit inconsistent with fatal_error calls which end the execution with only with a message. The disadvantage of this approach is that with low-level general messages such as allocation errors, it is not clear what (stack of functions) caused them. That’s one reason why traceback is the default behavior for start_command family.

But once again, the purpose of this message/exception is to provide information about errors which were not handled by the programmer. When user gets the error it means that either the caller module or the called module are not handling the situation correctly. In this case for example, it seems according to -1073741571 (stack overflow/exhausted) that v.to.rast does infinite or too deep recursion or does something strange with memory (I actually don’t know exactly, this general information what Wikipedia article will tell you). If there would be return code 1 and some error message from GRASS GIS (from v.to.rast), it would suggest that caller module didn’t prepared inputs for v.to.rast correctly. In this case, the caller module would have to prepare the results in a better way, or check them before calling v.to.rast or wrap v.to.rast call in try-except and deal with the error somehow. Alternatively, if the v.to.rast error messages in anticipated cases would be informative enough for end user to run the caller module in the right way, it is possible to request start_command family functions to fail with fatal error.

If this makes sense to you, I should put this to the manual, but not today.

Vaclav

Thanks,
Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

shouldn’t the output read “output=cost_map” and not “out=cost_map” (?)

best, Roy.

···

grass.exceptions.CalledModuleError: Module run None
[‘v.to.rast’, ‘input=roads_merge_idf_picardie_L93@data_set’,
‘use=attr’, ‘out=cost_map_tmp_5488’, ‘type=line’,

What is your computational region setting? The error seems to mean stack overflow/exhausted but I don’t know what in v.to.rast could cause that.

Hello,

Below, the computational region setting :
--------------------------------------------------------------------
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: towgs84=0,0,0,0,0,0,0
ellipsoid: grs80
north: 7037330.05419347
south: -0.94580653
west: 0
east: 798655
nsres: 1
ewres: 1
rows: 46916
cols: 5324
cells: 249780784
--------------------------------------------------------------------

When i modify the resolution nres/ewres from 1 to "150", i have no longer
error message. But when i try a process with a resolution with a value <
150, the process is endless...

According to you, the results generated at this resolution (150) would be
relevant? valid?

I loaded the output vector into qgis. The results are seem incoherent. The
curves show that we can go in 15 minutes on the other side of Paris! In
reality, From my starting point we would go much further toward toward north
than south west...
I use OSM data. I edited and populated the max speed field thanks to the
value of another filed (type of road).
How to explain this incoherence? Due to v.isochrones? Due to resolution? Due
to input maxspeed values ?

I am annoyed because it seems impossible to generate the results for a
better resolution than 150.
Thanks.

I paste below a SS representing results.

<http://osgeo-org.1560.x6.nabble.com/file/n5200009/SS_v.jpg&gt;

Thanks.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-isochrones-error-message-tp5199989p5200009.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Sun, Apr 5, 2015 at 10:00 AM, Roy <royroge@outlook.com> wrote:

On Sun, Apr 5, 2015 at 12:03 AM, image93 <lcelati@cci-paris-idf.fr> wrote:

grass.exceptions.CalledModuleError: Module run None
['v.to.rast', 'input=roads_merge_idf_picardie_L93@data_set',
'use=attr', 'out=cost_map_tmp_5488', 'type=line',

shouldn't the output read "output=cost_map" and not "out=cost_map" (?)

I think so, updated in r64988.

Markus

On 05/04/15 00:03, image93 wrote:

Hello,

I'm working with grass 7 on windows 7 8 go RAM 64 bits.

When i execute the v.isochrones process, there is an error message and the
process does not work.

Below, i paste the interface of the v.isochrones output command:
-------------------------------------------------------------------------------------------------
/(Sat Apr 04 23:55:36 2015)
v.isochrones --overwrite map=roads_merge_idf_picardie_L93@data_set layer=1
speed_column=maxspeed start_points=MANUTAN_starting_points_L93@data_set
isochrones=vector_map timemap=raster_map time_steps=15,30,45

Watch out: in the current version of v.isochrones, the default method (i.e. v.net.iso) needs a cost column in minutes, not a speed column. Abd you won't get a raster timemap, this only works for r.cost. All of this could probably be handled a bit better by the module, but I don't have time for that right now.

Moritz

On 05/04/15 12:53, image93 wrote:

Hello,

Below, the computational region setting :
--------------------------------------------------------------------
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: towgs84=0,0,0,0,0,0,0
ellipsoid: grs80
north: 7037330.05419347
south: -0.94580653
west: 0
east: 798655
nsres: 1
ewres: 1
rows: 46916
cols: 5324
cells: 249780784
--------------------------------------------------------------------

When i modify the resolution nres/ewres from 1 to "150", i have no longer
error message. But when i try a process with a resolution with a value <
150, the process is endless...

According to you, the results generated at this resolution (150) would be
relevant? valid?

I loaded the output vector into qgis. The results are seem incoherent. The
curves show that we can go in 15 minutes on the other side of Paris! In
reality, From my starting point we would go much further toward toward north
than south west...
I use OSM data. I edited and populated the max speed field thanks to the
value of another filed (type of road).
How to explain this incoherence? Due to v.isochrones? Due to resolution? Due
to input maxspeed values ?

Difficult to say without the data. At this stage, v.isochrones should probably be considered beta, notably because of a significant rewrite, so it might be v.isochrone's fault. Then again, as I mentioned in my response to your other mail, I'm not sure that you are calling v.isochrones with the correct input data.

Could you make your data available off-list, so that I can experiment with it myself ?

I am annoyed because it seems impossible to generate the results for a
better resolution than 150.

That is not normal, As I told you offlist, I've been able to run v.isochrones in a 152,198,630 pixel region on the entire OSM network of Belgium within 1-2 minutes depending on settings. That's double the number of pixels of what you would get with a 2m resolution.

Moritz

On 06/04/15 00:02, Moritz Lennert wrote:

On 05/04/15 12:53, image93 wrote:

Hello,

Below, the computational region setting :
--------------------------------------------------------------------
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: towgs84=0,0,0,0,0,0,0
ellipsoid: grs80
north: 7037330.05419347
south: -0.94580653
west: 0
east: 798655
nsres: 1
ewres: 1
rows: 46916
cols: 5324
cells: 249780784
--------------------------------------------------------------------

When i modify the resolution nres/ewres from 1 to "150", i have no longer
error message. But when i try a process with a resolution with a value <
150, the process is endless...

According to you, the results generated at this resolution (150) would be
relevant? valid?

I loaded the output vector into qgis. The results are seem incoherent.
The
curves show that we can go in 15 minutes on the other side of Paris! In
reality, From my starting point we would go much further toward toward
north
than south west...
I use OSM data. I edited and populated the max speed field thanks to the
value of another filed (type of road).
How to explain this incoherence? Due to v.isochrones? Due to
resolution? Due
to input maxspeed values ?

Difficult to say without the data. At this stage, v.isochrones should
probably be considered beta, notably because of a significant rewrite,
so it might be v.isochrone's fault. Then again, as I mentioned in my
response to your other mail, I'm not sure that you are calling
v.isochrones with the correct input data.

Could you make your data available off-list, so that I can experiment
with it myself ?

I've done a quick trial with OSM data for Ile-de-France treated as follows:

- reprojected to EPSG 2154 using ogr2ogr
- imported into GRASS

# just to make it quick I just set all roads that do not have a maxspeed to maxspeed = 50:
- v.extract roads2154 where="type like 'primary%' OR type like 'secondary%' OR type like 'tertiary%' OR type like 'motorway%' OR type like 'residential%'" output=roads

- v.db.update roads col=maxspeed value="50" where="maxspeed is NULL"
- v.db.addcolumn roads col="length double precision"
- v.to.db roads op=length col=length
- v.db.addcolumn roads col="cost double precision"
- v.db.update roads col=cost qcol="(length/(maxspeed*1000))*60"
- v.net -c roads op=nodes out=roads_with_nodes
- g.region vect=roads_with_nodes res=10 -ap
- echo "652625|6864473" | v.in.ascii in=- out=start
- v.isochrones roads_with_nodes start=start time_steps=15,30,45 isochrones=isochrones method=r.cost cost_column=maxspeed
(time = 3m20)

and

- v.isochrones roads_with_nodes start=start time_steps=15,30,45 isochrones=isochrones method=v.net.iso cost_column=cost max_distance=1000
(time = 1m9)

See attached images for the result (only motorways and primary roads shown).

Moritz

(attachments)

isochrones_rcost_example.png
isochrones_vnetiso_example.png

Hello,

Thank for your replies and for your previous example.

I try to follow it. I succeed in preparing data (v.db.update, v.net, etc. ).
Moreover, i succeed in generating relevant isochrones map thanks to GUI
graphical interface. i paste below an SS :

<http://osgeo-org.1560.x6.nabble.com/file/n5200944/SS_isochrone.jpg&gt;

But when i try to apply your v.isochrones command line :

<http://osgeo-org.1560.x6.nabble.com/file/n5200944/SS_command_line_v.jpg&gt;

an error message appears. "method" and "cost_column" parameters do not
exist (regardless of the method used).

<http://osgeo-org.1560.x6.nabble.com/file/n5200944/SS_error_message.jpg&gt;

I'm working with grass 7.0 and i re-downloaded the v.isochrones extension
from the repository. it seems i'm still working with the old version of the
extension because "method" and "cost_column" do not exist. I use the console
command via the GUI. i don't use the true GRASS7.0 COMMAND LINE because i
don't know where the path has to pointed to ? The "method" and
"cost_column" parameters do not exist too for the v.isochrones GUI
(graphical interface).

Thank you.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-isochrones-error-message-tp5199989p5200944.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On 12/04/15 12:45, image93 wrote:

Hello,

Thank for your replies and for your previous example.

I try to follow it. I succeed in preparing data (v.db.update, v.net, etc. ).
Moreover, i succeed in generating relevant isochrones map thanks to GUI
graphical interface. i paste below an SS :

<http://osgeo-org.1560.x6.nabble.com/file/n5200944/SS_isochrone.jpg&gt;

Could you explain a bit more how you created these isochrones ?

But when i try to apply your v.isochrones command line :

<http://osgeo-org.1560.x6.nabble.com/file/n5200944/SS_command_line_v.jpg&gt;

  an error message appears. "method" and "cost_column" parameters do not
exist (regardless of the method used).

<http://osgeo-org.1560.x6.nabble.com/file/n5200944/SS_error_message.jpg&gt;

I'm working with grass 7.0 and i re-downloaded the v.isochrones extension
from the repository.

How do you download the extension ?

Could you use g.extension to remove the extension and then reinstall ? Something like this:

g.extension v.isochrones op=remove -f
g.extension v.isochrones op=add

it seems i'm still working with the old version of the
extension because "method" and "cost_column" do not exist. I use the console
command via the GUI. i don't use the true GRASS7.0 COMMAND LINE because i
don't know where the path has to pointed to ?

Normally, just typing 'v.isochrones' should work. Which OS are you working in ?

The "method" and
"cost_column" parameters do not exist too for the v.isochrones GUI
(graphical interface).

That just means that you are still not using the updated version.

Try to find out which v.isochrones command is being launched. In GNU/Linux you can do this by typing "which v.isochrones" in the command line. IIUC, 'where.exe' does something similar in MS Windows.

Moritz

Hello,

I removed the current extension and then reinstall it

g.extension v.isochrones op=remove -f
g.extension v.isochrones op=add

i'am working with windows 7 32 bit OS.
I found the path pointing to the v.isochrones.bat :
C:\Users\laurent\AppData\Roaming\GRASS7\addons\bin

Unfortunatly, when i type my v.isochrones command, the same error message
appears.

Moreover, when i launch the v.isochrones GUI , METHOD and COST_COLUMN
parameters are still not available. The installation of the new extension
does not work on my side. g.extension is still reinstalled the old version.
Is this a problem of repostory? There are several the repositories for Grass
extensions? i don't know.

Regarding my OSM input data, i follow the max speed and profile speed
proposed by OSMR application for each mode of transport (CAR/ FOOT/ bike). I
paste usefull link below:

https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/bicycle.lua
https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua
https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/foot.lua

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-isochrones-error-message-tp5199989p5201157.html
Sent from the Grass - Users mailing list archive at Nabble.com.