A-O98 commited on
Commit
557f143
β€’
1 Parent(s): 49ee313

Updated Layout

Browse files
asim/curated/CLP/2024-04-26/field_asim/masked.geojson ADDED
The diff for this file is too large to render. See raw diff
 
asim/curated/NDVI/2024-04-26/field_asim/masked.geojson ADDED
The diff for this file is too large to render. See raw diff
 
asim/processed/CLP/2024-04-26/field_asim/masked.tiff ADDED
asim/processed/NDVI/2024-04-26/field_asim/masked.tiff ADDED
asim/raw/CLP/2024-04-26/field_asim/6f6ccf0c63a500286583b86ec19d568a/request.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "request": {
3
+ "headers": {
4
+ "accept": "image/tiff",
5
+ "content-type": "application/json"
6
+ },
7
+ "payload": {
8
+ "evalscript": " //VERSION=3\n function setup(){\n return{\n input: [\"CLP\"],\n output: [\n {\n sampleType: \"FLOAT32\",\n bands: 1\n }\n ]\n }\n }\n \n function evaluatePixel(sample){\n return [sample.CLP/255];\n }",
9
+ "input": {
10
+ "bounds": {
11
+ "bbox": [
12
+ 32.670079,
13
+ 15.562688,
14
+ 32.6938,
15
+ 15.576819
16
+ ],
17
+ "properties": {
18
+ "crs": "http://www.opengis.net/def/crs/EPSG/0/4326"
19
+ }
20
+ },
21
+ "data": [
22
+ {
23
+ "dataFilter": {
24
+ "timeRange": {
25
+ "from": "2024-04-26T00:00:00Z",
26
+ "to": "2024-04-26T23:59:59Z"
27
+ }
28
+ },
29
+ "type": "sentinel-2-l1c"
30
+ }
31
+ ]
32
+ },
33
+ "output": {
34
+ "height": 156,
35
+ "responses": [
36
+ {
37
+ "format": {
38
+ "type": "image/tiff"
39
+ },
40
+ "identifier": "default"
41
+ }
42
+ ],
43
+ "width": 255
44
+ }
45
+ },
46
+ "timestamp": "2024-04-28T15:07:02.427386",
47
+ "url": "https://services.sentinel-hub.com/api/v1/process"
48
+ },
49
+ "response": {
50
+ "elapsed": 0.92,
51
+ "headers": {
52
+ "Connection": "keep-alive",
53
+ "Content-Length": "5196",
54
+ "Content-Type": "image/tiff",
55
+ "Date": "Sun, 28 Apr 2024 13:07:02 GMT",
56
+ "access-control-allow-credentials": "true",
57
+ "access-control-allow-headers": "origin,content-type,accept,accept-crs,authorization,cache-control",
58
+ "access-control-allow-methods": "GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH",
59
+ "access-control-allow-origin": "*",
60
+ "access-control-max-age": "3600",
61
+ "x-processingunits-spent": "0.10116577449934994"
62
+ },
63
+ "status_code": 200
64
+ }
65
+ }
asim/raw/CLP/2024-04-26/field_asim/6f6ccf0c63a500286583b86ec19d568a/response.tiff ADDED
asim/raw/NDVI/2024-04-26/field_asim/fefb3597182d3661a8c72662d5311620/request.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "request": {
3
+ "headers": {
4
+ "accept": "image/tiff",
5
+ "content-type": "application/json"
6
+ },
7
+ "payload": {
8
+ "evalscript": "//VERSION=3\n\nvar degToRad = Math.PI / 180;\n\nfunction evaluatePixelOrig(samples) {\n var sample = samples[0];\n var b03_norm = normalize(sample.B03, 0, 0.253061520471542);\n var b04_norm = normalize(sample.B04, 0, 0.290393577911328);\n var b05_norm = normalize(sample.B05, 0, 0.305398915248555);\n var b06_norm = normalize(sample.B06, 0.006637972542253, 0.608900395797889);\n var b07_norm = normalize(sample.B07, 0.013972727018939, 0.753827384322927);\n var b8a_norm = normalize(sample.B8A, 0.026690138082061, 0.782011770669178);\n var b11_norm = normalize(sample.B11, 0.016388074192258, 0.493761397883092);\n var b12_norm = normalize(sample.B12, 0, 0.493025984460231);\n var viewZen_norm = normalize(Math.cos(sample.viewZenithMean * degToRad), 0.918595400582046, 1);\n var sunZen_norm = normalize(Math.cos(sample.sunZenithAngles * degToRad), 0.342022871159208, 0.936206429175402);\n var relAzim_norm = Math.cos((sample.sunAzimuthAngles - sample.viewAzimuthMean) * degToRad)\n \n var n1 = neuron1(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm);\n var n2 = neuron2(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm);\n var n3 = neuron3(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm);\n var n4 = neuron4(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm);\n var n5 = neuron5(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm);\n \n var l2 = layer2(n1, n2, n3, n4, n5);\n \n var lai = denormalize(l2, 0.000319182538301, 14.4675094548151);\n return {\n default: [lai]\n }\n}\n\nfunction neuron1(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm) {\n var sum =\n + 4.96238030555279\n - 0.023406878966470 * b03_norm\n + 0.921655164636366 * b04_norm\n + 0.135576544080099 * b05_norm\n - 1.938331472397950 * b06_norm\n - 3.342495816122680 * b07_norm\n + 0.902277648009576 * b8a_norm\n + 0.205363538258614 * b11_norm\n - 0.040607844721716 * b12_norm\n - 0.083196409727092 * viewZen_norm\n + 0.260029270773809 * sunZen_norm\n + 0.284761567218845 * relAzim_norm;\n\n return tansig(sum);\n}\n\nfunction neuron2(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm) {\n var sum =\n + 1.416008443981500\n - 0.132555480856684 * b03_norm\n - 0.139574837333540 * b04_norm\n - 1.014606016898920 * b05_norm\n - 1.330890038649270 * b06_norm\n + 0.031730624503341 * b07_norm\n - 1.433583541317050 * b8a_norm\n - 0.959637898574699 * b11_norm\n + 1.133115706551000 * b12_norm\n + 0.216603876541632 * viewZen_norm\n + 0.410652303762839 * sunZen_norm\n + 0.064760155543506 * relAzim_norm;\n \n return tansig(sum);\n}\n\nfunction neuron3(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm) {\n var sum =\n + 1.075897047213310\n + 0.086015977724868 * b03_norm\n + 0.616648776881434 * b04_norm\n + 0.678003876446556 * b05_norm\n + 0.141102398644968 * b06_norm\n - 0.096682206883546 * b07_norm\n - 1.128832638862200 * b8a_norm\n + 0.302189102741375 * b11_norm\n + 0.434494937299725 * b12_norm\n - 0.021903699490589 * viewZen_norm\n - 0.228492476802263 * sunZen_norm\n - 0.039460537589826 * relAzim_norm;\n\n return tansig(sum);\n}\n \nfunction neuron4(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm) {\n var sum =\n + 1.533988264655420\n - 0.109366593670404 * b03_norm\n - 0.071046262972729 * b04_norm\n + 0.064582411478320 * b05_norm\n + 2.906325236823160 * b06_norm\n - 0.673873108979163 * b07_norm\n - 3.838051868280840 * b8a_norm\n + 1.695979344531530 * b11_norm\n + 0.046950296081713 * b12_norm\n - 0.049709652688365 * viewZen_norm\n + 0.021829545430994 * sunZen_norm\n + 0.057483827104091 * relAzim_norm;\n \n return tansig(sum);\n}\n \nfunction neuron5(b03_norm,b04_norm,b05_norm,b06_norm,b07_norm,b8a_norm,b11_norm,b12_norm, viewZen_norm,sunZen_norm,relAzim_norm) {\n var sum =\n + 3.024115930757230\n - 0.089939416159969 * b03_norm\n + 0.175395483106147 * b04_norm\n - 0.081847329172620 * b05_norm\n + 2.219895367487790 * b06_norm\n + 1.713873975136850 * b07_norm\n + 0.713069186099534 * b8a_norm\n + 0.138970813499201 * b11_norm\n - 0.060771761518025 * b12_norm\n + 0.124263341255473 * viewZen_norm\n + 0.210086140404351 * sunZen_norm\n - 0.183878138700341 * relAzim_norm;\n \n return tansig(sum);\n}\n \nfunction layer2(neuron1, neuron2, neuron3, neuron4, neuron5) {\n var sum =\n + 1.096963107077220\n - 1.500135489728730 * neuron1\n - 0.096283269121503 * neuron2\n - 0.194935930577094 * neuron3\n - 0.352305895755591 * neuron4\n + 0.075107415847473 * neuron5;\n \n return sum;\n}\n \nfunction normalize(unnormalized, min, max) {\n return 2 * (unnormalized - min) / (max - min) - 1;\n}\n\nfunction denormalize(normalized, min, max) {\n return 0.5 * (normalized + 1) * (max - min) + min;\n}\n \nfunction tansig(input) {\n return 2 / (1 + Math.exp(-2 * input)) - 1; \n}\n \nfunction setup() {\n return {\n input: [{\n bands: [\n \"B03\",\n \"B04\",\n \"B05\",\n \"B06\",\n \"B07\",\n \"B8A\",\n \"B11\",\n \"B12\",\n \"viewZenithMean\",\n \"viewAzimuthMean\",\n \"sunZenithAngles\",\n \"sunAzimuthAngles\"\n ],\n units: [\"REFLECTANCE\", \"REFLECTANCE\", \"REFLECTANCE\", \"REFLECTANCE\", \"REFLECTANCE\", \"REFLECTANCE\", \"REFLECTANCE\", \"REFLECTANCE\", \"DEGREES\", \"DEGREES\", \"DEGREES\", \"DEGREES\"]\n }],\n output: [\n {\n id: \"default\",\n sampleType: \"FLOAT32\",\n bands: 1\n }\n ]\n }\n}\n\nfunction evaluatePixel(sample, scene, metadata, customData, outputMetadata) {\n const result = evaluatePixelOrig([sample], [scene], metadata, customData, outputMetadata);\n return result[Object.keys(result)[0]];\n}",
9
+ "input": {
10
+ "bounds": {
11
+ "bbox": [
12
+ 32.670079,
13
+ 15.562688,
14
+ 32.6938,
15
+ 15.576819
16
+ ],
17
+ "properties": {
18
+ "crs": "http://www.opengis.net/def/crs/EPSG/0/4326"
19
+ }
20
+ },
21
+ "data": [
22
+ {
23
+ "dataFilter": {
24
+ "timeRange": {
25
+ "from": "2024-04-26T00:00:00Z",
26
+ "to": "2024-04-26T23:59:59Z"
27
+ }
28
+ },
29
+ "type": "sentinel-2-l1c"
30
+ }
31
+ ]
32
+ },
33
+ "output": {
34
+ "height": 156,
35
+ "responses": [
36
+ {
37
+ "format": {
38
+ "type": "image/tiff"
39
+ },
40
+ "identifier": "default"
41
+ }
42
+ ],
43
+ "width": 255
44
+ }
45
+ },
46
+ "timestamp": "2024-04-28T15:06:56.011114",
47
+ "url": "https://services.sentinel-hub.com/api/v1/process"
48
+ },
49
+ "response": {
50
+ "elapsed": 1.596947,
51
+ "headers": {
52
+ "Connection": "keep-alive",
53
+ "Content-Type": "image/tiff",
54
+ "Date": "Sun, 28 Apr 2024 13:06:54 GMT",
55
+ "Transfer-Encoding": "chunked",
56
+ "access-control-allow-credentials": "true",
57
+ "access-control-allow-headers": "origin,content-type,accept,accept-crs,authorization,cache-control",
58
+ "access-control-allow-methods": "GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH",
59
+ "access-control-allow-origin": "*",
60
+ "access-control-max-age": "3600",
61
+ "x-processingunits-spent": "1.2139892578125"
62
+ },
63
+ "status_code": 200
64
+ }
65
+ }
asim/raw/NDVI/2024-04-26/field_asim/fefb3597182d3661a8c72662d5311620/response.tiff ADDED
fields_asim.parquet ADDED
Binary file (6.01 kB). View file
 
