Skip to content

Commit

Permalink
Modifies Geoserver targets to match production.
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTorgerson committed Dec 18, 2024
1 parent a127505 commit b26a247
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fetch_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def get_poly_3338_bbox(poly_id, crs=3338):
fetch_data(
[
generate_wfs_places_url(
"playground:all_areas_test5", "the_geom", poly_id, "id"
"all_boundaries:all_areas", "the_geom", poly_id, "id"
)
]
)
Expand Down
4 changes: 3 additions & 1 deletion routes/seaice.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def package_seaice_data(seaice_resp):
# and sets the value of the percentage for each month to the returned value or 0.
for i in range(len(seaice_resp)):
di[f"{1850 + floor(i / 12)}-{str((i%12) + 1).zfill(2)}"] = (
seaice_resp[i] if seaice_resp[i] <= 100 else 0
seaice_resp[i]
if (seaice_resp[i] is not None and seaice_resp[i] <= 100)
else 0
)

return di
Expand Down
4 changes: 2 additions & 2 deletions routes/vectordata.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def find_via_gs(lat, lon):

# WFS request to Geoserver for all polygon areas.
nearby_areas = asyncio.run(
fetch_data([generate_wfs_search_url("playground:all_areas_test5", lat, lon)])
fetch_data([generate_wfs_search_url("all_boundaries:all_areas", lat, lon)])
)["features"]

# Create the JSON section for each of the area types.
Expand Down Expand Up @@ -231,7 +231,7 @@ def get_json_for_type(type, recurse=False):
fetch_data(
[
generate_wfs_places_url(
"playground:all_areas_test5", "id,name,type,area_type", type
"all_boundaries:all_areas", "id,name,type,area_type", type
)
]
)
Expand Down
2 changes: 1 addition & 1 deletion validate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def place_name_and_type(place_id):
fetch_data(
[
generate_wfs_places_url(
"playground:all_areas_test5", "name,alt_name,type", place_id, "id"
"all_boundaries:all_areas", "name,alt_name,type", place_id, "id"
)
]
)
Expand Down
6 changes: 1 addition & 5 deletions validate_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,7 @@ def validate_var_id(var_id):

var_id_check = asyncio.run(
fetch_data(
[
generate_wfs_places_url(
"playground:all_areas_test5", "type", var_id, "id"
)
]
[generate_wfs_places_url("all_boundaries:all_areas", "type", var_id, "id")]
)
)

Expand Down

0 comments on commit b26a247

Please sign in to comment.