-
Notifications
You must be signed in to change notification settings - Fork 4
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
1961956
commit 0ec7209
Showing
2 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,20 +1,22 @@ | ||
use geo::Point; | ||
// use serde_json::to_string_pretty; | ||
use serde_json; | ||
use serde_json::{to_string_pretty}; | ||
use zonebuilder::clockboard; | ||
use zonebuilder::Params; | ||
|
||
fn main() { | ||
let polygon_list = clockboard(Point::new(0.0, 0.0), Params::default()); | ||
let gj = clockboard(Point::new(0.0, 0.0), Params::default()); | ||
|
||
// Attempt to print pretty json - not outputting valid json currently | ||
// See https://github.com/georust/geojson/issues/161 for details | ||
// let geojson_list = geojson::Value::from(&polygon_list[0]); | ||
// let result = serde_json::to_string_pretty(&geojson_list); | ||
// println!("{}", result.unwrap()); | ||
|
||
// Brute force approach: for loop | ||
for polygon in polygon_list { | ||
let result = geojson::Value::from(&polygon); | ||
println!("{}", result); | ||
} | ||
let gjstring = to_string_pretty(&gj); | ||
|
||
// Which we can print / dump / etc: | ||
|
||
println!("{}", &gjstring); | ||
|
||
} |