World Map of Roanoke & Jamestown

Forum for game modifications and custom clients.

Re: World Map of Roanoke & Jamestown

Postby KiwiBird » Wed Nov 28, 2012 3:59 am

This is what I have for my area, havent updated the maps for today, but when I do the Master Backup Folder will list them (Grand master downloads all the master files at once).

When I update - starting today - The backups will contain only the new images, and a way to link those map pieces to something.

https://www.dropbox.com/sh/rn6crtvagf2a3a8/FbU6XtKFsT
KiwiBird
 
Posts: 10
Joined: Tue Nov 13, 2012 10:30 am

Re: World Map of Roanoke & Jamestown

Postby MvGulik » Wed Nov 28, 2012 5:05 am

imrielle wrote:
MvGulik wrote:To create and/or process really big images your better of with something like VIPS

I'm not familiar with this program - will it "stitch" tiles together?

Yes, it can be used to stitch tiles into a single image.
VIPS is very similar to ImageMagick. (with nip2 being a GUI front-end to VIPS)

That's what I'm basically using the Salem Map Tool for, stitching them together to get one image file to run through my Photoshop zoom-tile creation script (to be used with the Google Map API). Unstitched tiles are useless for that, sadly. =/

For a GUI image editor, yes.
User avatar
MvGulik
 
Posts: 159
Joined: Sat Aug 11, 2012 3:15 pm

Re: World Map of Roanoke & Jamestown

Postby imrielle » Wed Nov 28, 2012 5:28 am

MvGulik wrote:Yes, it can be used to stitch tiles into a single image.

I'll definitely give it a try, then. :)
Image
User avatar
imrielle
Customer
 
Posts: 491
Joined: Sat Nov 10, 2012 5:57 pm
Location: Ohio, USA

Re: World Map of Roanoke & Jamestown

Postby Galthon » Sat Dec 01, 2012 9:52 pm

Let me toss you what I use:

tilezoomcreator.py: Python and requires PIL (Python Imaging Library)
Code: Select all
# A tool for generating zoomlevel tiles from output from
# Haven and Hearth Client Mappers such as Enders and Gilbertus.
# (c) 2011 demangler@gmail.com
#
# License: This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at your
# option) any later version. This program is distributed in the hope that it
# will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
#

from Tkinter import *
import tkFileDialog
import tkMessageBox
import tkSimpleDialog
import sys
import os
import glob,hashlib
from PIL import Image


# size of map from 0, so will be total -mapsize+mapsize,-mapsize+mapsize

mapsize=128 # this needs to be a multiple of 4
walker=0
xwidth=1
ywidth=1
cwd = os.getcwd()
input_tile_dir=os.path.join(cwd,"input-tiles")
output_tile_dir=os.path.join(cwd,"")
newimagename="default"
smallblank=Image.new("RGBA", (100,100))
largeblank=Image.new("RGBA", (400,400))
zoomstart=9
zoomend=4
factors="8888884211"


def zoomit(x,y,z):


    zoominput_tile_dir=os.path.join(output_tile_dir,str(z+1))
   
    print "----------"
    quadrants =0

    try:
        blankimage=Image.new("RGBA", (200,200))
        print "Created 200x200 blank image"
    except:
        pass       
        #top-left image
    filename="tile_"+str(x)+"_"+str(y)+".png"
    try:                                                                                       
        tl = Image.open(os.path.join(zoominput_tile_dir,filename))
        print "Opened tile:",filename, "for tl"
        quadrants+=1
    except:                                                                                   
        print "No tile for: ",filename, " - Using Blank"

        tl=smallblank
    blankimage.paste(tl, (0,0))

        #top-right image
    filename="tile_"+str(x+1)+"_"+str(y)+".png"
    try:                                                                                       
        tr = Image.open(os.path.join(zoominput_tile_dir,filename))
        print "Opened tile:",filename, "for tr"
        quadrants+=1
    except:                                                                                   
        print "No tile for: ",filename, " - Using Blank"       

        tr=smallblank
    blankimage.paste(tr, (100,0))
       
        #bot-left image
    filename="tile_"+str(x)+"_"+str(y+1)+".png"
    try:                                                                                       
        bl = Image.open(os.path.join(zoominput_tile_dir,filename))
        print "Opened tile:",filename, "for bl"
        quadrants+=1
    except:                                                                                   
        print "No tile for: ",filename, " - Using Blank"       
 
        bl=smallblank
    blankimage.paste(bl, (0,100))

        #bot-right image
    filename="tile_"+str(x+1)+"_"+str(y+1)+".png"
    try:                                                                                       
        br = Image.open(os.path.join(zoominput_tile_dir,filename))
        print "Opened tile:",filename, "for br"
        quadrants+=1
    except:                                                                                   
        print "No tile for: ",filename, " - Using Blank"       
                                                                 
        br=smallblank
    blankimage.paste(br, (100,100))

    blankimage.thumbnail((100,100))

    if quadrants > 0:
        blankimage.save(os.path.join(output_zoom_dir,"tile_"+str(x/2)+"_"+str(y/2)+".png"))
    else:
        print "Tile is empty. Not creating Zoomed tiles."


   



########################

if __name__ == '__main__':

    z=8
    while z>zoomend-1:
        output_zoom_dir=os.path.join(output_tile_dir,str(z))
        if not os.path.exists(output_zoom_dir):
            os.makedirs(output_zoom_dir)

        factor=int(factors[z])
        worksize=(mapsize/factor)+1

        print "factor for ",z, "is:", factor
        walkerx=0-worksize
        walkery=0-worksize   
        while walkerx<worksize:
            zoomit(walkerx+1,walkery+1,z)
           
            walkery=0-worksize
            while walkery<worksize:
                zoomit(walkerx+1,walkery+1,z)
                walkery+=2
            walkerx+=2
             
        z-=1

map.html
Code: Select all
<!DOCTYPE html>

<html>

<head>

<title> Map</title>

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

<style type="text/css">

   html { height: 100% }

   body { height: 100%; margin: 0px; padding: 0px }

   #map_canvas { height: 100% }

</style>

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

<script type="text/javascript">



var currentSession = 0;



function myProjection() {

   var MAP_RANGE = 51200;

   this.worldOrigin_ = new google.maps.Point(0, 0);

   this.pixelsPerLonDegree_ = MAP_RANGE / 360;

   this.pixelsPerLatDegree_ = MAP_RANGE / 180;

};

 

myProjection.prototype.fromLatLngToPoint = function(latLng) {

   var origin = this.worldOrigin_;

   var x = origin.x + latLng.lng() * this.pixelsPerLonDegree_;

   var y = origin.y + latLng.lat() * this.pixelsPerLatDegree_;

   return new google.maps.Point(x, y);

};

 

myProjection.prototype.fromPointToLatLng = function(point) {

   var origin = this.worldOrigin_;

   var lng = (point.x - origin.x) / this.pixelsPerLonDegree_;

   var lat = (point.y - origin.y) / this.pixelsPerLatDegree_;

   return new google.maps.LatLng(lat, lng);

};



function CoordMapType(tileSize) {

   this.tileSize = tileSize;

}



CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) {

   var div = ownerDocument.createElement('DIV');
   var factor = Math.pow(2,(9-zoom));

   div.innerHTML = "("+coord.x*factor+", "+coord.y*factor+")";

   div.style.width = this.tileSize.width + 'px';

   div.style.height = this.tileSize.height + 'px';

   div.style.fontSize = '16px';

   div.style.borderStyle = 'solid';

   div.style.borderWidth = '1px';

   div.style.borderColor = 'yellow';

   div.style.color = 'yellow';

   return div;

};



function HomeControl(controlDiv, map) {

   controlDiv.style.padding = '5px';

   var controlUI = document.createElement('DIV');

   controlUI.style.backgroundColor = 'white';

   controlUI.style.borderStyle = 'solid';

   controlUI.style.borderWidth = '2px';

   controlUI.style.cursor = 'pointer';

   controlUI.style.textAlign = 'center';

   controlUI.title = 'Click to go to start point';

   controlDiv.appendChild(controlUI);

   var controlText = document.createElement('DIV');

   controlText.style.fontFamily = 'Arial,sans-serif';

   controlText.style.fontSize = '12px';

   controlText.style.paddingLeft = '4px';

   controlText.style.paddingRight = '4px';

   controlText.innerHTML = 'Go to start point';

   controlUI.appendChild(controlText);

   google.maps.event.addDomListener(controlUI, 'click', function() {

      map.setCenter(new google.maps.LatLng(0, 0))

   });

}



function BobstartControl(controlDiv, map) {

   controlDiv.style.padding = '5px';

   var controlUI = document.createElement('DIV');

   controlUI.style.backgroundColor = 'white';

   controlUI.style.borderStyle = 'solid';

   controlUI.style.borderWidth = '2px';

   controlUI.style.cursor = 'pointer';

   controlUI.style.textAlign = 'center';

   controlUI.title = 'Click to go to Bobs start point';

   controlDiv.appendChild(controlUI);

   var controlText = document.createElement('DIV');

   controlText.style.fontFamily = 'Arial,sans-serif';

   controlText.style.fontSize = '12px';

   controlText.style.paddingLeft = '4px';

   controlText.style.paddingRight = '4px';

   controlText.innerHTML = 'Go to Bobs start point';

   controlUI.appendChild(controlText);

   google.maps.event.addDomListener(controlUI, 'click', function() {

      map.setCenter(new google.maps.LatLng(0, -1))

   });

}



function GridControl(controlDiv, map) {

   controlDiv.style.padding = '5px';

   var controlUI = document.createElement('DIV');

   controlUI.style.backgroundColor = 'white';

   controlUI.style.borderStyle = 'solid';

   controlUI.style.borderWidth = '2px';

   controlUI.style.cursor = 'pointer';

   controlUI.style.textAlign = 'center';

   controlUI.title = 'Click to show or hide grid';

   controlDiv.appendChild(controlUI);

   var controlText = document.createElement('DIV');

   controlText.style.fontFamily = 'Arial,sans-serif';

   controlText.style.fontSize = '12px';

   controlText.style.paddingLeft = '4px';

   controlText.style.paddingRight = '4px';

   controlText.innerHTML = 'Show/Hide grid';

   controlUI.appendChild(controlText);

   google.maps.event.addDomListener(controlUI, 'click', function() {

      if (map.overlayMapTypes.getLength()) {

         map.overlayMapTypes.pop();

      }

      else {

         map.overlayMapTypes.push(new CoordMapType(new google.maps.Size(100, 100)))

      }

   });

}





function initialize() {



   var map;



   var myMapType = new google.maps.ImageMapType({

      tileSize: new google.maps.Size(100, 100),

      minZoom: 4,

      maxZoom: 9,

      getTileUrl: function(coord, zoom) {

         return zoom + '/tile_' + coord.x + '_' + coord.y + '.png';

      },

      isPng: true

   });



   myMapType.projection = new myProjection();



   var mapOptions = {

      center: new google.maps.LatLng(0, 0),

      mapTypeControl: false,

      backgroundColor: '#E0C191',

      zoom: 9

   }



   map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);

   map.mapTypes.set('myMapType', myMapType);

   map.setMapTypeId('myMapType');



   var homeControlDiv = document.createElement('DIV');

   var homeControl = new HomeControl(homeControlDiv, map);

   homeControlDiv.index = 1;

   map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv);

   

   var gridControlDiv = document.createElement('DIV');

   var gridControl = new GridControl(gridControlDiv, map);

   gridControlDiv.index = 2;

   map.controls[google.maps.ControlPosition.TOP_RIGHT].push(gridControlDiv);

}



</script>

<script type="text/javascript" src="tavsession.js"></script>

</head>

<body onload="initialize()">

   <div id="map_canvas" style="width:100%; height:100%"></div>

</body>

</html>



It's a bit hacky and such, but if you have a directory that looks like
  • map.html
  • tilezoomcreator.py
  • 9(directory)
and put your full-size tiles in 9, then run the script, it will generate zoom tiles and populate the directory.
Galthon
 
Posts: 21
Joined: Wed Nov 07, 2012 10:55 pm

Re: World Map of Roanoke & Jamestown

Postby imrielle » Sun Dec 02, 2012 4:34 am

I've had this script (from the HnH forum I believe, is where I got it?) and it does work fairly well. I'd just ended up prefering the Photoshop script because it lets me compress the images before chop chop, lol. I also don't know the Python language, to tweak this with at all. Something new to learn in the future.

Do note, if you use the Python script: You must use Python 2.x, 3.x does not work with this. 2.7 worked fine, though. Unless, of course, you know the Python language and can convert it over. Mentioning this because the Python page download link sends you to version 3.x.

That aside, I just realized that I posted the Photoshop script I use, and the HTML/JS, in a separate thread, so here is a link:
viewtopic.php?f=11&t=2500
Image
User avatar
imrielle
Customer
 
Posts: 491
Joined: Sat Nov 10, 2012 5:57 pm
Location: Ohio, USA

Re: World Map of Roanoke & Jamestown

Postby KiwiBird » Sun Dec 02, 2012 9:35 pm

Should I continue to make the map files for Jameson available here? The map above has 1167 titles for that server. I now have 2144 tiles below.

View the PNG map here (15.7mb): https://www.dropbox.com/s/0p6lbwac85rxk ... Master.png
Grand Master Files: https://www.dropbox.com/s/h8lj9j9air4nt ... Master.rar
Previous Master Map Archive: https://www.dropbox.com/sh/rn6crtvagf2a ... %20Backups

Master 003 is the current Grand Master.
KiwiBird
 
Posts: 10
Joined: Tue Nov 13, 2012 10:30 am

Re: World Map of Roanoke & Jamestown

Postby imrielle » Mon Dec 03, 2012 4:19 am

KiwiBird wrote:Should I continue to make the map files for Jameson available here? The map above has 1167 titles for that server. I now have 2144 tiles below.

View the PNG map here (15.7mb): https://www.dropbox.com/s/0p6lbwac85rxk ... Master.png
Grand Master Files: https://www.dropbox.com/s/h8lj9j9air4nt ... Master.rar
Previous Master Map Archive: https://www.dropbox.com/sh/rn6crtvagf2a ... %20Backups

Master 003 is the current Grand Master.


You make them available, I'll put them to use. Eventually Jamestown will catch on as Roanoke fills up and people will be more interested in what maps are available. :) Your's is looking spiffy (even if the page isn't!) here, heheh. http://salem.comlu.com/maps.php?james

I'm working on real hosting, and maybe talking people from Roanoke into being more interested in a joint-project.
This post had some interesting ideas: viewtopic.php?f=3&t=29&start=10#p527

Some of those are implementable, like markers, overlays for darkness, and things like "buddy pins" and custom pins. I also like the idea of a map for the visually impaired - this can be done, too.
Image
User avatar
imrielle
Customer
 
Posts: 491
Joined: Sat Nov 10, 2012 5:57 pm
Location: Ohio, USA

Re: World Map of Roanoke & Jamestown

Postby Wolfendor » Mon Dec 03, 2012 6:44 pm

So i have been playing on Jamestown since it's opened, and i have map from bottom border to the top border, right from Boston.

Here is the full map: https://www.dropbox.com/s/trygzkx30o3o9g6/Xcommand.jpg ( Alternative link: http://rghost.ru/41985922 )
And here is the tiles: https://www.dropbox.com/sh/li568f3vv15z ... merge3.rar

Feel free to use.
User avatar
Wolfendor
 
Posts: 5
Joined: Thu Nov 08, 2012 11:39 pm
Location: Moscow

Re: World Map of Roanoke & Jamestown

Postby Galthon » Tue Dec 04, 2012 12:20 am

I can actually provide hosting, but I'm too damn lazy to do much coding these days.
Galthon
 
Posts: 21
Joined: Wed Nov 07, 2012 10:55 pm

Re: World Map of Roanoke & Jamestown

Postby imrielle » Tue Dec 04, 2012 5:17 am

Galthon wrote:I can actually provide hosting, but I'm too damn lazy to do much coding these days.


LoL, coding I am not lazy at, hosting however is an issue. Need to find something that isn't going to croak under the load and has plenty of space. I'm guestimating that 1GB of server space is going to be a bare minimum if server maps really are 25,000x25,000 tiles.
Image
User avatar
imrielle
Customer
 
Posts: 491
Joined: Sat Nov 10, 2012 5:57 pm
Location: Ohio, USA

PreviousNext

Return to Artifice & Arcana

Who is online

Users browsing this forum: No registered users and 1 guest