-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50c6290
commit a3e93af
Showing
4 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use sqlx::{PgPool, Row}; | ||
#[tracing::instrument(skip(pool))] | ||
pub async fn list_indoor_inside_of(pool:&PgPool) ->anyhow::Result<Vec<i64>>{ | ||
let geom: geo_types::Geometry<f64> = geo::Point::new(10.0, 20.0).into(); | ||
let filtered_groups = sqlx::query("SELECT group_id from indoor_features where ST_Contains(convex_hull::geometry, $1::geometry)") | ||
.bind(geozero::wkb::Encode(geom)) | ||
.fetch_all(pool) | ||
.await?; | ||
let mut filtered_group_ids =Vec::<i64>::new(); | ||
for group in filtered_groups { | ||
let group_id = group.get_unchecked(0); | ||
filtered_group_ids.push(group_id); | ||
} | ||
|
||
Ok(filtered_group_ids) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mod fetch_tile; | ||
pub(crate) mod overlay_map; | ||
pub(crate) mod overlay_text; | ||
mod indoor; |