StreetView Grabber (Updated v1.6)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
dige
Addict
Addict
Posts: 1247
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: StreetView Grabber (Updated v1.6)

Post by dige »

Hi Olby,

I've tried to use a cylinder instead of a sphere for panorama images without sky and floor.

Code: Select all

 CreateCylinder(0, -2, 1, 32, 32, 1)
 MoveCamera(0, 0, 0, 0.25, #PB_Absolute | #PB_Local)
 CameraLookAt(0, 0, 0, 0)
But I did no see anything. Only when I move the camera outside...

Do you have an idea?

Ciao dige
"Daddy, I'll run faster, then it is not so far..."
Olby
Enthusiast
Enthusiast
Posts: 461
Joined: Mon Jan 12, 2009 10:33 am
Contact:

Re: StreetView Grabber (Updated v1.6)

Post by Olby »

dige wrote:Hi Olby,

I've tried to use a cylinder instead of a sphere for panorama images without sky and floor.

Code: Select all

 CreateCylinder(0, -2, 1, 32, 32, 1)
 MoveCamera(0, 0, 0, 0.25, #PB_Absolute | #PB_Local)
 CameraLookAt(0, 0, 0, 0)
But I did no see anything. Only when I move the camera outside...

Do you have an idea?

Ciao dige
You need to use negative values for both height and radius:

Code: Select all

CreateCylinder(0, -1, -2, 32, 32, 0)
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
dige
Addict
Addict
Posts: 1247
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: StreetView Grabber (Updated v1.6)

Post by dige »

yes, thats it - now it works :-) thank you Olby!

I've also included a Snapshot function:

Code: Select all

            ElseIf KeyboardPushed(#PB_Key_F12)
              If CreateRenderTexture(1, CameraID(0), w, h)
                UpdateRenderTexture(1)
                
;               savefile = GetHomeDirectory() 
;               savefile + "Pictures\"
;               savefile + FormatDate("%YY%MM%DD_%HH%II%SS", Date()) + "_Snap.JPG"
                
                savefile = SaveFileRequester("Snapshot speichern", FormatDate("%YY%MM%DD_%HH%II%SS", Date()) + "_Snap.JPG", "Bilddatei (*.jpg)|*.jpg;.png;.tga|Alle Dateien (*.*)|*.*", 0)
                
                If savefile <> ""
                  SaveRenderTexture(1, savefile)
                EndIf
                
                If IsTexture(1)
                  FreeTexture(1)
                EndIf
                
              EndIf
              
            EndIf
"Daddy, I'll run faster, then it is not so far..."
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: StreetView Grabber (Updated v1.6)

Post by Mesa »

I've had to change the camera to

Code: Select all

If CreateRenderTexture(1, CameraID(0), w, h, #PB_Texture_CameraViewPort)
to avoid a crash

M.
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: StreetView Grabber (Updated v1.6)

Post by Mesa »

I would like to add the letter "N" for North etc... but my code crash:

I've replaced

Code: Select all

CreateEntity(0,MeshID(0),MaterialID(0))
by

Code: Select all

CreateEntity(0,MeshID(0),MaterialID(0))

      N=CreateText3D(10, "North")
      Text3DColor(10, RGBA(255, 0, 0, 255))                                                                 
      AttachEntityObject(0, "", Text3DID(10),0,0,1,0,0,0)
An idea ?

M.
dige
Addict
Addict
Posts: 1247
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: StreetView Grabber (Updated v1.6)

Post by dige »

@Mesa: Thank you very much!!
Mesa wrote:I've had to change the camera to

Code: Select all

If CreateRenderTexture(1, CameraID(0), w, h, #PB_Texture_CameraViewPort)
to avoid a crash

M.
"Daddy, I'll run faster, then it is not so far..."
koyglreg
New User
New User
Posts: 2
Joined: Sat Jan 28, 2017 9:24 pm

Re: StreetView Grabber (Updated v1.6)

Post by koyglreg »

Hey Olby! I really like your StreetView Grabber program! I want to suggest a simple feature. I'd like the option to put lat/long data in the output image name.

Instead of: q5N_oPn2gAS1ohKOVeGeIA_welded.png
We could get something like this: 35.9103923,-116.5805978_q5N_oPn2gAS1ohKOVeGeIA_welded.png

Then I could easily keep track of where the panoramas are located geographically.

Again, great work! :)
puresat
New User
New User
Posts: 4
Joined: Sun Aug 24, 2014 8:04 am

Re: StreetView Grabber (Updated v1.6)

Post by puresat »

Hello!) Happy Groundhog Day! ))
https://www.google.com/maps/@42.3152098 ... 6?hl=en-EN
--
The new version is expected? :wink:
koyglreg
New User
New User
Posts: 2
Joined: Sat Jan 28, 2017 9:24 pm

Re: StreetView Grabber (Updated v1.6)

Post by koyglreg »

I figured out how to get any Street View panorama ID with just latitude and longitude coordinates. The following link will return a JSON file containing the panoid: https://cbks0.google.com/cbk?cb_client= ... &radius=50

Except it returns an empty JSON anytime the coordinates are a non-road, even though it officially has Street View, such as the Israel trail: https://cbks0.google.com/cbk?cb_client= ... &radius=50

Why won't it work for all Street View panoramas? What am I missing? Somebody help me? :?

P.S.: I can download any panorama by panoid in Olby's program (including non-roads), but I want to make a script that will grab panoids according to coordinates in a GPX file.
Post Reply