crs.json 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {
  2. "$schema": "http://json-schema.org/draft-04/schema#",
  3. "title": "crs",
  4. "description": "a Coordinate Reference System object",
  5. "type": [ "object", "null" ],
  6. "required": [ "type", "properties" ],
  7. "properties": {
  8. "type": { "type": "string" },
  9. "properties": { "type": "object" }
  10. },
  11. "additionalProperties": false,
  12. "oneOf": [
  13. { "$ref": "#/definitions/namedCrs" },
  14. { "$ref": "#/definitions/linkedCrs" }
  15. ],
  16. "definitions": {
  17. "namedCrs": {
  18. "properties": {
  19. "type": { "enum": [ "name" ] },
  20. "properties": {
  21. "required": [ "name" ],
  22. "additionalProperties": false,
  23. "properties": {
  24. "name": {
  25. "type": "string",
  26. "FIXME": "semantic validation necessary"
  27. }
  28. }
  29. }
  30. }
  31. },
  32. "linkObject": {
  33. "type": "object",
  34. "required": [ "href" ],
  35. "properties": {
  36. "href": {
  37. "type": "string",
  38. "format": "uri",
  39. "FIXME": "spec says \"dereferenceable\", cannot enforce that"
  40. },
  41. "type": {
  42. "type": "string",
  43. "description": "Suggested values: proj4, ogjwkt, esriwkt"
  44. }
  45. }
  46. },
  47. "linkedCRS": {
  48. "properties": {
  49. "type": { "enum": [ "link" ] },
  50. "properties": { "$ref": "#/definitions/linkedObject" }
  51. }
  52. }
  53. }
  54. }