Author Topic: M4OPS technical overview  (Read 2576 times)

PeterC

  • Administrator
  • Member
  • *****
  • Posts: 483
  • Passionate about my one-place study
    • View Profile
    • Holywell-cum-Needingworth History
M4OPS technical overview
« on: 29 July 2016, 07:49:46 »
This section is only relevant to anyone wanting to understand how M4OPS works technically.

M4OPS currently has the following technical components:
  • an HTML file (M4OPS-index.html) containing all the elements on the screen (and referencing all necessary js/css files)
  • a CSS style file (M4OPS-main.css) specifying sizes etc of all the elements
  • a Javascript/js file (M4OPS-explore.js) driving all the functionality, and including:
    • calls to many OpenLayers 3 functions, some bootstrap and jquery functionality
    • lots of comments about what is happening, and the structures involved
  • a php file (listfiles.php) for listing files on the server
  • a php file (savegeojson.php) for saving geojson files on the server
  • a php file (savefiles.php) for saving various types of uploaded file in the right place on the server
  • a php file (FLG.php) for generating all the JSON/geojson files (including Feature Layer files) from csv files on the server
  • some supporting files obtained from elsewhere
    • bootstrap-slider.js/css for the sliders
    • JBWeb (JuiceBox) and JuiceBoxSozi (PDC) for close-ups of images
    • icons from WebIconSet.com - not used much yet
    • a few images for backdrop and crosses
  • a JSON file (M4OPS.json) specifying
    • defined layers, that are available to multiple "Areas"
    • the "Areas" (eg Scotland), and the maps available for each (both any defined layers from above, and those specific to this Area)
    • the general abbreviations, available to be used anywhere in
      • Demo explanatory html
      • layer descriptive html
      • splash screen html
      • layer attribution html
    • words that will be abbreviated in the names of Base and Overlay layers above the slider
    • the html for the Help button message
    • Demo levels (showlevels) and corresponding html
  • a DefinedLayerDefs_Other.csv file specifying common layer definitions that can be referred to by LayerDefs_Other.csv files in specific OPS, when compiling with FLG
It also has an OPS folder, which has a sub-folder for each OPS, and this has in it:
  • a JSON file (OPS.json) specifying the details of the OPS, and the maps available for the OPS (both Tile and Feature/Vector)
  • all the Feature Layers geojson files and (optionally) their:
    • _Extras.json file containing further text and images about the features
    • _XRefs1.json file containing text and images about cross-references (eg People) to the features
  • a SavedFiles folder containing all the geojson files saved by users
  • an Images folder containing all the images referred to by Feature layers
Note that all the (geo)json files can be generated (compiled) from CSV files. These csv files are all kept in an FLG folder in the sub-folder for each OPS:
  • OPS.csv - details of the OPS
  • LayerDefs_Feature.csv - a list of all feature layers specific to this OPS
  • LayerDefs_Other.csv - a list of all other layers specific to this OPS, mainly Tiles
  • Features.csv - a list of all the features known to the OPS (which can then be referred to by Feature Layers)
  • People.csv (Optional) - a list of all the people known to the OPS (which can then be referred to by Feature Layers)
  • For each Feature Layer (eg “Censuses”):
    • Censuses.csv - a list of all the features known to the OPS (in Features.csv) used in this Feature Layer
    • (optional) Censuses_Events.csv - a list of all the events listed for all the features used in this Feature Layer
    • (optional) Censuses_People_Events.csv - a list of all the events listed for all the people and features used in this Feature Layer
    • (optional) Censuses_People_Specs.csv – contains the fields specifying the person and results list headings
It also has an tileserver-php-master folder, which has a sub-folder for each OPS, and this has in it:
  • subfolders, usually corresponding to the Raster categories
  • and in each subfolder are:
    • a folder for each tileset created by maptiler, to be served by tileserver
Note that to save space and time most tilesets are stored on just the production site (ShowMaps), and not the development site (ShowMapsDev).  They are referred to by both the development and production sites.
« Last Edit: 24 January 2018, 20:33:47 by PeterC »