Universite-Gustave-Eiffel / NoiseModelling

A open-source model to compute noise maps.
https://noisemodelling.readthedocs.io
GNU General Public License v3.0
161 stars 78 forks source link

Metric projection error #634

Closed JensGoeree closed 12 months ago

JensGoeree commented 12 months ago

NoiseModelling version 4.0.5

I try to run the Noise_Level_from_source script. However, once I have put in all my vectorfiles: DEM, (mock) buildings, groundsurface, receivers and the pointsource i get the following error once I run the script:

Process failed during execution javax.script.ScriptException: java.lang.IllegalArgumentException: Error : Please use a metric projection for POINT_SOURCE2. java.lang.IllegalArgumentException: Error : Please use a metric projection for POINT_SOURCE2. Error : Please use a metric projection for POINT_SOURCE2.

All my vectordata is in .shp, however after the error i exported the POINT_SOURCE2 to a GEOJSON with the name Point_Source3. Here the result in a textfile:

{ "type": "FeatureCollection", "name": "Point_Source3", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::28992" } }, "features": [ { "type": "Feature", "properties": { "id": null, "PK": 1, "LWD500": 90.0 }, "geometry": { "type": "Point", "coordinates": [ 175782.738337747985497, 477397.226594465319067, 0.0 ] } } ] } .

It clearly states that the EPSG is 28992 just like the other data, why does it give me an error that i need to use a metric projection?

If you need more information then I will happily provide!

Many Thanks,

Jens

pierromond commented 12 months ago

Hi Jens,

It seems that the height of the source is 0.0m. Probably, this will create a mistake !

Also, some EPSG are not known by the H2GIS engine, you can try another EPSG metric a little bit more "famous".

Finally, sometimes the error management is a little buggy, the first error the script detects is the EPSG metric, then if the table is missing for example, maybe it will throw this EPSG error also.

Keep in touch

JensGoeree commented 12 months ago

Hi @pierromond ,

I set the height to 2 meters. Then i exported the data as new .shpfiles with the EPSG code 3035 (Europe). I still get the same error unfortunately!

JensGoeree commented 12 months ago

Test.zip

Here is my data!

pierromond commented 12 months ago

can you send us the log file ?

Geoserver log

Attach geoserver log located in data_dir\logs\geoserver.log

JensGoeree commented 12 months ago

geoserver.log

pierromond commented 12 months ago

java.lang.IllegalArgumentException: Error : Please use a metric projection for POINT_SOURCE4. Higher : 21 030 09:30:17 INFO [noise_planet.noisemodelling] - Start : Import File 21 030 09:30:17 INFO [noise_planet.noisemodelling] - inputs {pathFile=D:/Ermelo_geluid/Point_Source4.shp} 21 030 09:30:17 WARN [noise_planet.noisemodelling] - The PK2 column automatically created by the SHP driver has been deleted. 21 030 09:30:17 INFO [noise_planet.noisemodelling] - The SRID of the table is 4326 21 030 09:30:17 INFO [noise_planet.noisemodelling] - POINT_SOURCE4 has a new primary key constraint on PK 21 030 09:30:17 INFO [noise_planet.noisemodelling] - The table POINT_SOURCE4 has been uploaded to database! 21 030 09:30:17 INFO [noise_planet.noisemodelling] - End : Import File

You need to specify your SRID/EPSG when you import your files in Import_file wps box (normally it is not mandatory, but probably a file is missing)...

JensGoeree commented 12 months ago

Thankyou! One step closer, however now I receive another error. I can not figure out where it is coming from. On stack exchange i see some topics about geoserver and xyz coordinates within the vectordata? geoserver2.txt

nicolas-f commented 12 months ago

Hi.

D:\Ermelo_geluid/Receivers.shp your receivers must contain a Z ordinate (you only provide x,y)

nicolas-f commented 12 months ago

The Z value is HEIGHT ( relative to the ground that you will provide with DEM)

JensGoeree commented 12 months ago

Thank you! I managed to get some results.

Kind regards,

Jens