1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

Map images and data

Discussion in 'Census: Planetside 2' started by cesarramsan, Jul 6, 2013.

  1. cesarramsan

    cesarramsan Guest

    Is there any way I can get the high resolution images of the continents? I am planning on working on an app that has similar functionality to: http://ps2maps.com/waterson/indar?x=163.281&y=140.031&z=4

    I know the images can also be retrieved from the players site but is there a way of getting them via the ps2 namespace of the census API?
     
  2. Jakobud

    Jakobud Guest

    The map images were not pulled from the API.
     
  3. stat30fbliss

    stat30fbliss Guest

    I would like to bump this, as I came here to ask this exact question.

    [url="mailto:pS@Maps.com">PS2Maps.com[/url] is a great example as asked by OP. Are their assets available in the API?

    I am more interested in Player models and weapon images, but any assets would be great.
     
  4. Dedith

    Dedith Guest

    I'd take a guess that either a dev was nice and sent some high res pics or they were extracted from game files. Either way, it'd be nice if those were shared.. (not that leaflet hides em at all, but it's nicer to share)

    Btw, they fixed the FF mouse wheel zoom issue in the newer version, so you don't have to disable that if you run leaflet 0.6. You will be able to see our leaflet work at SOE Live.
     
  5. Jakobud

    Jakobud Guest

    Let me make this easy for you:

    (python)

    Code:
    from struct import unpack,packimport sysimport os def ps2int(num):    intstr=str(num)    if len(intstr)==1:  return "00"+intstr    elif len(intstr)==2: return"0"+intstr    else:                return intstr class entry:    pass root=sys.path[0]+"/"inputfolder=root+"input/"targetfolder=root+"output/" # Extensions to extract, leave empty for everythingextensions = [] inputfolder = "C:/Users/Public/Sony Online Entertainment/Installed Games/PlanetSide 2/Resources/Assets/" ij=0while 1:    partSize=1 #anything non-zero to make a do-while    entrylist=[]    fname=inputfolder+"Assets_"+ps2int(ij)+".pack"    if not os.path.exists(fname): break    f=open(fname,"rb")    print fname    while partSize:        partSize=unpack(">I",f.read(4))[0]        numEntries=unpack(">I",f.read(4))[0]        for i in xrange(numEntries):            ent=entry()            stringlen=unpack(">I",f.read(4))[0]            ent.name=f.read(stringlen)            ent.offset,ent.size,ent.crc32=unpack(">III",f.read(12))            entrylist.append(ent)         end=entrylist[-1].offset+entrylist[-1].size        f.seek(partSize)     for ent in entrylist:        extension = os.path.splitext(ent.name)[1][1:]        if ( extension in extensions or len(extensions) == 0 ):            f.seek(ent.offset)            targetfolder2=targetfolder+extension.lower()+"/"            if not os.path.isdir(targetfolder2): os.makedirs(targetfolder2)            print '.',            f2=open(targetfolder2+ent.name,"wb")            f2.write(f.read(ent.size))            f2.close()    f.close()    print ''    ij+=1
     
  6. cesarramsan

    cesarramsan Guest

    I got an email from the devs and they told me that we are allowed to used the images from the players site. I knew it can be done but I was a bit resilient mainly because I didn't know their policies regarding those resources. The process of getting the images from the players site or even from ps2maps is straight forward as all the images are publicly visible.
     
  7. cesarramsan

    cesarramsan Guest

    You can also grab all the map tiles up to the most high resolution available. It is a good idea to understand how to retrieve the images from the players site because that way you don't have to store the images on your application(either web or installed). This is a quick example of how I did it in bash.

    Code:
    #!/bin/bashfor i in {1..5}do    for j in {0..50}    do        for k in {0..50}        do            echo Downloading amerish"$i"_"$j"_"$k".png            curl -s https://players.planetside2.com/images/map/amerish/"$i"_"$j"_"$k".jpg > amerish"$i"_"$j"_"$k".png            echo Downloading  esamir"$i"_"$j"_"$k".png            curl -s https://players.planetside2.com/images/map/esamir/"$i"_"$j"_"$k".jpg > esamir"$i"_"$j"_"$k".png            echo Downloading indar"$i"_"$j"_"$k".png            curl -s https://players.planetside2.com/images/map/indar/"$i"_"$j"_"$k".jpg > indar"$i"_"$j"_"$k".png                       if [[ ! -s amerish"$i"_"$j"_"$k".png && ! -s esamir"$i"_"$j"_"$k".png && ! -s indar"$i"_"$j"_"$k".png ]]            then                echo amerish"$i"_"$j"_"$k".png empty                echo esamir"$i"_"$j"_"$k".png empty                echo indar"$i"_"$j"_"$k".png empty                break            fi                   done    donedone 
     
  8. Dedith

    Dedith Guest

    Thanks guys!

    Also, while it's fully possible to run a map application (google, leaflet, etc) pulling directly from sony's site, I highly recommend pulling them down and hosting them yourself. The connection to sony's site from the client could be bad, or the sony site could be offline, etc.. too many external variables. Easier to keep things local.
     
  9. This was extremely helpful. Some observations for those seeking to do this, the 5 zoom levels each have (2^1 ... 2^5) tiles, and the whole thing comes out to be about 140MB of JPGs, which will compress down to a 82MB tarball.

    I'm making a mobile app, and hoping it's possible I can glean access to these through shared resource with the PlanetSide 2 Mobile Uplink app.
     
  10. cesarramsan

    cesarramsan Guest

    And does anyone have an idea on how to retrieve information about each server or region? I have not found a way to retrieve server population, or even the population or ownership of each region. http://ps2maps.com/briggs/amerish is still an awesome example of what I am trying to achieve.
     
  11. Jakobud

    Jakobud Guest

    The API does not have any population or continent ownership information in it yet.
     
  12. cesarramsan

    cesarramsan Guest

    But how can <span style="color: #4b4b4b"> http://ps2maps.com be doing it? I looked into players.planetside2.com/ and I could not find a way of retrieving those values from there either. The data must be available through somewhere. There is always they have a server running the game and they can read the data from the RAM(Which is surprisingly not hard as most VOIP programs do this to get positional audio). I will keep researching and I will report if I find something.
     
  13. Jakobud

    Jakobud Guest

    @cesarramsan You may not realize this, but I am the developer of ps2maps.com. ps2maps.com does not have anything on it regarding population values or continent ownership. The only stats I am displaying is regarding territory ownership and resource income, which is all simply calculated based off of who owns what territories. It's all pretty trivial really. I am not pulling any data from RAM or anything crazy like that.
     
  14. Andydude1

    Andydude1 Guest

    explain this and how to fix it please.<img src="https://lh5.googleusercontent.com/-hu8BH6xwAYE/UsXAqa7Kx9I/AAAAAAAAABs/vmvFGLGct_8/w946-h532-no/Planetside+2+map.png" class="bbCodeImage LbImage" alt="" />
    <img src="https://plus.google.com/u/0/photos/yourphotos?pid=5964385116536621010&oid=100602639785860843247" class="bbCodeImage LbImage" alt="[IMG]" /><img src="https://plus.google.com/u/0/photos/yourphotos?pid=5964385116536621010&oid=100602639785860843247" class="bbCodeImage LbImage" alt="[IMG]" />
     

Share This Page