archesproject / arches

Arches is a web platform for creating, managing, & visualizing geospatial data. Arches was inspired by the needs of the Cultural Heritage community, particularly the widespread need of organizations to build & manage cultural heritage inventories
GNU Affero General Public License v3.0
216 stars 144 forks source link

Add the ability to style subsets of map data #2336

Closed apeters closed 6 years ago

apeters commented 7 years ago

Task 2.2: Enhanced Map Representation of Resources Arches provides tools for defining how to display resource information on maps. The Map Manager tool allows administrators to define the styling, clustering, and caching of resources, thereby supporting the efficient display of resources as mapping layers. Lincoln and other Arches HER user will wish to extend these capabilities to allow an administrator to display subsets of a single resource model. For example: thematically display only “archaeological resource areas” from the “Areas” resource model as a single overlay; thematically display “conservation areas” from the Areas resource model as another overlay. This task will implement a robust and flexible methodology to support the ability to extract subsets of a resource model and display them as individual overlays that may be styled independently and whose geometries may be used as input for other Arches resource models.

robgaston commented 7 years ago

I'm pretty sure that Arches includes all of the functionality mentioned in this ticket.

I assume then that this ticket is either means to:

  1. document how one can configure a layer such as described, and/or
  2. implement some specific set of layers for use in a specific Arches instance.

I think in either event, it would be helpful to have the target graphs for this exercise settled so that we have a concrete example of resource models to build these layers against, and also very specific examples of what layers we are to create.

dwuthrich commented 7 years ago

We discussed documenting a standard (and generic) way of supporting this requirement. Our initial discussions explored the idea of implementing a view of the resource model in PostGIS that would allow both Tileserver and QGIS to access and render subsets of a resource instances as map layers

robgaston commented 7 years ago

@dwuthrich That makes sense - the approach you described is what I meant by "Arches includes all of the functionality mentioned in this ticket", so it makes sense that this ticket would really be about documenting that approach using specific examples for Lincoln.

Is there a target resource model we should be using for this ticket?

robgaston commented 7 years ago

Here is an example of SQL that (using her-data) filters for just Monument resources of type "Structure" and includes the primary name:

select row_number() over () as gid
    ,mv.*
    -- name node id: 677f303d-09cc-11e7-9aa6-6c4008b05c4c
    ,name_tile.tiledata->>'677f303d-09cc-11e7-9aa6-6c4008b05c4c'as name
from mv_geojson_geoms mv
left join tiles type_tile
    on mv.resourceinstanceid = type_tile.resourceinstanceid
left outer join tiles name_tile
    on mv.resourceinstanceid = name_tile.resourceinstanceid
    -- name type node id: 677f39a8-09cc-11e7-834a-6c4008b05c4c
    -- primary concept id: 866e8d3b-e00a-4559-bf23-dc1812c27e1f
    and name_tile.tiledata->>'677f39a8-09cc-11e7-834a-6c4008b05c4c'
        = '81dd62d2-6701-4195-b74b-8057456bba4b'
-- record type node id: 677f2c0f-09cc-11e7-b412-6c4008b05c4c
-- structure concept id: 3cf28c22-7271-4bd8-a7da-6e6c45ca4c13
where type_tile.tiledata->>'677f2c0f-09cc-11e7-b412-6c4008b05c4c'
    = '3cf28c22-7271-4bd8-a7da-6e6c45ca4c13';

This will be useful in creating views that can be queried using QGIS or TileStache

dwuthrich commented 6 years ago

meets requirements