Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Military Symbols in narratives #94

Closed
3 tasks
MiklerGM opened this issue Mar 20, 2019 · 11 comments · Fixed by #155
Closed
3 tasks

Military Symbols in narratives #94

MiklerGM opened this issue Mar 20, 2019 · 11 comments · Fixed by #155

Comments

@MiklerGM
Copy link
Contributor

MiklerGM commented Mar 20, 2019

Expand narratives by adding new layer of data with additional information about troops and their movements.

Initial proposal:

  • Expeditions and paths
  • Arrows for armies movements
  • Front lines

Additional wish list (feel free to add more in comments)

  • Units icons
  • HQ position
  • ...
@MiklerGM
Copy link
Contributor Author

MiklerGM commented Apr 19, 2019

For army movements we could do the GeoJSON features in shape of arrow with filled with color

For expeditions in can be the line or multiline with dashed-stroke. Probably with text along the path.

I would propose to add field to store GeoJSON with styled elements,

@quorth0n
Copy link
Member

quorth0n commented May 3, 2019

So, for this ticket we should add blank/null columns in the narration table for:

  • army movements
  • expeditions
  • HQ/units

and anything else?

@MiklerGM
Copy link
Contributor Author

MiklerGM commented May 4, 2019

I think everything can be stored in a single GeoJSON field with multiple classes inside.

@quorth0n
Copy link
Member

quorth0n commented May 4, 2019

Okay, let's go with a GeometryCollection field then

@MiklerGM
Copy link
Contributor Author

MiklerGM commented May 4, 2019

Are you sure we can add any parameters to GeometryCollection?
Probably not, because it's PostGis, and to form proper GeoJSON you are usually using all columns from the table, not only the geometry one.
https://postgis.net/workshops/postgis-intro/geometries.html

@MiklerGM
Copy link
Contributor Author

MiklerGM commented May 5, 2019

Or we can add a table for One to Many relations. From Narration to Symbols.

In this case, columns that needed are like
narration_id*, geometry_collection*, sprite, type*, label*, fill_color, stroke_color, ..., options

If you want to do in RDB way we need to describe a style for every feature layer before we got further.

@quorth0n
Copy link
Member

quorth0n commented May 5, 2019

I was thinking about an o2m relation, that might be a cleaner option. Or, maybe we could consider storing the collections in a JSONField, and validate it through a DRF serializer.

The simplestyle spec outlines these parameters for geojson styles:

"stroke": "#555555",
"stroke-opacity": 1.0,
"stroke-width": 2,
"fill": "#555555",
"fill-opacity": 0.5

@MiklerGM
Copy link
Contributor Author

MiklerGM commented May 5, 2019

We also need type* and sprite options.

  • type or class is needed for me to determine which style to apply. I can use one MVT or GeoJSON as a source for multiple layers with different decorations.
  • Sprite-name for special icons in our sprite files. (optional)
    As Abraxis mentioned on discord, we probably need some fancy lines and it can be done by using paint-line-pattern and sprite images
    img

@quorth0n
Copy link
Member

quorth0n commented May 7, 2019

We have agreed on Slack to store all extra geometries in a JSONField containing a FeatureCollection. This is to ensure geometries' properties are preserved. Serialization in the API should confirm geometries are stored in this new field.

@quorth0n quorth0n self-assigned this Jun 5, 2019
@quorth0n
Copy link
Member

quorth0n commented Jun 6, 2019

Maybe it would make sense to store some symbols in the global narrative? For example front lines, I can imagine this being of use to multiple narratives. Then we can have a Narration > Symbol m2m relationship in the db.

@MiklerGM
Copy link
Contributor Author

adsfgsadgWDEWGGWGw.zip
Example shapefile for testing testing additional borders in narratives
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants