orbisgis / geoclimate

Geospatial processing toolbox for environmental and climate studies
GNU Lesser General Public License v3.0
59 stars 16 forks source link

Erreur d'execution de worflow #813

Closed tmselemani closed 1 year ago

tmselemani commented 1 year ago

Bonjour, Quand j'essaie d'exécuter Geoclimate, j'obtiens ce message ci-dessous: Merci d'avance pour votre aide

C:\mydirectory\Geoclimate>java -jar Geoclimate.jar -f my_first_config_file_osm.json -w OSM The OSM workflow has been started. Please wait... 23:30:28.467 [main] ERROR org.orbisgis.geoclimate.osm.OSM - The input parameters cannot be null or empty. Please set a path to a configuration file or a map with all required parameters java.lang.NullPointerException: Cannot invoke method execute() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:44) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139) at org.orbisgis.geoclimate.Geoclimate.call(Geoclimate.groovy:79) at org.orbisgis.geoclimate.Geoclimate.call(Geoclimate.groovy) at picocli.CommandLine.executeUserObject(CommandLine.java:1953) at picocli.CommandLine.access$1300(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) at picocli.CommandLine.execute(CommandLine.java:2078) at picocli.CommandLine$execute.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139) at org.orbisgis.geoclimate.Geoclimate.main(Geoclimate.groovy:119)

C:\mydirectory\Geoclimate>

j3r3m1 commented 1 year ago

Thank you for reporting. I think it is the same issue as #800. It should solved soon.

j3r3m1 commented 1 year ago

Can you have a try downloading the last snapshot version here: https://nightly.link/orbisgis/geoclimate/workflows/CI_snapshot/master/geoclimate-0.0.2-SNAPSHOT.zip

If it does not work, can you please share your config file (.json) ?

tmselemani commented 1 year ago

/ )( __)( )/ )( ) ( )( \/ ) /\ ( )( __) ( (-. )) )()(( ( )( )(_ ) ( /()\ )( )) _/(__)(__)\)()()(/\/\)()()() (__) Usage: Geoclimate [-hV] -f= [-l=] [-w=] Simple command line tool to run Geoclimate algorithms -w= Name of workflow : OSM (default) BDTOPO_V2 or BDTOPO_V3 -f= The configuration file used to set up the workflow -l= Use it to manage the log level. Allowed values are : INFO, DEBUG, TRACE, OFF"

-h, --help Show this help message and exit. -V, --version Print version information and exit.

C:\mydirectory\Geoclimate>java -jar Geoclimate.jar -f my_first_config_file_osm.json -w OSM The OSM workflow has been started. Please wait... 07:18:37.307 [main] INFO org.orbisgis.geoclimate.osm.OSM - 1 osm areas will be processed 07:18:37.353 [main] ERROR org.orbisgis.geoclimate.osm.OSM - Cannot find an area from the location [[0.5050, 25.1518, 0.5478, 25.2310]] 07:18:37.437 [main] ERROR org.orbisgis.data.jdbc.JdbcTable - Cannot save the file : C:\Users\POSTE\AppData\Local\Temp\logzones.geojson Cannot execute the OSM workflow

C:\mydirectory\Geoclimate>

J'ai eu ce message après avoir lancer le processus

tmselemani commented 1 year ago

Voici ma fiche de configuration


{
    "description": "Processing OSM data",
    "input": {
        "locations": [
            [[0.5050,25.1518,0.5478,25.2310]]
        ]
    },
    "output": {
        "folder": "C:\temp"
    },
    "parameters": {
        "rsu_indicators": {
            "indicatorUse": [
                "LCZ",
                "TEB",
                "UTRF"
            ],
            "svfSimplified": true,
            "estimateHeight": true
        },
        "grid_indicators": {
            "x_size": 100,
        "y_size": 100,
        "rowCol": false,
        "output" : "geojson",
        "indicators" :[
                 "BUILDING_FRACTION", 
                 "BUILDING_HEIGHT", 
                 "WATER_FRACTION",
                 "VEGETATION_FRACTION", 
                 "ROAD_FRACTION", 
                 "IMPERVIOUS_FRACTION", 
                 "LCZ_FRACTION"
             ]
         }
    }
}
j3r3m1 commented 1 year ago

I think you have too much brackets in the location. Try with the following json it should work:


{
    "description": "Processing OSM data",
    "input": {
        "locations": [
            [0.5050,25.1518,0.5478,25.2310]
        ]
    },
    "output": {
        "folder": "C:\\temp"
    },
    "parameters": {
        "rsu_indicators": {
            "indicatorUse": [
                "LCZ",
                "TEB",
                "UTRF"
            ],
            "svfSimplified": true,
            "estimateHeight": true
        },
        "grid_indicators": {
            "x_size": 100,
        "y_size": 100,
        "rowCol": false,
        "output" : "geojson",
        "indicators" :[
                 "BUILDING_FRACTION", 
                 "BUILDING_HEIGHT", 
                 "WATER_FRACTION",
                 "VEGETATION_FRACTION", 
                 "ROAD_FRACTION", 
                 "IMPERVIOUS_FRACTION", 
                 "LCZ_FRACTION"
             ]
         }
    }
}
tmselemani commented 1 year ago

En essayant, j'ai obtenu l'erreur suivant:

Windows PowerShell Copyright (C) Microsoft Corporation. Tous droits réservés.

Installez la dernière version de PowerShell pour de nouvelles fonctionnalités et améliorations ! https://aka.ms/PSWindows

PS C:\WINDOWS\system32> cd \mydirectory\Geoclimate PS C:\mydirectory\Geoclimate> java -jar Geoclimate.jar -h


/ )( __)( )/ )( ) ( )( \/ ) /\ ( )( __) ( (-. )) )()(( ( )( )(_ ) ( /()\ )( )) _/(__)(__)\)()()(/\/\)()()() (__) Usage: Geoclimate [-hV] -f= [-l=] [-w=] Simple command line tool to run Geoclimate algorithms -w= Name of workflow : OSM (default) BDTOPO_V2 or BDTOPO_V3 -f= The configuration file used to set up the workflow -l= Use it to manage the log level. Allowed values are : INFO, DEBUG, TRACE, OFF"

-h, --help Show this help message and exit. -V, --version Print version information and exit. PS C:\mydirectory\Geoclimate> java -jar Geoclimate.jar -f my_first_config_file_osm.json -w OSM

The OSM workflow has been started. Please wait... 13:17:57.512 [main] INFO org.orbisgis.geoclimate.osm.OSM - 1 osm areas will be processed 13:17:57.920 [main] INFO org.orbisgis.geoclimate.osmtools.OSMTools - Extract the OSM data 13:17:57.951 [main] INFO org.orbisgis.geoclimate.osmtools.OSMTools - Load the OSM file in the database. 13:18:03.184 [main] ERROR org.orbisgis.data.jdbc.JdbcDataSource - Cannot import the file : C:\Users\POSTE\AppData\Local\Temp\8850b85e6e8bdb3911f4dfceabdc98d35aef74a347e09503b045cf3e1111f7cb.osm 13:18:03.184 [main] ERROR org.orbisgis.geoclimate.osm.OSM - Cannot load the OSM file C:\Users\POSTE\AppData\Local\Temp\8850b85e6e8bdb3911f4dfceabdc98d35aef74a347e09503b045cf3e1111f7cb.osm 13:18:03.199 [main] ERROR org.orbisgis.data.jdbc.JdbcTable - Cannot save the file : C:\Users\POSTE\AppData\Local\Temp\logzones.geojson Cannot execute the OSM workflow PS C:\mydirectory\Geoclimate>

Merci de votre aide

j3r3m1 commented 1 year ago

You need a double \ for any path you are using. I have changed the path that was in the previous config file. Please retry with this update.

{
    "description": "Processing OSM data",
    "input": {
        "locations": [
            [0.5050,25.1518,0.5478,25.2310]
        ]
    },
    "output": {
        "folder": "C:\\temp"
    },
    "parameters": {
        "rsu_indicators": {
            "indicatorUse": [
                "LCZ",
                "TEB",
                "UTRF"
            ],
            "svfSimplified": true,
            "estimateHeight": true
        },
        "grid_indicators": {
            "x_size": 100,
      "y_size": 100,
      "rowCol": false,
      "output" : "geojson",
      "indicators" :[
                 "BUILDING_FRACTION", 
                 "BUILDING_HEIGHT", 
                 "WATER_FRACTION",
                 "VEGETATION_FRACTION", 
                 "ROAD_FRACTION", 
                 "IMPERVIOUS_FRACTION", 
                 "LCZ_FRACTION"
             ]
         }
    }
}
ebocher commented 1 year ago

This issue was closed because it has been inactive since 3 weeks ago. Please re-open it if necessary.