Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

[WIP] added new topic and layer road alignements #327

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config_db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ db_config:
railways_construction_limits
highways_project_zones
highways_construction_limits
road_building_lines
airport_security_zones
airport_project_zones
airport_construction_limits
Expand Down
27 changes: 21 additions & 6 deletions crdppfportal/models.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
# -*- coding: utf-8 -*-

from sqlalchemy import(
Column,
Sequence,
Integer,
Text,
Column,
Integer,
String,
Float)

ForeignKey)

from sqlalchemy.orm import relationship, backref

from papyrus.geo_interface import GeoInterface

from geoalchemy2 import Geometry

from crdppf import db_config
srid_ = db_config['srid']

from crdppf.models import Base

# Specific model definition here
class Users(Base):
__tablename__ = 'users'
__table_args__ = {'schema': db_config['schema'], 'autoload': True}

if 'road_building_lines' in db_config['restrictions']:
class RoadBuildingLines(GeoInterface, Base):
__tablename__ = 'r078ne_alignements'
__table_args__ = {'schema': db_config['schema'], 'autoload': True}
idobj = Column(Integer, primary_key=True)
geom = Column(Geometry("MULTILINE", srid=srid_))
else:
class RoadBuildingLines():
pass
Binary file added crdppfportal/static/images/icons/ali_prim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crdppfportal/static/images/icons/ali_rec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crdppfportal/static/images/icons/ali_rez.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crdppfportal/static/images/icons/ali_sec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crdppfportal/static/images/icons/bio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crdppfportal/static/images/icons/fio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion crdppfportal/table2model_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from crdppf.models.models import CHPollutedSitesPublicTransports, CHPollutedSitesPublicTransportsPDF
from crdppf.models.models import WaterProtectionZones, WaterProtectionPerimeters
from crdppf.models.models import RoadNoise, ForestLimits, ForestDistances
from crdppfportal.models import RoadBuildingLines

# Matching dictionnary model-table name
table2model_match = {
Expand Down Expand Up @@ -38,5 +39,6 @@
'r132_perimetre_prot_eau': WaterProtectionPerimeters,
'r145_sens_bruit': RoadNoise,
'r157_lim_foret': ForestLimits,
'r159_dist_foret': ForestDistances
'r159_dist_foret': ForestDistances,
'r078ne_alignements': RoadBuildingLines
}
72 changes: 72 additions & 0 deletions mapserver/crdppf.map.mako
Original file line number Diff line number Diff line change
Expand Up @@ -1876,6 +1876,78 @@ LAYER
END
END

LAYER
NAME "r078ne_alignements"
TYPE LINE
METADATA
"ows_title" "r078ne_alignements"
"wms_srs""EPSG:2056"
"wms_title" "${instanceid} WMS Server"
"wms_onlineresource" "http://${host}/${instanceid}/wmscrdppf"
END
CONNECTIONTYPE POSTGIS
CONNECTION "user=${dbuser} password=${dbpassword} dbname=${db} host=${dbhost} port=${dbport}"
PROCESSING "CLOSE_CONNECTION=DEFER"
DATA "geom from crdppf.r078ne_alignements using unique idobj using srid=2056"
STATUS ON
TEMPLATE "ttt"
TOLERANCE 5
TOLERANCEUNITS pixels
CLASSITEM "codegenre"
CLASS
NAME "alignement primaire"
EXPRESSION /ali_prim/
STYLE
WIDTH 3
COLOR 25 60 116
END
END
CLASS
NAME "alignement secondaire"
EXPRESSION /ali_sec/
STYLE
WIDTH 2
COLOR 25 60 116
END
END
CLASS
NAME "front d'implantation obligatoire"
EXPRESSION /fio/
STYLE
PATTERN 6 6 END
WIDTH 3
COLOR 31 120 180
END
END
CLASS
NAME "bande d'implantation obligatoire"
EXPRESSION /bio/
STYLE
WIDTH 4
COLOR 31 120 180
END
END
CLASS
NAME "alignement de rez-de-chaussée"
EXPRESSION /ali_rez/
STYLE
WIDTH 2
COLOR 14 88 162
END
END
CLASS
NAME "alignement en cas de reconstruction"
EXPRESSION /ali_rec/
STYLE
PATTERN 6 6 END
WIDTH 2
COLOR 31 120 180
END
END
MINSCALEDENOM 50
END


#####################
# RESTRICTIONS CRDPPF - fin
#####################
Expand Down