Coder Social home page Coder Social logo

Comments (3)

mmpagani avatar mmpagani commented on September 21, 2024

Hi Muharem,
comments below in blue.

We need a database schema for the PSHA input model

Problem description

We require a database schema for storing PSHA input model entities like: fault, rupture and seismic source.

The equivalent NRML (XML) schema exists already and the database schema must be interoperable with the former i.e. we must be able to convert as follows:

 `NRML` file ->  PSHA input database ->  `NRML` file

Solution outline

Define a postgres/postgis database schema that is capable of storing faults, ruptures and seismic sources. Very early work on the database schema has already started and it looks like this.

Problems and questions identified

High complexity

The NRML schema is very complex and it is not obvious at this point what the database schema should look like. Figuring this out will require time as well as quite a bit of interaction with domain experts e.g. D. Monelli and/or F. Euchner.
For what concerns the science part, I suggest you to interact mostly
with Damiano, Graeme and me

Multiple spatial reference systems in NRML files

It is possible to define a spatial reference system (SRS) per geometry in a NRML file i.e. in the most complex case we could have a number of fault/source geometries with different spatial reference systems in the same file.
I think for the time being we must accept/work only with nrML files
containing homogeneous information (with a single SRS)
PostGIS databases on the other hand have a fixed SRS per geometry column. Hence the following questions arise:

  1. What is a suitable SRS for the geometry columns in the PSHA inputs database schema (epsg:4326)?
    LGTM
  2. Assuming that we use SRS_DB for the geometry columns in the PSHA inputs database:
    1. Do we need to perform SRS transformations for all geometries encountered in an NRML file that use an SRS other than SRS_DB (probably: yes)?
      Yes. However at the moment we have only information with spatial
      information that miss this level of detail i.e. the vertexes of area
      polygons are expressed in decimal degrees (no SRS specified - we can
      assume epsg:4326
    2. Is there a SRS that we can use for database geometry columns that facilitates arbitrary SRS transformations from/to it? If no: do we need to constrain the SRS' that may be used in NRML files?
    3. What SRS should we assume in the case where the srsName attribute is absent in the NRML file.
      See above

      Test data needed

We currently have some sample NRML files in docs/schema/examples and can work towards defining a database schema that's capable of handling these. In case more is needed we will work with the domain experts to provide the additional inputs.

I think the files you mention are fine for the time being. Damiano can
provide with you more complex files.
Thanks,
Marco

from oq-engine.

al-maisan avatar al-maisan commented on September 21, 2024

Please note: upon completion this task will result in a number of scripts (bash/SQL) that can be executed. Once they are run the database is set up and ready to be used.

Please see also https://github.com/al-maisan/openquake/tree/db-schema

from oq-engine.

al-maisan avatar al-maisan commented on September 21, 2024

Done

from oq-engine.

Related Issues (20)

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.