Skip to content
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

*.PIA structure #2

Open
thadk opened this issue May 7, 2020 · 4 comments
Open

*.PIA structure #2

thadk opened this issue May 7, 2020 · 4 comments

Comments

@thadk
Copy link
Member

thadk commented May 7, 2020

anypiab is a command line program like the anypia32 GUI program.

Loading a *.pia file outputs something like
"123-45-0020 06/22/1952 1235.80 2090.10 931.00 62 and 1 month 5 T" but it also appears that it outputs to a file (thanks @AlexMerritt)

One issue we will face is getting the earnings, and other data, into anypia-js

The current interface is using this .pia file format.
http://thadk.net/anypiamac-docs/html/General/structure.html

The alternative is to support the XML format somehow with the oactobjs libraries directly and plug the javascript straight into its state format and skip the .pia format.

@thadk
Copy link
Member Author

thadk commented May 20, 2020

anypiab output on the same pia files corresponds to AnyPIA32 like this on sample25.pia image
per this documentation: https://www.ssa.gov/OACT/anypia/anypiab.html

Make sure to pay attention to the SSA data version you are using.

And anypiab.js:
image

@thadk
Copy link
Member Author

thadk commented May 27, 2020

For the API we may be able to take inspiration from this javascript API wrapper for gdal-js: https://github.com/azavea/loam/blob/develop/src/worker.js and related files, demo here.

gdal is the mega-geospatial library which backs PostGIS: https://github.com/ddohler/gdal-js

@mrpippy
Copy link
Collaborator

mrpippy commented May 28, 2020

Do you know what "level" you want the JS API to expose? Like have WorkerData or PiaData objects exposed at the JS level, or just have those objects called from a C++ function and then expose that single function to JS?

The first way is more flexible, but could be tricky to implement. It looks like a lot of functions throw C++ exceptions, and those probably need to be wrapped to catch the exceptions. Dealing with the old-school C++ memory management used here from JS also might be a chore.
The second way is more limiting, but would be quicker to get started with.

@thadk
Copy link
Member Author

thadk commented May 28, 2020

I tried to lay out my thinking in #7 at this same moment. Thanks for this C++ wisdom though: I don't really want to introduce complicated bugs by interfacing with the existing code in untested ways. It seems like your first idea is like my (2.) and your second idea is most like my (3.)?

I'll talk to Alex for more insight too.

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

No branches or pull requests

2 participants