README: specify geometry type of API

This commit is contained in:
Jonas Seiler 2025-04-02 09:28:35 +02:00
parent 8cc71f279d
commit 9fab2b0d89

View File

@ -1,9 +1,9 @@
# PTV Street Ressource Task
1. Create a service in dotnet. It has a REST API that serves a resource 'street'. A street can be created and deleted. It has a name, a geometry and a capacity (= how many vehicles can use it within a minute). 1. Create a service in dotnet. It has a REST API that serves a resource 'street'. A street can be created and deleted. It has a name, a geometry and a capacity (= how many vehicles can use it within a minute).
2. The street data is stored in a Postgres database, and we use EF core to save data there. 2. The street data is stored in a Postgres database, and we use EF core to save data there.
3. Implement an endpoint to add a given single point to the geometry of an existing street on either the beginning or the end, whatever fits better. 3. Implement an endpoint to add a given single point to the geometry of an existing street on either the beginning or the end, whatever fits better.
- Bonus: Note that this endpoint has a strange behavior from a user perspective when there are race conditions. Please take care of that in the implementation. - Bonus: Note that this endpoint has a strange behavior from a user perspective when there are race conditions. Please take care of that in the implementation.
4. Add a hidden feature flag to decide whether the operation (in bullet point 3.) is done on the database level, using PostGis, or withing the backend code, algorithmically. 4. Add a hidden feature flag to decide whether the operation (in bullet point 3.) is done on the database level, using PostGis, or withing the backend code, algorithmically.
5. Add a Docker file and a Kubernetes manifest, so we can deploy it as a service with 3 replicas. 5. Add a Docker file and a Kubernetes manifest, so we can deploy it as a service with 3 replicas.
6. Also create a docker compose file, so we can locally check everything. 6. Also create a docker compose file, so we can locally check everything.
@ -22,7 +22,12 @@ The following functions are supported:
{ {
"name": String, "name": String,
"capacity": int, "capacity": int,
"geometry": Geometry "geometry": [
{
"x": int,
"y": int
}
]
} }
``` ```
@ -38,7 +43,12 @@ The following functions are supported:
{ {
"name": String, "name": String,
"capacity": int, "capacity": int,
"geometry": Geometry "geometry": [
{
"x": int,
"y": int
}
]
} }
``` ```
@ -49,7 +59,10 @@ The following functions are supported:
```JSON ```JSON
{ {
"point": Geometry, "point": {
"method": "Backend" | "Database" | "PostGIS" // Optional, default is <> "x": int,
"y": int
},
"method": "Backend" | "Database" | "PostGIS" // Optional, default is "Backend"
} }
``` ```