Giter VIP home page Giter VIP logo

Comments (11)

andredaa avatar andredaa commented on May 23, 2024

You can reproduce the script by starting the orbisgis server by running
java -cp "bin/*:bundle/*:sys-bundle/*" org.h2.tools.Server -pg -trace inside the project folder

Then execute noisemap.py

The script will fail with the aforementioned issue. Uncomment these lines to add a building in the marked gridcell and the script will run fine. https://github.com/CityScope/CSL_Hamburg_Noise/blob/7d97297ade14485051de3fe8888f3deddcf7de1f/noisemap.py#L42

from noisemodelling.

Picaut avatar Picaut commented on May 23, 2024

Than you very much.
We will take a look and come back as soon as possible.
Best regards

from noisemodelling.

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

Hi,

The submodule city_io_to_geojson is missing.

from noisemodelling.

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

As a side note
I think it should be way more efficient to import data using h2gis drivers:
http://www.h2gis.org/docs/1.5.0/SHPRead/
http://www.h2gis.org/docs/1.5.0/GeoJsonRead/

from noisemodelling.

andredaa avatar andredaa commented on May 23, 2024

Hi,
thank you so much for your quick reply!

If the submodule "city_io_to_geojson" is not loaded correctly - it was because I missed the .gitmodules file. It is pushed now. You can checkout the branch "buildings-error" from https://github.com/CityScope/CSL_Hamburg_Noise and Pull. You can init the submodule with git submodule init and git submodule update .

Start the database server by executing

java -cp "bin/:bundle/:sys-bundle/*" org.h2.tools.Server -pg -trace

then run

python noisemap.py

(it's python 2.7)

The script will fail with the aforementioned issue. Uncomment these lines to add a building in the marked gridcell and the script will run fine. https://github.com/CityScope/CSL_Hamburg_Noise/blob/7d97297ade14485051de3fe8888f3deddcf7de1f/noisemap.py#L42

Thanks for your hint on the GEOJSONREAD - I will look into it.

from noisemodelling.

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

NoiseModelling is executing a Constrained Delaunay mesh of your buildings.

The problem here is that the walls of your buildings are intersecting. It is possible to merge buildings that may be problematic with this operation:

drop table if exists BUILDINGS_SIMP_MERGE;
create table BUILDINGS_SIMP_MERGE as select ST_UNION(ST_SIMPLIFYPRESERVETOPOLOGY(ST_buffer(ST_ACCUM(the_geom),0),0.1)) the_geom from buildings;
drop table if exists buildings;
create table buildings(id serial, the_geom polygon) as select null, the_geom from st_explode('BUILDINGS_SIMP_MERGE');
drop table BUILDINGS_SIMP_MERGE;

You do not set an height for your buildings, is this expected ?

from noisemodelling.

andredaa avatar andredaa commented on May 23, 2024

Thank you so much for your tip. I will merge the buildings as suggested and try again.
I am a bit unclear on the handling of building height and actually wondered about this.
I was following mostly this paper, where it says the buidlings are a 2D geometry without information about height or topography. (https://github.com/CityScope/CSL_Hamburg_Noise/blob/buildings-error/documentation/literature/ifsttar.pdf, page 13)
Could you quickly link me to an explanation of the handling of building heights?

from noisemodelling.

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

Some tutorials cover buildings with height.

Technically it is an additional numeric field named "HEIGHT" in the buildings table.

Then this function must be used with the appropriate attributes:
https://github.com/Ifsttar/NoiseModelling/wiki/03-SQL-functions#br_trigrid3d

A tutorial with buildings with height:
https://github.com/Ifsttar/NoiseModelling/wiki/05-Ground-effect
https://github.com/Ifsttar/NoiseModelling/wiki/06-Modelling-barrier-using-digital-elevation-model
https://github.com/Ifsttar/NoiseModelling/wiki/08-Vertical-noise-map

As you "generate" the buildings, it should be appropriate to set a free space (at least 10cm) between buildings instead of trying to fix faulty polygons.

from noisemodelling.

andredaa avatar andredaa commented on May 23, 2024

Looks like it was the intersecting buildings that caused the problem.
I recreated the buildings table like this though

-- create table buildings(id serial, the_geom polygon) as select null, the_geom from st_explode('BUILDINGS_SIMP_MERGE');
create table buildings(the_geom GEOMETRY) as select the_geom from st_explode('BUILDINGS_SIMP_MERGE');

As it failed when creating it with a id column.

from noisemodelling.

andredaa avatar andredaa commented on May 23, 2024

As you "generate" the buildings, it should be appropriate to set a free space (at least 10cm) between buildings instead of trying to fix faulty polygons.

Yes, we adjust it so that we can put space in between seperate buildings and merge polygons for buildings stretching over several grid cells.

Thank you so much for your explanation of the 3D function. I will look into it.

from noisemodelling.

andredaa avatar andredaa commented on May 23, 2024

Thank you very much for your support and prompt answers!

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.