Mercurial > gemma
view Makefile @ 4890:5d9c7fcda566
Fix drawing of fairway profile.
The basic functionality for calculating the graph to draw resides in geo.js
This was a port of existing code from the backend (cross.go).
For historic reasons there was a bug present in this code which was fixed in the backend.
The height was transformed via Math.abs() which results in strange behavior for
measurements above the waterlevel. Points which are 1.5m above the waterlevel were drawn
1.5m below the waterlevel.
There were two fixes:
1) The y-component of the x/y-pair of the fairwayprofile point is taken as is without Math.abs()
2) To draw the diagram, there is the definition of a domain necessarry.
A minimum value for the values above the waterlevel is constructed in case there is no point above
(10 percent of the range below the waterlevel). In case there are values above the waterlevel
which in turn means the minumum value is < 0, there is this value taken as a minimum.
D3 scales accordingly.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 10 Feb 2020 15:09:59 +0100 |
parents | fa91bb7a4e7a |
children | 983d6efc04e9 |
line wrap: on
line source
# Simple Makefile to build all of Gemma # # Authors: Sascha Wilde <wilde@intevation.de> basedir := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) BUILDBASE := $(basedir).buildbase GOPATH := $(BUILDBASE)/go GOCACHE := $(BUILDBASE)/gocache ENVWARPPER := $(BUILDBASE)/run-with-env.sh BINDIR := /usr/local/bin export BUILDBASE .PHONY: all gemma client clean all: gemma client $(ENVWARPPER): @echo "Preparing go build environment:" mkdir -p "$(GOPATH)" mkdir -p "$(GOCACHE)" @echo "Creating wrapper script:" echo '#!/bin/sh' >"$(ENVWARPPER)" echo 'export GOPATH=$(GOPATH)' >>"$(ENVWARPPER)" echo 'export GOCACHE=$(GOCACHE)' >>"$(ENVWARPPER)" echo 'exec "$$@"' >>"$(ENVWARPPER)" chmod +x "$(ENVWARPPER)" gemma: $(ENVWARPPER) "$(ENVWARPPER)" go build -o ./cmd/gemma/gemma ./cmd/gemma client: $(MAKE) -f Makefile.build -C client install: gemma cp cmd/gemma/gemma $(BINDIR) tar: all v="gemma-$$(hg id -i)" ;\ tar --transform "s@^@$${v}/@" \ -cJf "../$${v}.tar.xz" \ cmd/gemma/gemma schema style-templates \ web misc example_conf.toml clean: $(MAKE) -f Makefile.build -C client $@ rm -f "$(gemma-bin)" chmod -R u+w "$(BUILDBASE)" # This is neccessary for deletion to work... rm -rf "$(BUILDBASE)"