Click here to Skip to main content
15,915,783 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
This should be relatively trivial, and an opportunity to do some science.

I have a windows forms project that displays & detects point sources (stars) in an image. The point source locations can be in double arrays, or written to text file, etc., as needed.

These x/y locations need to be sent to astrometry.net for World Coordinate System fitting. They specify their API JSON interface rules here:

Nova.astrometry.net: API — Astrometry.net master documentation[^]

but this is not something I'm familiar with coding. Seems like I should just be able to use webservices. There is basically just a request or two and then waiting for output.

The idea is that I have everything required, I just need to know how to send the request & data and read the response, using webservices. This would be run inside a button press on the form. I would need to monitor the output from the server for a minute or two as it solves the solution, and so I would put that part in a timer, run in a backgroundworker so that it was cancellable, etc. I know how to do all that windows-formy VS c++ stuff...just not familiar with using webservices to send JSON requests and read the output.

Cheers.

What I have tried:

Nothing yet. I can code windows Forms and timers and background workers and data analysis etc. in my sleep. Just not familiar with webservices. The API instructions they provide should make it trivial for someone who knows what they're doing with JSON and webservices.
Posted
Updated 21-Apr-17 23:15pm
Comments
Richard MacCutchan 17-Apr-17 9:10am    
"The API instructions they provide should make it trivial for someone who knows what they're doing with JSON and webservices."

True, but that does not mean that someone is going to study this API and then write your code for you.

1 solution

If you are comfortable in C++ on Windows - look at combining a open source JSON parser with the WinHttp API that is a part of Windows.

About WinHTTP (Windows)[^]

Lots of choices for a JSON parser:

GitHub - miloyip/nativejson-benchmark: C/C++ JSON parser/generator benchmark[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900