pag/add_field.py CHANGED
@@ -81,7 +81,7 @@ def display_map_and_drawing_controls(field_map, center_start):
81
  sat_basemap.add_to(field_map)
82
  folium.plugins.Geocoder().add_to(field_map)
83
  folium.LayerControl().add_to(field_map)
84
- output = st_folium(field_map, center=center_start, zoom=zoom_start, key="new", width=800)
85
  active_drawing = output['last_active_drawing']
86
  st.session_state['active_drawing'] = active_drawing
87
  return False
@@ -95,7 +95,7 @@ def display_map_and_drawing_controls(field_map, center_start):
95
  sat_basemap = utils.basemaps['Google Satellite']
96
  sat_basemap.add_to(new_map)
97
  folium.LayerControl().add_to(new_map)
98
- st_folium(new_map, center=edges_center, zoom=zoom_start, key="drawn", width=800)
99
  return True
100
 
101
  def handle_user_actions(active_drawing, current_user, intersects, within_area):
 
81
  sat_basemap.add_to(field_map)
82
  folium.plugins.Geocoder().add_to(field_map)
83
  folium.LayerControl().add_to(field_map)
84
+ output = st_folium(field_map, center=center_start, zoom=zoom_start, key="new", width=900)
85
  active_drawing = output['last_active_drawing']
86
  st.session_state['active_drawing'] = active_drawing
87
  return False
 
95
  sat_basemap = utils.basemaps['Google Satellite']
96
  sat_basemap.add_to(new_map)
97
  folium.LayerControl().add_to(new_map)
98
+ st_folium(new_map, center=edges_center, zoom=zoom_start, key="drawn", width=900)
99
  return True
100
 
101
  def handle_user_actions(active_drawing, current_user, intersects, within_area):
pag/contact_form.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ def main():
3
+ st.header(":mailbox: Get In Touch With Us!")
4
+
5
+
6
+ contact_form = """
7
+ <form action="https://formsubmit.co/[email protected]" method="POST">
8
+ <input type="hidden" name="_captcha" value="false">
9
+ <input type="text" name="name" placeholder="Your name" required>
10
+ <input type="email" name="email" placeholder="Your email" required>
11
+ <textarea name="message" placeholder="Your message here"></textarea>
12
+ <button type="submit">Send</button>
13
+ </form>
14
+ """
15
+
16
+ st.markdown(contact_form, unsafe_allow_html=True)
17
+
18
+ # Use Local CSS File
19
+ def local_css(file_name):
20
+ with open(file_name) as f:
21
+ st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
22
+
23
+
24
+ local_css("style/style.css")
25
+ if __name__ == 'main':
26
+ main()
style/style.css ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Style inputs with type="text", type="email"and textareas */
2
+ input[type=text], input[type=email], textarea {
3
+ width: 100%; /* Full width */
4
+ padding: 12px; /* Some padding */
5
+ border: 1px solid #ccc; /* Gray border */
6
+ border-radius: 4px; /* Rounded borders */
7
+ box-sizing: border-box; /* Make sure that padding and width stays in place */
8
+ margin-top: 6px; /* Add a top margin */
9
+ margin-bottom: 16px; /* Bottom margin */
10
+ resize: vertical /* Allow the user to vertically resize the textarea (not horizontally) */
11
+ }
12
+
13
+ /* Style the submit button with a specific background color etc */
14
+ button[type=submit] {
15
+ background-color: #04AA6D;
16
+ color: white;
17
+ padding: 12px 20px;
18
+ border: none;
19
+ border-radius: 4px;
20
+ cursor: pointer;
21
+ }
22
+
23
+ /* When moving the mouse over the submit button, add a darker green color */
24
+ button[type=submit]:hover {
25
+ background-color: #45a049;
26
+ }