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

[SCT-Workflow]: Create new POST, PUT, GET, DELETE for "/shoreline" #172

Closed
8 tasks done
trietmnj opened this issue Feb 6, 2025 · 4 comments
Closed
8 tasks done
Assignees

Comments

@trietmnj
Copy link
Contributor

trietmnj commented Feb 6, 2025

  • create POST shoreline endpoint
  • create POST shorelines endpoint
  • create PUT shoreline endpoint
  • create GET shorelines endpoint
  • create DELETE shoreline endpoint
  • create DELETE shorelines endpoint
  • edit swagger docs
  • append po_statement POST and PUT to take a shoreline reference in body param
@trietmnj trietmnj self-assigned this Feb 6, 2025
@trietmnj trietmnj added this to the SCT-Workflow Sprint 3 milestone Feb 7, 2025
@trietmnj
Copy link
Contributor Author

trietmnj commented Feb 7, 2025

Using (project_id, code) as the unique key. These two fields are mandatory, plus the geometry.

@trietmnj
Copy link
Contributor Author

trietmnj commented Feb 7, 2025

Example shorelines shapefile.

CharlestonShorelines.zip

@trietmnj
Copy link
Contributor Author

Similar to reaches, the id for each shoreline is obtainable through the GeoJSON properties on GET shorelines

@trietmnj
Copy link
Contributor Author

e.g. POST and PUT shoreline body

{
  "type": "Feature",
  "properties": {
    "code": "Updated CODE",
    "name": "Updated This is my name",
    "category": "Updated This is my category",
    "otherCategory": "Updated This is my other category",
    "type": "Updated This is my type",
    "otherType": "Updated This is my other type",
    "waveClimate": "Updated This is my waveClimate",
    "otherWaveClimate": "Updated This is my other waveClimate",
    "shorelineLength": 333,
    "erosion": true,
    "waterBody": "Updated Pacific",
    "scs": [
        "GEOJSON scs1",
        "Updated scs2",
        "GEOJSON scs3"
    ]
  },
  "geometry": {
    "type": "LineString",
    "coordinates": [
        [
        12.478129652015241,
        41.9022826549635
        ],
        [
        12.478129652015241,
        41.90136017129154
        ],
        [
        12.479303348926749,
        41.90136017129154
        ],
        [
        12.479303348926749,
        41.9022826549635
        ],
        [
        12.478129652015241,
        41.9022826549635
        ]
    ]
  }
}

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

No branches or pull requests

2 participants