DeniR / Gigapan-Downloader-and-stitcher

Gigapan Downloader and Stitcher with export to Photoshop PSB or TIFF
21 stars 9 forks source link

North Pole of the Moon Download #3

Open jonca44 opened 10 years ago

jonca44 commented 10 years ago

For some reason I am not able to download http://www.gigapan.com/gigapans/0d54f8d3323a60308eb2ff9831edfe4a

C:\Python27\python gigapanDownloader.py 0d54f8d3323a60308eb2ff9831edfe4a 5

Traceback (most recent call last): File "gigapanDownloader.py", line 38, in photo_id = int(sys.argv[1]) ValueError: invalid literal for int() with base 10: '0d54f8d3323a60308eb2ff9831edfe4a'

I know that this is a rather large image and that hexadecimal id this gigapan has is rather strange. Do you happen to have any suggestions?

martinber commented 10 years ago

Sorry for my bad english

The error appears because the program can't handle strings as gigapans IDs, I tried changing the code so now it can handle strings, but the problem is that I can't find the tiles location for that gigapan

To get the tile images of normal gigapans we download the image located at http://www.gigapan.com/get_ge_tile/[ID]/[imageLevel]/[xPos]/[yPos], for example http://www.gigapan.com/get_ge_tile/130095/5/1/2 (you can see the tile going to that page) But when you try to navigate to a moon tile it doesn't work, for example try with http://www.gigapan.com/get_ge_tile/0d54f8d3323a60308eb2ff9831edfe4a/5/1/2

If you can find a way to access the moon gigapan images I can modify the program to download them.

Also I tried converting the hex number to decimal, the number in decimal is 17721163651589650424099959512140480074, but doesnt work Maybe exists an alternative link to the giapan with a decimal ID, but I can't find the gigapan through the site search, also the link is not in the LROC site (http://lroc.sese.asu.edu/images/gigapan) ¿Where did you get that link?

jonca44 commented 10 years ago

Thank you so much for looking into that. I know, this gigapan does not follow regular scheme. The link I provided was extracted from the LORC site that you listed by inspecting gigapan object embedded in this page.

After downloading http://www.gigapan.com/gigapans/0d54f8d3323a60308eb2ff9831edfe4a.kml I noticed that KML lists a different ID: 148577. I hard coded ID into the script and appended auth_key equal to the original gigapan ID and this gets me the tiles. For example the url line of the script looks like this:

url = "%s/get_ge_tile/148577/%d/%d/%d?auth_key=0d54f8d3323a60308eb2ff9831edfe4a"%(base,level,j,i)

I hope that this may help in modifying this script or help someone else down the road.

Once again thank you so much for all your help in maintaining this script!!!!! Have a wonderful weekend!

martinber commented 10 years ago

Thank you! Now I'm doing a complete rewrite of the code, just for fun and because it's a good way to learn Python I'll upload the code soon

martinber commented 10 years ago

By the way days ago I finished the scripts, now works with all panoramas. Here you have the fork: https://github.com/martinber/Gigapan-Downloader

jonca44 commented 10 years ago

Thank you! This is a wonderful news! Thank you for working on this!

abayunugraha commented 9 years ago

hello , I'm newby in github, can anybody help me to download gigapan images ?

martinber commented 9 years ago

This isn't the correct place to ask but I can't find a better way to answer. Here you have the instructions https://github.com/martinber/Gigapan-Downloader#how-to-run, if you need help with a particular point just ask

edwardlego commented 9 years ago

hi, i'm a total python noob, i installed it, andthe other program, i even managed to add python to the system path, but when i run a command with python i keep getting invalid syntax. any examples of your code i could find wouldn't work eighter. i think it has something to do with the location the script is saved, currently its at python27/tools/scripts

can any1 help?

martinber commented 9 years ago

Can you post the error you are getting? The location of gigapanDownloader.py doesnt matters, you can save it to the Desktop if you want. I dont know exactly how to run in windows, I think that you need to open the commandline/terminal, do "cd location\of\script", then if you "dir" you can see the files currently in that directory. Finally do "python gigapanDownloader.py " replacing location\of\script, and . Everything without quotes and without <>

martinber commented 9 years ago

Sorry, I made a mistake in the last part. Finally do "python gigapanDownloader.py " replacing and . Everything without quotes and without <>

martinber commented 9 years ago

Lol. The markup is hiding words between <> . Follow the instructions in the readme