Giter VIP home page Giter VIP logo

scribeui's Introduction

ScribeUI

ScribeUI is an application to create mapfiles with many scale levels.

To get the latest release, clone this repo and then checkout the latest tag. git describe --abbrev=0 to view the latest tag.

Migrating from ScribeUI v0.5 to v1.0 is explained at the end of this file.

The following instruction installations were tested on ubuntu precise.

Requirements

  • Mapserver 6.4.1
  • Apache 2.2
  • Make

Production installation

You need to install apache2 with mod_wsgi:

sudo apt-get install libapache2-mod-wsgi

Note mod_wsgi 3.4 or more is recommended. How to compile mod_wsgi 3.4 on ubuntu precise

Configuration

First, clone the repository in a folder www-data will be able to access. In this configuration example, the scribeui folder will be located at /opt/scribeui

Then, copy the default production settings:

cp production.ini local.ini

Make sure the mapserver url in local.ini points to your mapserver path: - line 35: mapserver.url

Edit the proxy.cgi file and add your server host to the list of allowed hosts if different from localhost (localhost is already included.)

Create a file 'pyramid.wsgi' with the following content, editing the path to your scribeui installation:

from pyramid.paster import get_app, setup_logging
ini_path = '/opt/scribeui/local.ini'
setup_logging(ini_path)
application = get_app(ini_path, 'main')

You can use the Makefile to automatically setup ScribeUI for you, simply run:

   export CPLUS_INCLUDE_PATH=/usr/include/gdal
   export C_INCLUDE_PATH=/usr/include/gdal
   sudo make
   sudo chown -R youruser .
   make install
   sudo make perms

Next step is adding the app to apache, here is an example configuration for Apache 2.2:

WSGIDaemonProcess scribeui user=www-data group=www-data threads=10 \
        python-path=/opt/scribeui/lib/python2.7/site-packages
WSGIScriptAlias /scribeui /opt/scribeui/pyramid.wsgi

<Directory /opt/scribeui>
        WSGIApplicationGroup %{ENV:APPLICATION_GROUP}
        WSGIPassAuthorization On
        WSGIProcessGroup scribeui
        Order deny,allow
        Allow from all
</Directory>

If you use Apache 2.4, the configuration is slightly different:

WSGIDaemonProcess scribeui user=www-data group=www-data threads=10 \
        python-path=/opt/scribeui/lib/python2.7/site-packages
WSGIScriptAlias /scribeui /opt/scribeui/pyramid.wsgi

<Directory /opt/scribeui>
        WSGIApplicationGroup %{ENV:APPLICATION_GROUP}
        WSGIPassAuthorization On
        WSGIProcessGroup scribeui
        Require all granted
</Directory>

Once apache is restarted, ScribeUI should be available!

sudo service apache2 restart

Downloading template data is optional, but recommended for a better experience:

    sudo make load-demo-data

If you omit this step, the maps you create from default templates will display pink tiles.

Development installation

These instructions are for running a development version of ScribeUI. It is pretty good for a local version of the application. Production installation instructions are available below.

cp development.ini local.ini

Review the following parameters in local.ini, and edit them if needed:

- sqlalchemy.url
- workspaces.directory
- scribe.python
- cgi.directory
- mapserver.url

Edit the proxy.cgi file and add your server host to the list of allowed hosts if different from localhost (localhost is already included.)

You can use the Makefile to automatically setup ScribeUI for you, simply run:

    export CPLUS_INCLUDE_PATH=/usr/include/gdal
    export C_INCLUDE_PATH=/usr/include/gdal
    sudo make
    make install

This will download and install the required dependencies, setup the differents configurations files and install them in the proper directories.

To launch the server at http://localhost:6543/:

    make start

Downloading template data is optional, but recommended for a better experience.

    sudo make load-demo-data

This will download some natural earth data and will help you get started with ScribeUI by making templates readily working so you don't start with an empty mapfile. (The template code is still available if you don't download the data, but the result will be pink tiles).

Migrating from v0.5 to v1.0

Before pulling and installing ScribeUI v1.0, first change all file's permission back to your own user:

sudo chown -R user application/

You may now follow the production installation instructions and install ScribeUI v1.0

Once the installation is finished and ScribeUI up, you may import your old workspaces changing the workspace folder and the database to your user:

sudo chown -R user scribeui.sqlite workspaces/

Then executre the update script:

python update.py

Then change the database and workspace folders back to www-data:

sudo chown -R www-data scribeui.sqlite workspaces/

Your workspaces and maps will then be imported, although passwordless.

Each map will have to be edited to delete or comment the following line in the map editor:

CONFIG "MS_ERRORFILE" "../debugFile.log"

scribeui's People

Contributors

adube avatar alexbrault avatar cbourget avatar gislars avatar jlap avatar jlarouche avatar juliensam avatar samuellapointe avatar smercier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scribeui's Issues

Import map

Add "Import map" in "Manager view" base on "Export" zip file. This would be a usefull enhancement.

Logs view

"Logs" view is moved up the screen when I try to expand it with mouse

Integrating new Scribe script

This will allow for better error logging when doing mistakes in the scribe syntax. The UI needs to be changed to handle the new group management system of the new Scribe script.

Clearer separation between editors

is not quite fit with the mapscript view. When I move the size of this view, would be nice to have a visible line to see the line between views

No module named config

I try to install scribeui on a Debian machine, I installed all the requirements but when I run

from init import init_db

it return

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "init.py", line 21, in <module>
    from config import *
ImportError: No module named config

Delete file

The "delete file" function in browser, does not work

Smarter makefile

The current makefile will download again heavy files if run twice. It should be able to detect if only a few files are missing, and proceed accordingly.

ScribeUI Demo

Needs a cron job that wipes the workspaces and DB clean.
Might also be best to disable the browse tab.

Better error messages

We need better error messages, especially in the ajax calls.

Ex. Creating a map with the name of another map in the workspace alerts "Existing" which is not very friendly.

Add POI

It works but it save one level higher than active map is. In Scribe maps only, standard works normally.

Save button

Should be on top view. I suggest just beside the "Group Setting" Button. At the bottom is not usefull.

Create simple self-contained package for development

The current instructions are actually production instructions, and are very complex #45

There is too much room for user errors in the current instructions, a self contained package which installs scribeui with a few clicks is necessary.

Zoom level number too small

Larger font size for zoom level, mouse coordinates and scale. Zoom number is one of the major information on map status must so it might be interesting to Have a larger zoom level number on top right corner.

CSS files returned with corrupted headers

Sometimes, a css file is returned and the Content-Type in the response Headers is wrong.

Examples:
Content-Type http://127.0.0.1/ScribeUI
Content-Type Apache/2.2.22
Content-Type /usr/local/etc/mime.types
Content-Type application/x-go-sgf

This problem happens very intermittently and pretty randomly.

In flask's helpers.py, in the send_file function, I tried adding this as a debug message:

pprint.pprint(filename_or_fp+' '+mimetype)

But at this point, the file's mimetype is all good.

I was able to find someone with a similar problem: https://groups.google.com/forum/#!topic/web2py/5F3UUMkDPRI

We both use Flask and mod_wsgi, that's pretty much all we have in common. But otherwise, it's exactly the same issue.

A CSS file having this issue won't be rendered by firefox. But if you open it, the content is there. The only problem is the corrupted content-type.

WMS URL

Would be nice to have the WMS URL of active map in "Manager form"

"Variables" button

Would be really more convenient to place "Variables" in drop list instead of a single button.

Automatic Wrapper

It can be usefull to add a proxy.py that automagicly redirected GetMap query with a secret id of the map worksapce.

http://my_server.com/scribeui/proxy.py?map=2dsd4235c234c

New Group button

To be more convenient with "Delete Group" function, moved '+' button (New Group) in "Group Settings" dialog form instead of main editor view.

Delete Scribe Group

.layer file remains in group files directory even I delete "Group" in GUI. They are deleted in GUI but not on disk

Layer groups are hardcoded to 'default'

The code that display the map in scribe use the 'default' layer name. This means that all layer must be part of the default group which defeats the purpose of groups and is not intuitive since we specify a bunch of groups in the UI.

The mapfile map NAME should be use in the OpenLayers WMS Layer in the UI and maybe the group specified in the UI should be used as the group of the layer if not specified.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.