spiio_onboard v1.0.0
Organisation Schema https://github.com/spiio/spiio-db/blob/master/schemes/org.js
Area Schema https://github.com/spiio/spiio-db/blob/master/schemes/area.js
GeoJson Validator https://www.npmjs.com/package/geojson-validation
Google map services https://github.com/googlemaps/google-maps-services-js
Input example:
{
"organisation": {
"name": "Randers Golf Klub",
"address": {
"street": "Himmelbovej",
"number": "22",
"city": "Randers",
"country": "Denmark",
"postalCode": "8920"
},
"type": "golf"
},
"geojson": { ... }
}
The input file must be archived in the Github geojson repo https://github.com/spiio/geojson The file can be validated with the json editor tool https://jsoneditoronline.org/
Validation
Organisation address is validated and address properties and location is derived.
Basic validation of geojson structure with GeoJson Validator library
Each area should be supplied with proper properties:
Number
AreaType
Species
Soiltype
AreaType must be related to the organisation type.
Numbering(holes) must be correct. Like only one fairway per number.
Species and soiltype is valdated agains the enumeration defined in the mongoose schema https://github.com/spiio/spiio-db/blob/2b0f863004c468e6e993bc3e0424773e2a7d236d/schemes/area.js#L17
After validation the database can be updated:
- create the organisation.
- create areas and link them to the organisation.
2 years ago