-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible web app, vector rendering, and different radar formats #8
Comments
Hey Andrew, glad you found this library/toolset helpful!
Looks fine. If you just want the binaries locally, and you're using go >= 1.17 you can use $ go install github.com/bwiggs/go-nexrad/cmd/nexrad-render@latest
I up'd all the deps this evening. Pull latest and the need to do that
Spent some time looking into this tonight. It seem that some elevation levels do not contain VEL data. Ex: see this google discussion. That answers the
I added a new utility to the repo to inspect these ar2 files. Checkout
Neat idea! Might be nice to be able to tell it what kind of file to produce via command line argument. Any interest in working on a PR for this?
WASM would be neat andcould return some sort of BLOB with either the encoded image file or the radar data in something easy to use with js/canvas for custom rendering. I'm pretty limited on time to work on that but it sounds feasible. Interested in hacking on a PR? Would be happy to review/help. |
Thanks for getting back so quickly! I also wonder how different Level 3 files are from Level 2, in their difficulty to write a parser / plotter for? I personally use Hydrometer Classification and Vertically Integrated Liquid a lot, which are both level 3 products. If they're not that different, that would be something to consider, maybe something even I could do, with my near-nothing knowledge of Go 😅 I feel like one difficult aspect would be getting the color schemes for each product. |
I also realized that all Level 2 files before June 1, 2016 had a different format - they were gzipped with the |
It's different, I started on that a couple years ago and put it down. It's in a branch called
Interesting, I hadn't loaded up anything older than 2017. Created #12 |
Fixed #12 |
I've been using this project for a bit and it is very useful. However, there are some changes that I propose and would love to hear feedback on.
First, these are the commands I use to enter the project:
Then, there is an issue with velocity rendering, though reflectivity works fine. I fix it by doing:
in
cmd/nexrad-render/main.go
, around line181
, replacewith
this is the commit.
I can then do
which works awesome. The first change I propose is wondering what the issue is with the velocity rendering, and why I have to change the code as detailed above?
My second proposal is providing an option, perhaps another command flag, to render the output as a vector image, e.g.
svg
. You already use thedraw2d
library withdraw2dimg.SaveToPngFile()
, so i figured that using vector graphics would make the time loading the image on the user’s end much quicker. I figured you could dodraw2dimg.SaveToSvgFile()
to accomplish this.My third proposal is porting this project to a web app. This would mean that one could upload a radar file, specify command flags (e.g.
-s 2048
and-p vel
), and then it will give you apng
image to download, exactly how it runs on the command line.My first thought was WebAssembly, but I am unsure how to interact with a CLI application such as this one using that framework. I found several guides online, but they are for simple applications where the program just takes user input and then logs the result to the console.
I then stumbled upon this where someone managed to do something very similar with PDF processing. The full repo for that article is found here.
I was wondering if it would be possible to make a rudimentary web application out of your program, using either these things that I have listed, or another way you know of. CSS / styling wouldn't be necessary as this would just be, as I said, rudimentary.
I love your program and will continue to use it, but in the meantime I hope you have time to read and consider these suggestions.
Cheers!
Andrew
The text was updated successfully, but these errors were encountered: