Skip to content

nmatton/apiscore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apiscore - Evaluez votre environnement apicole

What is it ?

Apiscore is a Web-based application for basic Spatial Analysis tools designed for assessing neighborhood of an apiary. The application is accessible at that location: apiscore.be

How it works?

On what it is based ?

The web app is developped using HTML and Javascript as front-end; php and a PostGIS db as back-end

Contribute

All PR's are welcome to improve the application !

You can also fill an issue if you have one to report ;)

All the developments are made on my personal free time, you can also donate to support me !

Thanks !

License

The complete project is under license GPL-v3. Check the LICENSE for more details.

Background

Mapbox

The map layout is using mapbox framework. This framework is easy to setup and use. The following features are used:

Display of the circle: Turf.js

Turf.js was used to create the circle of 3KM where user clic, and added as a distinct source layer to mapbox.

Graph display : chart.js

Chart.js was used to create the graphs. A single graph instance was created for each graph (pie chart and hedgerow graph). CSS rules are used for changing the display

Communication with PostGIS db

A php script is writted to communicate with the PostGIS database that contains the layers, either in vector or raster format. The request are made to the PostGIS server, and the php script returns results as a formatted json array. Credentials are stored in a separate php file "localsettings.php". An example of the file is provided in the php folder.

Make sure that the server has the php-postgres module enabled.

PostGIS db setup

A basic postgresql instance with PostGIS extension was installed. The layers described below (except for orthophoto) are loaded to the db using FME, an ETL tool. The loading can also be achieved using shp2pgsql or raster2pgsql tools.

Modal window and graph window

The welcome modal window and the window containing the graphs are created and managed using the framejs module developped by Tom Misawa (riversun).

Data Sources

All data used in the project are available on open access licenses. All data are available for download (except orthophoto due to file size limitations).

Ecotopes

Note that the WMS layer is only accessible on a Lambert Belge 2008 projection (EPSG 3812) while mapbox only accepts EPSG 3857 for the WMS layers. See here for more details, but the following example was the actual solution

Land Cover

This layer was created in the frame of the Walous project. This inter-Universities research project used orthophotos of 2018 and ancillary data to produce high resolution land cover map for complete Waloon region.

Agricultural fields

This layer provides the agricultural parcels for complete region, based on legal declaration of farmers. There is a (quite long) delay between production (farmer's declaration) and publication, thus one year delay applies.

Aerial photography (orthophotos)

The orthophotos of 2019 are used instead of 2020 due to a seasonal effect. 2019 are during summer while 2020 are during spring, where vegetation is sometimes at a too early stage for clear distinction.

Hedgerows