Skip to content

BjoernSchilberg/urwaldpate

Repository files navigation

Gitpod Ready-to-Code

Urwaldpate

Project setup

Checkout as:

git clone https://github.com/BjoernSchilberg/urwaldpate urwaldpate

Specify env variables by placing the following files in your project root:

  • env.production
  • env.development

For example, the configuration files should have the following content:

VUE_APP_TITLE=Urwaldpate
VUE_APP_AREA=BiesBecken
VUE_APP_POPUP_AREA=Biesenthaler Becken
VUE_APP_apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
VUE_APP_authDomain=xxxxxxxxxxxxxx.xxxxxxxxxxx.xxx
VUE_APP_databaseURL=https=//xxxxxxxxxx-xxx.xxxxxxxxxx.xxx
VUE_APP_projectId=xxxxxxxxxx-xxx
VUE_APP_storageBucket=xxxxxxxxxx-xxx.xxxxxxx.xxx
VUE_APP_messagingSenderId=xxxxxxxxxxxx
VUE_APP_appId=1=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Install all dependencies for the project:

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

Customize configuration

See Configuration Reference.

Publish on github pages

Publish on github pages is handling via github actions by pushing tags following SemVer vX.Y.Z.

git tag vX.Y.Z
git push origin --tags

Tips and Tricks

ogr count features

ogrinfo -sql "Select count(*) from RasterWGS_normal where Gebiet ='Stechlinsee-Gebiet'" RasterWGS_normal.json

Find duplicates in data

egrep  -i "RasterID" input.json | sort | uniq -d

With ogr list all duplicates RasterIDs:

ogrinfo -dialect SQLITE -sql "SELECT RasterID, Gebiet, COUNT(RasterID) FROM test GROUP BY RasterID HAVING COUNT(RasterID)>1" test.json

Display duplicate rows with all information:

ogrinfo -dialect SQLITE -sql "SELECT RasterID, Gebiet FROM (SELECT *, count(*) OVER (PARTITION BY RasterID) as count FROM test) tableWithCount WHERE tableWithCount.count > 1" test.json

Return as CSV to stdout:

ogr2ogr -F CSV "/vsistdout/" -dialect SQLITE -sql "SELECT RasterID, Gebiet FROM (SELECT *, count(*) OVER (PARTITION BY RasterID) as count FROM test) tableWithCount WHERE tableWithCount.count > 1" test.json

Firebase rules

{
  "rules": {
    ".read": "true",
    ".write": "auth != null"
  }
}