Coder Social home page Coder Social logo

silverstripe-gis's Introduction

SilverStripe GIS Module

Build Status Build Status Scrutinizer Code Quality Code Intelligence Status Code Coverage Version Total Downloads License

GIS developer toolkit for SilverStripe, turns SilverStripe into a GeoCMS and map service.

feature name

Features

  • New field types: geo field types Geometry and Geography (Postgres only) for DataObjects
  • New form fields: edit the new geo types using the MapField or add maps to GridFields in ModelAdmin
  • Configurable projections: support for multiple projections through proj4
  • Primitive and multipart geometries: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon
  • Developer tools: heaps of useful helpers, e.g. for re-projecting, distance measuring, EWKT
  • MySQL, Postgres and Sqlite3: supports Postgres with PostGIS, MySQL 5.7+, partial support for MariaDB and Sqlite3 with SpatiaLite
  • ORM integration: DataList filters, e.g. to find intersecting DataObjects or within distance
  • GeoJSON imorter: import a GeoJSON source as DataObjects
  • GeoJSON web service: GeoJSON API for DataObjects
  • WFS: WFS for DataObjects (experimental)
  • WMTS: render DataObjects to ZXY tiles e.g. for a leaflet frontend
  • Rasters: (Postgres only) import GeoTIFFs, access values, generate stats and render map tiles

Requirements

  • MySQL 5.7+ or Postgres with PostGIS extension or Sqlite3 with SpatiaLite
  • SilverStripe framework 4
  • GDAL for raster support

Installation

It's recommended to use composer to install the module

$ composer require smindel/silverstripe-gis
$ vendor/bin/sake dev/build flush=all

MySQL natively supports geometries since version 5.7.6 but not geographies or raster data.

When using Postgres you have to install PostGIS and composer require silverstripe/postgresql. On Ubuntu and Debian run the following commands:

$ sudo apt-get install postgis
$ sudo apt-get install postgresql-9.5-postgis-scripts
$ sudo apt-get install postgresql-9.5-postgis-2.2
$ sudo -u postgres psql SS_gis -c "create extension postgis;"

(replace 'SS_gis' with your db name)

Steps two and three may not be necessary, so you might want to try one and four first and if four fails, do two, three and four.

In order to install Sqlite3 you have to install SpatiaLite and composer require silverstripe/sqlite3. On Ubuntu and Debian run the following commands:

$ sudo apt install sqlite3 php-sqlite3 libsqlite3-mod-spatialite
$ sudo updatedb & locate mod_spatialite.so
> /usr/lib/x86_64-linux-gnu/mod_spatialite.so
update php.ini, set:
sqlite3.extension_dir = /usr/lib/x86_64-linux-gnu

Configuration

silverstripe-gis, like any other SilverStripe module, can be configured using YAML files, the Config class or private static properties of Configurables. Check out the following sections to see what can be configured.

Examples and how tos:

API:

  • GIS - Spatial utility class with all sorts of useful helpers
  • GeoJSONImporter - Import GeoJSON files into the db
  • GridFieldMap - GridField component to browse DataObjects by map
  • MapField - Form field to edit geo types
  • GeoJsonService - Expose your DataObjects dynamically in GeoJSON format though an API
  • WebMapTileService - Generate map tiles for Leaflet or Openlayers from your DataObjects
  • WebFeatureService - Generate WFS for Leaflet or Openlayers from your DataObjects (experimental)
  • Rasters - Import raster files, access values and stats, render WMTS tiles

Note

The module is incompatible with the framework versions 4.3.1 and 4.3.2, which disallowed parameterised field assignments. The issue has been fixed, so that all versions of the framework before 4.3.1 and after 4.3.2 are working.

silverstripe-gis's People

Contributors

andreaspiening avatar gordonbanderson avatar smindel avatar

Watchers

 avatar

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.