Mapping for One-Place Studies - a forum

Our prototype Mapping System (M4OPS) => M4OPS - Technicalities => Topic started by: PeterC on 15 January 2017, 11:58:05

Title: The input (Geo)JSON files
Post by: PeterC on 15 January 2017, 11:58:05
Warning! This is highly technical and only relevant for someone trying to understand how M4OPS works internally. It also needs updating

Overview
M4OPS expects its input, including for feature layers, to be defined by GeoJSON and JSON files. For more on the fields, which are now generated from csv files, see Feature Layers - the CSV files (http://mapping4ops.org/feature-layer-technicalities/feature-layers-the-csv-files/).

The Main input files expected are:
The Feature Layer input files expected (for eg Censuses) are
Censuses.geojson
We expect our GeoJSON sources to beWhere each FEATURE (which becomes an ol.feature object) in FEATURE-ARRAY isWhere the GEOMETRY is an object (one of Point, LineString, Polygon, MultiPoint, MultiLineString, and MultiPolygon) such as:And where the PROPERTIES are an object containing (with examples):and also these, that were in the Extras file:And also (from geojson.io - if overriding default - NB uses mapbox symbols under licence)Note that MapHub uses the PROPERTIES:Note that hyphens are not compatible with saving a geojson, so we use _ instead

Censuses_Extras.json
The .._Extras.json file (eg Pubs_Extras.json) has more data that ties in with the original geojson file (eg Pubs.geojson).  This enables more complex (eg Event oriented) data.

It is a single object, of the format:Where each FEATURE in FEATURE-ARRAY is an object containing:Where each EVENT in EVENTSARRAY is an object containing:Where the SPECIFICATION is an optional object containing the optional fields:An example of SPECIFICATION is:   
Censuses_XRefs1.json
The .._XRefs1.json file (eg Censuses_XRefs1.json) has yet more data that ties in with the original geojson file (eg Censuses.geojson). Rather than being oriented around the Features it is oriented around another aspect - the XRef (eg People). (NB We have implemented just a single XRefs file so far)

It is a single object, of the format:Where each XREF in XREFSARRAY is an object containing:Where each EVENT in XREFEVENTSARRAY is an object containing:Where the SPECIFICATION is an object containing:An example of SPECIFICATION is: