0.0.1 • Published 10 years ago

avec-geojs v0.0.1

Weekly downloads
3
License
-
Repository
-
Last release
10 years ago

AveC-GeoJs, a suite for geocomputation.

The AveC-GeoJs library provides javascript objects for spatial data in support of spatial analysis and visualization.

The spatial object data model is inspired by the geospatial model shared by the Open Geospatial Consoritum (OGC) and the TC 211 subcommitte of the International Organization for Standardization (ISO). The GeoJs spatial object data model deviates when necessary for semantic correctness.

WARNING: this is alpha code, just barely working.

Library Organization

.hgignore   Configuration file for Mercurial. (Absent in npm install.)

.jshintrc   Configuration file for 'jshint'. JsHint, when run, generates
            some errors which are tolerated by this project.

.npmignore  Configuration for 'npm' to ignore files in the directory.

Makefile    A build file using the 'make' command.

Readme.md   This file

.hg         The distributed source code management database containing the
            entire history of the AveC code library. That directory is
            accompanied by the avec/.hgignore configuration file, which is
            itself versioned. (Absent in npm install.)

bin/        Executable binaries which are useful in the development or
            production of the library source code. Many of these files are
            shell script utilities some of which invoke node.js to do their
            work.

doc/        Documentation in HTML format (see index.html).

patch/      Source code patches, notably for node-canvas on ECMAScript 6

src/        The source code, organized mostly on the geospatial standards on
            which the AveC library is based. See the file avec/src/00_README
            for details.

test/       Integration tests

zout_build/ TEMPORARY, generated during the build, e.g. by 'make build'

zout_test/  TEMPORARY, generated during testing, e.g. by 'make testweb'

Authors

The AveC Project (AveC)

Installation

AveC-GeoJs can be installed through the npm module system.

    npm install avec-geojs

The GeoJs.map package uses a canvas element provided by the user code. On Node.js this can be provided by the 'node canvas' library (see https://github.com/Automattic/node-canvas/). However, installation of this library is tricky. Unfortunately, the upstream library requires a trivial patch to be used in 'strict mode' Javascript (see bug 362). Also, installation currently fails on Mac OS X due to the use of Gnu/Linux specific code. To work around these, the 'node canvas' library can be installed from source with steps similar to the following:

    cd $PROJECT_DIR
    npm install avec-geojs
    mkdir -p node_modules/canvas
    cd node_modules/canvas
    git clone https://github.com/Automattic/node-canvas.git .
    patch -p1 < ../avec-geojs/patch/node-canvas.patch
    patch -p1 < ../avec-geojs/patch/node-canvas-mac.patch
    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/X11/lib/pkgconfig make

Note that all pre-requisites will have to be met and that the PKG_CONFIG_PATH may be different depending on where the pre-requisites were installed. See https://github.com/Automattic/node-canvas/ for details of the installation of 'node-canvas' on different platforms.

Usage

AveC-GeoJs uses advanced features of ECMAscrpit 5 and features proposed for ECMAscript 6.

When running in the Node.js environment, code using AveC-GeoJs should be run with the flags:

    node --harmony

To run a test shell, do:

    make run

or, by hand, do:

    node --harmony
    const GeoJs = require('./src/geojs.js');
    GeoJs

where the last command will generate an overview of the library.

Testing

Testing can be run from the command line with:

    make test

or in the browser with:

    make testweb

which will open up a test application in the default browser.

Example

The test cases provide working examples until the documentation has been completed.

Known Issues

  • 2014.08 MapGraphicChart clipping disabled

    clipping image tiles fails in many browsers, enable with GeoJs.map.model.MapGraphicChart.clip = true;

##Developers

Fork the code and hack on. If you can read this file, you have access to the source code.

Contribute

If you want to pitch in and contribute to the project, contact the authors. No proceedure has yet been created to accept outside contributions into the code base.

Contributors

 project  : avec-geojs
 repo age : 15 month
 active   : 15 months
 commits  : 64
 files    : 282
 authors  : 
     1	Adrian Custer         100.0%

UnLicense

The AveC-GeoJs library is distributed under the Anarchist Statement, which grants recipients no legal rights but encourages all to assert their extra-legal, moral right to collaborate in the goal of furthering humanity. All Javascript code files in the library should include the statement:

//    Steal this Code!
//      This code is not licensed; to use it, you must steal it.

Copyright (c) 2012-2014 The AveC Project