-
Notifications
You must be signed in to change notification settings - Fork 5
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
Port the GVRS API to Rust #28
Comments
I have added a set of sample files in the Gridfour source distribution. These files are designed to exercise different features of the GVRS file format. They should provide good test cases for developers who are implementing a GVRS API in any language. You may find them in the folder gridfour-master/core/src/test/resources/org/gridfour/gvrs/SampleFiles. A README.txt file is included to provide descriptions of the various test files.
|
Hey @gwlucastrig 👋 ... figured I'd give this a shot ... https://github.com/anweiss/gridfour-gvrs-rs ... very much a WIP. Will use the sample files you provided for the integration tests once implemented. |
Thanks for letting me know about your project. I took a look at your early
code... Rust is much different than anything I'm used to seeing. It will
be very interesting to see what you come up with.
I noticed a few places where you were performing masking following the
examples in the Java code. Java doesn't have an unsigned byte type (my
least favorite aspect of the language). So when ever I wanted to treat
8-bit values as positive integer values, I had to mask them with 0xff. Not
sure if you'll have to do that in Rust, but I thought I'd let you know.
My bit-reading routines use a buffer consisting of long integers. I
experimented a bit with other buffer types (such as a simple byte buffer),
but the long integer was most efficient. On the other hand, that too might
be a quirk of Java.
Also, I think it's a good idea to start with the small sample files. But
later on, when you want something more ambitious, I've got a sample of the
elevation/bathymetry data available for download at
https://github.com/gwlucastrig/gridfour/releases/download/v1.0.4/ETOP_v1.0.4.gvrs
My gut feeling has always been that the most critical component in the Java
API is the tile-cache.
If you have any questions, feel free to post them here. I'll do my best to
answer them in a prompt and useful manner.
Gary
…On Mon, Nov 28, 2022 at 2:13 PM anweiss ***@***.***> wrote:
Hey @gwlucastrig <https://github.com/gwlucastrig> 👋 ... figured I'd give
this a shot ... https://github.com/anweiss/gridfour-gvrs-rs ... very much
a WIP. Will use the sample files you provided for the integration tests
once implemented.
—
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEWJDYMIDLYOIM3RMMPDRLLWKT74DANCNFSM6AAAAAARPTBH2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Also, there's a lot of code related to collecting statistics and byte counts in the GVRS API. While that was (is) useful when experimenting with algorithms or developing the file format, its not necessarily a core requirement for a port. So don't feel obligated to do the extra coding unless it looks like something that would be useful for your own efforts. |
I made added a new version of this issue to the GVRS C project page as Issue #5. Now that both this Java and a new C API exist, it should be easier to conduct a port to Rust. To give potential developers a sense of sense of the general approach and level-of-effort for a port to Rust, I posted a report describing the tasks that were performed as part of the Java to C port at https://gwlucastrig.github.io/GridfourDocs/notes/PortingTheGvrsAPI.pdf. |
I am looking for a developer who would be interested in porting the GVRS API to the Rust programming language.
The GVRS API offers four capabilities that may be useful for the Rust community:
Now, before I go on, I have to qualify claims 3 and 4 by pointing out that there are many raster data products out there and virtually all of them have wider user bases than GVRS (NetCDF and HDF5, for example). In terms of sheer availability of data, those other products have distinct advantages over GVRS. So I don’t want to oversell my project.
On the other hand, I wrote GVRS with the idea that the code would be ported to other languages, and I tried to organize it in such a way that it a port could be executed quickly and well. If you want to port GVRS to Rust, my attitude is that it would be your project and I would try not to interfere in the design or direction of the porting effort. Of course, I am highly motivated to have someone succeed in porting GVRS to Rust. So I would be available to answer questions, explain concepts, and to help smooth over any code incompatibilities that might arise between the Rust and Java implementations.
To learn more about GVRS, visit our Project Wiki or read our Frequently Asked Questions page.
I recently posted a preliminary draft of the GVRS file format at https://gwlucastrig.github.io/GridfourDocs/notes/GvrsFileFormat_1_04.pdf
The text was updated successfully, but these errors were encountered: