Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solving WIDTH field is not taken into account in "Enrich_DEM_with_road.groovy" #635

Open
pierromond opened this issue Nov 21, 2023 Discussed in #633 · 0 comments
Open

Comments

@pierromond
Copy link
Collaborator

Discussed in #633

Originally posted by IsotoCedex November 20, 2023
wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Geometric_Tools/Enrich_DEM_with_road.groovy

Include: $roadWidth IS NOT NULL

def import_roads = """
    ------------
    -- Import roads (that are on the floor --> POS_SOL=0)
    -- Road width is precalculated into WIDTH column. When largeur < 3, then 3m

    DROP TABLE IF EXISTS dem_roads;
    CREATE TABLE dem_roads AS SELECT THE_GEOM, 'ROAD' as SOURCE, 
        (CASE WHEN $roadWidth IS NOT NULL AND $roadWidth>3 THEN $roadWidth/2 ELSE 1.5 END) as WIDTH 
        FROM $inputRoad WHERE POS_SOL = '0' AND st_zmin(THE_GEOM) > 0;
    CREATE SPATIAL INDEX ON dem_roads(THE_GEOM);
    ALTER TABLE dem_roads ADD PK_LINE INT AUTO_INCREMENT NOT NULL;
    ALTER TABLE dem_roads add primary key(PK_LINE);
    
    -- Roads: layer $inputRoad imported
"""


```</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant