Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • stata stopped working when using java api and geocoding related commands

    Hello All,

    I have been using ArcGIS for geocoding in the past unitil I realized there's something available for stata. I'm trying to geocode some addresses and was using the jsonio package. It didn't work very well-stopped working when the address cannot be found. So I split all my addresses into files with only one address and try to geocode it using "ggeocode" command. Not sure if it is because of the quota of Google geocoding API?

    Code:
    local   maxid1  =   468
    local    maxid2    =    1176
    
    forvalues x=1/2{
    clear all
    display `x'
    forvalues i=1/`maxid`x'' {
    use temp\geocode`x'.dta, clear
    keep if id==`i'
    ggeocode address, ret(viewport address bbox)
    save temp\geocode`x'_`i'.dta, replace
    }
    }
    It worked for the first several files but later on stata refuses to take any "ggeocode" command. My "query java" result also turned into this:


    Code:
    . query java
    -----------------------------------------------------------------------------------
        Java system information
          Java initialized     no
        Advanced Java settings
          set java_heapinit    63999m
          set java_heapmax     64000m
          set java_vmpath      C:\Program Files\Java\jre1.8.0_131\bin\server\jvm.dll
    I'm very new to java. So these results get me very confused. Anyone has the similar experience? Very much appreciated!
    Last edited by Yichen Xu; 06 Jun 2017, 20:26.

  • #2
    Yichen Xu have you submitted an issue in the GitHub repository? Google's geocoding API has a request limit of 2,500 records per day for their free tier. You could also use jsonio rv to loop over the records in your file and use other geocoding services. I definitely wouldn't set the initialization value for the memory as high as you have it. I can try looking into things if I can replicate the issue you ran into.

    Comment


    • #3
      Thank you! wbuchanan I will submitted it to GitHub. Now my stata crashes for several commands (not just ggeocode). I'll try to figure out if there's anything wrong with my computer.

      Comment

      Working...
      X