locationtech / rasterframes

Geospatial Raster support for Spark DataFrames
http://rasterframes.io
Apache License 2.0
240 stars 46 forks source link

How to read raster data from arbitrary filename patterns parameters passed to “Unsupervised Machine Learning”? #535

Closed JenniferYingyiWu2020 closed 3 years ago

JenniferYingyiWu2020 commented 3 years ago

Hi, I have read codes for “Unsupervised Machine Learning”, and the codes to read raster data are followings: 1 Now, I package the “Unsupervised Machine Learning” as Rest API, which is the Http Post request with several parameters such as “/{path}/{file_name}/{band}”. 2 My issue is that if I need to get filename from Parameters which can be set as arbitrary filenames and the band number can be any (which means the filename cannot obey the pattern like "L8-B{}-Elkton-VA.tiff" and will have various filename patterns in the image dataset), then how can I implement the data reading function and write the codes? Could you pls give me some suggestions? Thanks

vpipkt commented 3 years ago

@JenniferYingyiWu2020 In my opinion, this issue is beyond the scope of bugs, feature requests, or other functionality specific to RasterFrames project itself. I am going to close the issue.

Just as a quick thought, your REST app could provide another endpoint giving valid values that can be used in the parameters to this POST unsupervisedML endpoint. And in the POST unsupervisedML endpoint you will need to check for invalid values and respond with a 400 error to the caller. Though that's all well outside the RF project, it looks exciting and we're wishing you success in this endeavor!