Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Spatial data #37

Open
hygrace opened this issue Nov 18, 2020 · 6 comments
Open

Spatial data #37

hygrace opened this issue Nov 18, 2020 · 6 comments

Comments

@hygrace
Copy link

hygrace commented Nov 18, 2020

Hi there,

As I know, there is only lat lon available for the properties. As such, I'm writing to enquire if there is any other spatial data available from the API. May I know if GIS data (boundary of the flood) is available in the API or not?

Thank you in advance!

@Lyetenth
Copy link
Contributor

Hi @hygrace,

Are you looking for the geometries for the hazard layers/historic flood layers?
ie: The bounding box and polygon of the layer

And also are you looking to get the layers through the commandline or the Python script?

@hygrace
Copy link
Author

hygrace commented Nov 18, 2020

Correct.

@Lyetenth
Copy link
Contributor

Hey @hygrace ,

Would something like what's on #31 be useful for you to get current and future flood layers?

@hygrace
Copy link
Author

hygrace commented Nov 27, 2020

Thank you Kelvin. This is what I looking for and I have below follow-up questions:

  1. I successfully opened that in QGIS but I wonder if there is a way that I can directly open the tiles in Arcgis/arcmap?

  2. I tried to use the example code for method 1 but I got the error saying there was no attribute 'tile'
    image

  3. For method 1, may I know where I can check the Mercator coordinates tuples for a certain area e.g. Harris county?

@fitnr
Copy link
Collaborator

fitnr commented Nov 30, 2020

To open data in ArcGIS, follow the instructions here. Those instructions are for ArcGIS 10.8, I don't know if this feature is available in earlier versions.
Use this URL template:

https://api.firststreet.org/v1/tile/probability/depth/2020/5/{level}/{col}/{row}.png?key=<replace with your api key>

@Lyetenth
Copy link
Contributor

Lyetenth commented Nov 30, 2020

@hygrace,

Re: question 2, what's your current version of fsf-api-access-python when you run pip list on it?

Can you also try:
image = fs.tile.get_probability_depth(year=2050, return_period=500, search_items=[(14, 2635, 5694)], image=False)?

Re: question 3, you can use this map (https://www.maptiler.com/google-maps-coordinates-tile-bounds-projection/) to find the coordinates for a particular location. Ex: Harris County, Texas, at zoom level 9 is (120, 211), so the input would be
image = fs.tile.get_probability_depth(year=2050, return_period=500, search_items=[(9, 120, 211)], image=False)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants