Commit 0cb26239 authored by Michael Murtaugh's avatar Michael Murtaugh

variable tilesize and bin in makefile, map template

parent 25fb22fa
......@@ -43,37 +43,37 @@ bin/texture:
# contours
%.contours.svg: %.png
contours/contours $< > $@
bin/contours $< > $@
%.contours.svg: %.jpg
contours/contours $< > $@
bin/contours $< > $@
# texture (& lexicality, textline, para, block
%.texture.svg: %.png
texture/build/texture $< $*.texture.svg $*.lexicality.svg $*.textline.svg $*.para.svg $*.block.svg
bin/texture $< $*.texture.svg $*.lexicality.svg $*.textline.svg $*.para.svg $*.block.svg
%.texture.svg: %.jpg
texture/build/texture $< $*.texture.svg $*.lexicality.svg $*.textline.svg $*.para.svg $*.block.svg
bin/texture $< $*.texture.svg $*.lexicality.svg $*.textline.svg $*.para.svg $*.block.svg
# channel
%.red.png: %.png
channel/channel $< $*.red.png $*.green.png $*.blue.png
bin/channel $< $*.red.png $*.green.png $*.blue.png
%.red.png: %.jpg
channel/channel $< $*.red.png $*.green.png $*.blue.png
bin/channel $< $*.red.png $*.green.png $*.blue.png
%.green.png: %.png
channel/channel $< $*.red.png $*.green.png $*.blue.png
bin/channel $< $*.red.png $*.green.png $*.blue.png
%.green.png: %.jpg
channel/channel $< $*.red.png $*.green.png $*.blue.png
bin/channel $< $*.red.png $*.green.png $*.blue.png
%.blue.png: %.png
channel/channel $< $*.red.png $*.green.png $*.blue.png
bin/channel $< $*.red.png $*.green.png $*.blue.png
%.blue.png: %.jpg
channel/channel $< $*.red.png $*.green.png $*.blue.png
bin/channel $< $*.red.png $*.green.png $*.blue.png
# houghlines
# Z3.hough.png <= Z3.png
# Z3.hough.X0Y0.png <= Z3.hough.png
%.hough.svg: %.jpg
houghlines/build/houghlines $< > $@
bin/houghlines $< > $@
%.hough.svg: %.png
houghlines/build/houghlines $< > $@
bin/houghlines $< > $@
# gradient: NEEDS WORK
# %.gradient.png: %.jpg
......@@ -88,14 +88,17 @@ bin/texture:
################################
# VIEWER rules
# pyramid rules
TILESIZE=128
.PRECIOUS: %/Z0.png %/Z1.png %/Z2.png %/Z3.png %/Z4.png %/Z5.png
%/Z0.png: %.png
mkdir -p $*
python viewer/pyramid.py $< --output "$*/Z{z}.png"
python viewer/pyramid.py $< --tilesize $(TILESIZE) --output "$*/Z{z}.png"
%/Z0.png: %.jpg
mkdir -p $*
python viewer/pyramid.py $< --output "$*/Z{z}.png"
python viewer/pyramid.py $< --tilesize $(TILESIZE) --output "$*/Z{z}.png"
# SVG to png
%.png: %.svg
......@@ -103,19 +106,21 @@ bin/texture:
# tile rule
%.X0Y0.png : %.png
python viewer/tile.py $< --output "$*.X{x}Y{y}.png"
python viewer/tile.py $< --tilesize $(TILESIZE) --output "$*.X{x}Y{y}.png"
# make the map
%.html: %.png
mkdir -p $*
python viewer/makeviewer.py \
--tilesize $(TILESIZE) \
--template viewer/map.html \
--output $@ $<
%.html: %.jpg
mkdir -p $*
python viewer/makeviewer.py \
--tilesize $(TILESIZE) \
--template viewer/map.html \
--output $@ $<
%/error.jpg:
convert -size 256x256 canvas:red $@
convert -size $(TILESIZE)x$(TILESIZE) canvas:red $@
......@@ -36,6 +36,7 @@ var map = L.map('map', {
// originals/2016-11-09/Z0.hough.X0Y0.png
var pixels = L.tileLayer("{{basename}}/Z{z}.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
}).addTo(map),
......@@ -46,16 +47,19 @@ var pixels = L.tileLayer("{{basename}}/Z{z}.X{x}Y{y}.png", {
var red = L.tileLayer("{{basename}}/Z{z}.red.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
});
var green = L.tileLayer("{{basename}}/Z{z}.green.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
});
var blue = L.tileLayer("{{basename}}/Z{z}.blue.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
});
......@@ -63,36 +67,43 @@ var blue = L.tileLayer("{{basename}}/Z{z}.blue.X{x}Y{y}.png", {
var contours = L.tileLayer("{{basename}}/Z{z}.contours.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
}),
hough = L.tileLayer("{{basename}}/Z{z}.hough.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
}),
texture = L.tileLayer("{{basename}}/Z{z}.texture.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
}),
lexicality = L.tileLayer("{{basename}}/Z{z}.lexicality.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
}),
textline = L.tileLayer("{{basename}}/Z{z}.textline.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
}),
para = L.tileLayer("{{basename}}/Z{z}.para.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
}),
block = L.tileLayer("{{basename}}/Z{z}.block.X{x}Y{y}.png", {
continuousWorld: true,
tileSize: {{tilesize}},
errorTileUrl: "error.jpg",
bounds: [[bounds.lat+1, 1], [-1, bounds.lng-1]]
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment