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

✨ [Feature request] - Handle new ShapeID/PolygonID field in Cliopatria #167

Open
3 tasks
edwardchalstrey1 opened this issue Nov 21, 2024 · 0 comments
Open
3 tasks
Assignees

Comments

@edwardchalstrey1
Copy link

edwardchalstrey1 commented Nov 21, 2024

Description of Improvement

Use the existing ShapeID field in the Cliopatria Django model but update the command script to populate it from Cliopatria instead of the current number increment.

See conversation here: #32 (comment)

cont.

Jim:

Ah slight misunderstanding I think. The Cliopatria releases will look the same as they do now, which means for a polity with a FromYear and ToYear there could be a collection in a MULTIPOLYGON, rather than a row for each individual polygon; anything else will really bloat the release file. So the polygon numbers are assigned by the reading code. Make sense?

Ed:

Ok I’m not sure I understand, are you saying I should generate the polygon numbers myself? The aim here is that we have a way for a Seshat commenter/editor to reference the polygon they think needs to be adjusted, such that you and Jenny/Jakob can know which one they mean.

Jim:

Yes that is correct. Since you generate it within the Seshat application Jenny and Jakob would use those ids for the specific polygons. Since they are ‘local’ to the application they can be anything but our discussion has been about making them legible so people can talk about them and navigate easy. Our own local URL, which would remain constant for simple adjustments but will shift if polygons are added or deleted for a polity in a specific year.

Ed:

I see what you mean, this could be a little fiddly. At the moment, each time I want to upload a new Cliopatria version to the Seshat db, I am dropping everything that was in the Cliopatria table and repopulating it from the new GeoJSON. Currently, I generate PolygonID that is unique to a row in the GeoJSON, regardless of whether the geometry type happens to be Polygon or MultiPolygon. So, I’m not sure there’s a good way to assign a PolygonID for each polygon within a MultiPolygon, however this might not matter.

The real difficulty could come if we wanted to preserve the PolygonID after a Cliopatria edit. With the current system, the PolygonIDs would end up being the same in most cases, but for any polities where the number or size of polygons has been adjusted, you might have a PolygonID that refers to a different Polygon than it did in the previous Cliopatria version. This might not matter much, but it doesn’t feel very neat and could become confusing for editors. What do you think? Happy to discuss on a call if easier.

Dependencies

No response

Technical Notes

No response

Definition of Done

  • The feature has been developed on a feature branch.
  • The feature branch has been tested in the Staging website.
  • A pull request has been created for the feature branch to be merged into the dev branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant