irie 0.0.41__py3-none-any.whl → 0.0.43__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of irie might be problematic. Click here for more details.
- irie/apps/inventory/archive/CESMD.py +0 -0
- irie/apps/inventory/filters.py +1 -1
- irie/apps/inventory/models.py +27 -0
- irie/apps/inventory/services/render.py +0 -0
- irie/apps/inventory/urls.py +3 -0
- irie/apps/inventory/views.py +57 -0
- irie/apps/prediction/forms.py +2 -1
- irie/apps/prediction/models.py +24 -0
- irie/apps/prediction/runners/hazus.py +33 -19
- irie/apps/prediction/urls.py +5 -3
- irie/apps/prediction/views.py +101 -8
- irie/apps/static/assets/css/brace.css +0 -33
- irie/apps/static/assets/css/brace.css.map +1 -1
- irie/apps/static/assets/css/brace.min.css +1 -1
- irie/apps/static/assets/js/brace.js +2 -1
- irie/apps/templates/includes/scripts.html +10 -1
- irie/apps/templates/includes/sidebar.html +19 -11
- irie/apps/templates/inventory/asset-on-map.html +457 -0
- irie/apps/templates/inventory/asset-profile.html +1 -2
- irie/apps/templates/inventory/map-inventory.html +136 -0
- irie/apps/templates/inventory/map-inventory2.html +143 -0
- irie/apps/templates/inventory/map-single-asset.html +0 -0
- irie/apps/templates/inventory/map-single-asset2.html +618 -0
- irie/apps/templates/inventory/map-terrain.html +214 -0
- irie/apps/templates/inventory/sensor-upload.html +1 -0
- irie/apps/templates/inventory/three-maps.html +229 -0
- irie/apps/templates/layouts/base.html +2 -1
- irie/apps/templates/prediction/predictor-upload.html +68 -22
- irie/apps/templates/site/index.html +36 -27
- irie/apps/templates/site/page-400-sidebar.html +31 -0
- irie/apps/templates/site/page-400.html +29 -0
- irie/apps/templates/site/page-404-sidebar.html +1 -1
- irie/apps/templates/site/page-404.html +1 -1
- irie/fhwa/__init__.py +132 -0
- irie/fhwa/__main__.py +79 -0
- irie/fhwa/fields/nbi001.py +61 -0
- irie/fhwa/fields/nbi001b.py +1 -0
- irie/fhwa/fields/nbi002.py +0 -0
- irie/fhwa/fields.py +32 -0
- irie/init/__main__.py +0 -4
- irie/init/calid.py +86 -3
- irie/init/getNBIData.py +1 -1
- irie/init/getNBIData2.py +304 -0
- irie/init/management/commands/init_assets.py +11 -11
- irie/init/management/commands/init_predictors.py +1 -1
- irie/init/management/commands/make_asset.py +0 -0
- irie/pull/nbi.py +304 -0
- {irie-0.0.41.dist-info → irie-0.0.43.dist-info}/METADATA +1 -1
- {irie-0.0.41.dist-info → irie-0.0.43.dist-info}/RECORD +53 -36
- {irie-0.0.41.dist-info → irie-0.0.43.dist-info}/WHEEL +1 -1
- irie/apps/inventory/CESMD.py +0 -81
- irie/apps/inventory/archive/arcGIS.py +0 -1175
- irie/apps/inventory/traffic.py +0 -175052
- /irie/apps/inventory/{calid.py → archive/calid.py} +0 -0
- {irie-0.0.41.dist-info → irie-0.0.43.dist-info}/entry_points.txt +0 -0
- {irie-0.0.41.dist-info → irie-0.0.43.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<title>MapLibre – California Outline Only</title>
|
|
6
|
+
<!-- MapLibre GL CSS -->
|
|
7
|
+
<link
|
|
8
|
+
href="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css"
|
|
9
|
+
rel="stylesheet"
|
|
10
|
+
/>
|
|
11
|
+
<style>
|
|
12
|
+
html, body {
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
#map {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
21
|
+
/* ------------------- Marker Styles ------------------- */
|
|
22
|
+
/* 1) Small gray circle for Partial */
|
|
23
|
+
.marker-partial {
|
|
24
|
+
width: 6px;
|
|
25
|
+
height: 6px;
|
|
26
|
+
background-color: #929292;
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
border: 1px solid #555;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* 2) Beige teardrop pin for Complete */
|
|
32
|
+
.marker-complete {
|
|
33
|
+
width: 30px;
|
|
34
|
+
height: 44px;
|
|
35
|
+
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
|
|
36
|
+
background-repeat: no-repeat;
|
|
37
|
+
background-position: center;
|
|
38
|
+
background-size: contain;
|
|
39
|
+
/* A “teardrop pin” shape in beige (#F5F5DC) */
|
|
40
|
+
background-image: url("data:image/svg+xml,%3Csvg width='30' height='44' viewBox='0 0 30 44' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 0C8.383 0 3 5.383 3 12c0 8.25 12 24.75 12 24.75S27 20.25 27 12c0-6.617-5.383-12-12-12zM15 16.4c-2.427 0-4.4-1.973-4.4-4.4 0-2.427 1.973-4.4 4.4-4.4 2.427 0 4.4 1.973 4.4 4.4 0 2.427-1.973 4.4-4.4 4.4z' fill='%23febf80' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* 3) Blue teardrop pin for Instrumented */
|
|
44
|
+
.marker-instrumented {
|
|
45
|
+
width: 20px;
|
|
46
|
+
height: 34px;
|
|
47
|
+
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
|
|
48
|
+
background-repeat: no-repeat;
|
|
49
|
+
background-position: center;
|
|
50
|
+
background-size: contain;
|
|
51
|
+
/* Same shape, but blue fill */
|
|
52
|
+
background-image: url("data:image/svg+xml,%3Csvg width='30' height='44' viewBox='0 0 30 44' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 0C8.383 0 3 5.383 3 12c0 8.25 12 24.75 12 24.75S27 20.25 27 12c0-6.617-5.383-12-12-12zM15 16.4c-2.427 0-4.4-1.973-4.4-4.4 0-2.427 1.973-4.4 4.4-4.4 2.427 0 4.4 1.973 4.4 4.4 0 2.427-1.973 4.4-4.4 4.4z' fill='%232f9ad4' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
55
|
+
</head>
|
|
56
|
+
<body>
|
|
57
|
+
<div id="map" data-bridges='{{ data|safe }}'></div>
|
|
58
|
+
|
|
59
|
+
<!-- MapLibre GL JS -->
|
|
60
|
+
<script src="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js"></script>
|
|
61
|
+
|
|
62
|
+
<script>
|
|
63
|
+
// Example data structure (fake sample locations)
|
|
64
|
+
const data = JSON.parse(document.getElementById('map').dataset.bridges);
|
|
65
|
+
|
|
66
|
+
// Create the map
|
|
67
|
+
const map = new maplibregl.Map({
|
|
68
|
+
container: 'map',
|
|
69
|
+
style: {
|
|
70
|
+
"version": 8,
|
|
71
|
+
"name": "California Outline Only",
|
|
72
|
+
"sources": {
|
|
73
|
+
"california-outline": {
|
|
74
|
+
"type": "geojson",
|
|
75
|
+
// Local GeoJSON file with California's outline
|
|
76
|
+
"data": "/california.json"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"layers": [
|
|
80
|
+
{
|
|
81
|
+
"id": "background",
|
|
82
|
+
"type": "background",
|
|
83
|
+
"paint": {
|
|
84
|
+
"background-color": "#fff"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "california-outline",
|
|
89
|
+
"type": "line",
|
|
90
|
+
"source": "california-outline",
|
|
91
|
+
"paint": {
|
|
92
|
+
"line-color": "#000",
|
|
93
|
+
"line-width": 3
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
center: [-119.4179, 36.7783], // approx center of CA
|
|
99
|
+
zoom: 5,
|
|
100
|
+
maxPitch: 85,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// Once map loads, add markers
|
|
104
|
+
map.on('load', () => {
|
|
105
|
+
// Add Partial markers (small gray circles)
|
|
106
|
+
data.Partial.forEach(point => {
|
|
107
|
+
const el = document.createElement('div');
|
|
108
|
+
el.className = 'marker-partial';
|
|
109
|
+
new maplibregl.Marker({ element: el })
|
|
110
|
+
.setLngLat([point.lon, point.lat])
|
|
111
|
+
.addTo(map);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
// Add Instrumented markers (blue pins)
|
|
116
|
+
data.Instrumented.forEach(point => {
|
|
117
|
+
const el = document.createElement('div');
|
|
118
|
+
el.className = 'marker-instrumented';
|
|
119
|
+
new maplibregl.Marker({ element: el })
|
|
120
|
+
.setLngLat([point.lon, point.lat])
|
|
121
|
+
.addTo(map);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
// Add Complete markers (beige pins)
|
|
126
|
+
data.Complete.forEach(point => {
|
|
127
|
+
const el = document.createElement('div');
|
|
128
|
+
el.className = 'marker-complete';
|
|
129
|
+
new maplibregl.Marker({ element: el })
|
|
130
|
+
.setLngLat([point.lon, point.lat+0.2])
|
|
131
|
+
.addTo(map);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
</script>
|
|
135
|
+
</body>
|
|
136
|
+
</html>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<title>D3 Map – California Outline & Markers</title>
|
|
6
|
+
<script src="https://d3js.org/d3.v7.min.js"></script>
|
|
7
|
+
<style>
|
|
8
|
+
html, body {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
/* The container for the SVG */
|
|
14
|
+
#map {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
/* --- Marker Styles --- */
|
|
19
|
+
/* Partial markers: small gray circles */
|
|
20
|
+
.marker-partial {
|
|
21
|
+
fill: #929292;
|
|
22
|
+
stroke: #555;
|
|
23
|
+
stroke-width: 1;
|
|
24
|
+
}
|
|
25
|
+
/* Complete markers: beige teardrop shape with drop shadow */
|
|
26
|
+
.marker-complete {
|
|
27
|
+
filter: url(#drop-shadow);
|
|
28
|
+
fill: #febf80;
|
|
29
|
+
stroke: #000;
|
|
30
|
+
stroke-width: 1;
|
|
31
|
+
}
|
|
32
|
+
/* Instrumented markers: blue teardrop shape with drop shadow */
|
|
33
|
+
.marker-instrumented {
|
|
34
|
+
filter: url(#drop-shadow);
|
|
35
|
+
fill: #2f9ad4;
|
|
36
|
+
stroke: #000;
|
|
37
|
+
stroke-width: 1;
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
40
|
+
</head>
|
|
41
|
+
<body>
|
|
42
|
+
<!-- The container holds the marker data via a data attribute -->
|
|
43
|
+
<div id="map" data-bridges='{{ data|safe }}'></div>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
// Select the container and parse marker data from its data attribute.
|
|
47
|
+
const container = d3.select("#map");
|
|
48
|
+
const bridgesData = JSON.parse(container.attr("data-bridges"));
|
|
49
|
+
|
|
50
|
+
// Get container dimensions.
|
|
51
|
+
const width = container.node().clientWidth;
|
|
52
|
+
const height = container.node().clientHeight;
|
|
53
|
+
|
|
54
|
+
// Append an SVG element that fills the container.
|
|
55
|
+
const svg = container.append("svg")
|
|
56
|
+
.attr("width", width)
|
|
57
|
+
.attr("height", height);
|
|
58
|
+
|
|
59
|
+
// Append a defs element to hold the drop shadow filter.
|
|
60
|
+
const defs = svg.append("defs");
|
|
61
|
+
const filter = defs.append("filter")
|
|
62
|
+
.attr("id", "drop-shadow")
|
|
63
|
+
.attr("height", "130%");
|
|
64
|
+
filter.append("feGaussianBlur")
|
|
65
|
+
.attr("in", "SourceAlpha")
|
|
66
|
+
.attr("stdDeviation", 2)
|
|
67
|
+
.attr("result", "blur");
|
|
68
|
+
filter.append("feOffset")
|
|
69
|
+
.attr("in", "blur")
|
|
70
|
+
.attr("dx", 0)
|
|
71
|
+
.attr("dy", 2)
|
|
72
|
+
.attr("result", "offsetBlur");
|
|
73
|
+
const feMerge = filter.append("feMerge");
|
|
74
|
+
feMerge.append("feMergeNode").attr("in", "offsetBlur");
|
|
75
|
+
feMerge.append("feMergeNode").attr("in", "SourceGraphic");
|
|
76
|
+
|
|
77
|
+
// Load the California outline GeoJSON.
|
|
78
|
+
d3.json("/california.json").then(california => {
|
|
79
|
+
// Create a projection that fits the California GeoJSON into the SVG.
|
|
80
|
+
const projection = d3.geoMercator().fitSize([width, height], california);
|
|
81
|
+
const path = d3.geoPath().projection(projection);
|
|
82
|
+
|
|
83
|
+
// Draw the California outline.
|
|
84
|
+
svg.append("path")
|
|
85
|
+
.datum(california)
|
|
86
|
+
.attr("d", path)
|
|
87
|
+
.attr("fill", "none")
|
|
88
|
+
.attr("stroke", "#000")
|
|
89
|
+
.attr("stroke-width", 3);
|
|
90
|
+
|
|
91
|
+
// Helper: project a marker's [lon, lat] to [x, y] in the SVG.
|
|
92
|
+
const projectPoint = d => projection([d.lon, d.lat]);
|
|
93
|
+
|
|
94
|
+
// ----- Draw Partial markers as circles -----
|
|
95
|
+
svg.selectAll("circle.marker-partial")
|
|
96
|
+
.data(bridgesData.Partial)
|
|
97
|
+
.enter()
|
|
98
|
+
.append("circle")
|
|
99
|
+
.attr("class", "marker-partial")
|
|
100
|
+
.attr("r", 3)
|
|
101
|
+
.attr("cx", d => projectPoint(d)[0])
|
|
102
|
+
.attr("cy", d => projectPoint(d)[1]);
|
|
103
|
+
|
|
104
|
+
// Define the teardrop marker shape as a reusable path string.
|
|
105
|
+
const teardropPath = "M15 0C8.383 0 3 5.383 3 12c0 8.25 12 24.75 12 24.75S27 20.25 27 12c0-6.617-5.383-12-12-12zM15 16.4c-2.427 0-4.4-1.973-4.4-4.4 0-2.427 1.973-4.4 4.4-4.4 2.427 0 4.4 1.973 4.4 4.4 0 2.427-1.973 4.4-4.4 4.4z";
|
|
106
|
+
|
|
107
|
+
// ----- Draw Instrumented markers (blue teardrop) -----
|
|
108
|
+
// These will be scaled to a width of ~20px (original viewBox width is 30).
|
|
109
|
+
svg.selectAll("path.marker-instrumented")
|
|
110
|
+
.data(bridgesData.Instrumented)
|
|
111
|
+
.enter()
|
|
112
|
+
.append("path")
|
|
113
|
+
.attr("class", "marker-instrumented")
|
|
114
|
+
.attr("d", teardropPath)
|
|
115
|
+
.attr("transform", d => {
|
|
116
|
+
const [x, y] = projectPoint(d);
|
|
117
|
+
const scale = 20 / 30; // scale down to 20px width
|
|
118
|
+
// The teardrop shape is defined in a 30x44 viewBox; its tip is at (15,44).
|
|
119
|
+
// We shift so the tip aligns with the projected [x,y].
|
|
120
|
+
return `translate(${x - 15 * scale}, ${y - 44 * scale}) scale(${scale})`;
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// ----- Draw Complete markers (beige teardrop) -----
|
|
124
|
+
svg.selectAll("path.marker-complete")
|
|
125
|
+
.data(bridgesData.Complete)
|
|
126
|
+
.enter()
|
|
127
|
+
.append("path")
|
|
128
|
+
.attr("class", "marker-complete")
|
|
129
|
+
.attr("d", teardropPath)
|
|
130
|
+
.attr("transform", d => {
|
|
131
|
+
// In the original code, complete markers are offset slightly in latitude (+0.2).
|
|
132
|
+
// Compute the projected offset.
|
|
133
|
+
const [x, y] = projectPoint(d);
|
|
134
|
+
const shifted = projection([d.lon, d.lat + 0.2]);
|
|
135
|
+
const dy = shifted[1] - y;
|
|
136
|
+
// Use the full size (30px wide) for complete markers.
|
|
137
|
+
const scale = 1;
|
|
138
|
+
return `translate(${x - 15 * scale}, ${y - 44 * scale + dy}) scale(${scale})`;
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
</script>
|
|
142
|
+
</body>
|
|
143
|
+
</html>
|
|
File without changes
|