-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Describe the task
Currently, the loc_insurancemaps app has a ResourceBase model that is inherited by the Layer and Document proxy models. Conceptually, this is still something of a holdover from the GeoNode CMS; even though GeoNode's Document and Layer models were replaced with my own here, to ease that transition I mimicked that CMS more closely than is really necessary going forward. In reality, the Layer model offers very little extra functionality over the Document model, so the functional need for these two different proxy models is dubious.
Further, the need to store a separate database instance for a Document alongside a Layer instance (which results directly from the process of georeferencing it, e.g. holds the GeoTIFF) doesn't really hold up under scrutiny. There is no functional reason these two instances can't be combined and reference the original map scan through one field and the resulting GeoTIFF in another field. Thus, each Document/Layer pair can and should ultimately be combined into a single new Resource instance.
Completion criteria
- Create a new Resource model in the
contentapp - Add all necessary methods to support the current needs for Documents and Layers
- Reevaluate all attributes on the existing ResourceBase model
- Add field hold the original image file and a separate one for the GeoTIFF
- Take stock of where in the app existing Layer/Document functionality will need to be updated
- For example,
Volume().layer_lookupandVolume().document_lookupwould now obviously be merged into something likeresource_lookupand the Volume summary will need to handle this new lookup. - For the purposes of this ticket, just a research summary will suffice to complete this step
- For example,
Additional context
Add any other context about the problem here, use #<issue number> to add a reference to a related issue.