Riverscapes/RiverscapesXML

Enhance project.rs.xml to handle multi-temporal data

philipbaileynar opened this issue · 0 comments

TLDR: How can we enhance the project.rs.xml to point to a subset of features in a single feature class?

QRiS uses a single feature class for features of the same type but for different points of time. So if you have a dam/jam count in 2007 and another in 2019, all the points for these features are stored in a single feature class distinguished by a foreign key that identifies the parent "data capture event" (i.e. timeframe).

This is good database design! The database can grow to store an unlimited number of data capture events and features without the database structure needing to change.

Also, this is handled in GIS by using query strings (aka "definition queries"). We leverage this in Riverscapes Business Logic when we want to filter features using "static" identifiers (e.g. FCode).

However, QRiS introduces the need to filter features by dynamic identifiers (i.e. data capture event foreign keys) that are not known at the time of writing the business logic and also vary project to project.

Question

Is it feasible to enhance the project.rs.xml specification to allow for a query string for individual layers. For example:

<Datasets>
  <Geopackage id="ltpbr_gpkg_01">
    <Name>ltpbr</Name>
    <Path>ltpbr.gpkg</Path>
    <Layers>
      <Vector lyrName="zoi">
        <Name>Zones of influence</Name>
        <query>WHERE event_id = 17</query>
      </Vector>
      <Vector lyrName="complexes">
        <Name>Structure Complex Extents</Name>
        <query>WHERE event_id = 12</query>
      </Vector>
      <Vector lyrName="structure_points">
        <Name>Structure Points</Name>
        <query>WHERE event_id = 12</query>
      </Vector>
      <Vector lyrName="structure_points">
        <Name>Structure Lines</Name>
        <query>WHERE event_id = 13</query>
      </Vector>
    </Layers>
  </Geopackage>
</Datasets>
  • How would this affect the tilerizer?
  • How would this affect Web Viewer?

FYI @KellyMWhitehead @joewheaton