Giter VIP home page Giter VIP logo

Comments (6)

nicolas-f avatar nicolas-f commented on May 24, 2024

Have you followed the tutorial https://github.com/Ifsttar/NoiseModelling/wiki/11-Scripting-with-Python

Does it run without errors ?

from noisemodelling.

andredaa avatar andredaa commented on May 24, 2024

Yes, the tutorial runs without errors.
However, when importing a shapefile for the buildings, instead of creating mock building via SQL commands, this happens:
CALL SHPREAD('/home/USER/orbisgis_noise/orbisgis_h2gis/input_shape/buildings_shp/buildings.shp', 'buildings');
org.h2.jdbc.JdbcSQLException:
General error: "java.lang.NullPointerException" [50000-182]; SQL statement:

       CALL SHPREAD('/home/USER/orbisgis_noise/orbisgis_h2gis/input_shape/buildings_shp/buildings.shp', 'buildings') [0-182]
at org.h2.message.DbException.addSQL(DbException.java:132)
at org.h2.command.Command.executeQuery(Command.java:213)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:179)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)
at org.h2.server.pg.PgServerThread.process(PgServerThread.java:392)
at org.h2.server.pg.PgServerThread.run(PgServerThread.java:90)
at java.lang.Thread.run(Thread.java:748)

Thanks for your help!

from noisemodelling.

qhesry avatar qhesry commented on May 24, 2024

Hi !

I've updated the tutorial for the last version of NoiseModelling released.

I've tested to use 'Call SPHREAD', and 'CALL TABLE_FILE' too. And it worked after I've removed the line "create table buildings ( the_geom GEOMETRY );" in the python script.

Can you try this ?

from noisemodelling.

andredaa avatar andredaa commented on May 24, 2024

maybe there is something wrong with my shapefile. would you be able to provide your test shp file?
Thank you!

from noisemodelling.

andredaa avatar andredaa commented on May 24, 2024

CALL SHPREAD('/home/andre/noise_new/orbisgis-noisemodelling-2018-07-18/input_shape/buildings_shp/buildings.shp', 'buildings');
org.h2.jdbc.JdbcSQLException:
General error: "java.lang.NullPointerException" [50000-197]; SQL statement:

    CALL SHPREAD('/home/andre/noise_new/orbisgis-noisemodelling-2018-07-18/input_shape/buildings_shp/buildings.shp', 'buildings') [0-197]
    at org.h2.message.DbException.addSQL(DbException.java:133)
    at org.h2.command.Command.executeQuery(Command.java:220)
    at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:227)
    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:205)
    at org.h2.server.pg.PgServerThread.process(PgServerThread.java:423)
    at org.h2.server.pg.PgServerThread.run(PgServerThread.java:100)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.sql.SQLException:

from noisemodelling.

pierromond avatar pierromond commented on May 24, 2024

https://noisemodelling.readthedocs.io/en/latest/NoiseModellingScripting.html

from noisemodelling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.