The view from DataBC Location Services
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- api, documentation
Research direction
No file, test, or entry point is named; start by locating the API guideline document covered by this issue and compare its current sections with the proposed spatial, large-request, tabular-format, and error-handling additions. Done would require an agreed scope and updated guidance, but the issue does not define which proposals are accepted or how they should be integrated.
Written by the indexing model from the issue text.
Description
Overall, a pretty good document. Handling version info in a header is brilliant.
Here are a few proposed additions:
Spatial considerations
Map projection
-
Use an srs parameter to define a map projection in the form of an EPSG code.
-
Support at least the following EPSG codes:
a. 4326 - Geographics (lat,lon in decimal degrees)
b. 3005 - BC Albers
c. 3857 - web mercator (mainly used for map tiles)
d. 32607 - 32611 UTM north zones 7- 11 -
Use a default projection of 4326 (geographics).
Spatial Formats
-
Support geojson for point, line, polygon type geometries. Don't forgot to use the correct MIME type:
application/vnd.geo+json -
Support KML for point, line, polygon type geometries in XML. MIME type is:
application/vnd.google-earth.kml+xml -
Support GML for simple and complex feature schemas in XML. MIME type is:
application/gml+xml -
Use OGC WKT (well known text) for spatial data in columnar formats such as CSV and TSV.
Handling large amounts of data in a GET request
Your API may need to accept large amounts of parameter data in a GET request (e.g., a request for an optimal route involving 1,000 waypoints). In this case, it is acceptable to specify HTTP POST for this purpose even though server state remains unchanged.
Appropriate formats for large tabular results
-
When your API needs to return a very large amount of tabular data (e.g., thousands or millions of rows), consider using CSV or TSV formats.
-
Use lat/lon coordinates or OGC WKT (well known text) for spatial columns in these tabular formats such as CSV and TSV.
Error handling in appropriate formats
-
In addition to issuing the appropriate HTTP response codes, the format of additional error information should reflect the requested output format
a. A request for HTML or XHTML output should return error information in HTML format.
b. A request for KML output should return return error information in KML format.
c. A request for json, geojson, CSV, or TSV output should return an error in JSON format.
-
The Google json error object is useful for JSON error reporting. See:
https://google.github.io/styleguide/jsoncstyleguide.xml?showone=error#error
So, for example, a request for a non-existent siteID and json output will return an HTTP Response code of 404 and the following JSON error object:
{
"apiVersion": "3.4",
"error": {
"code": 404,
"message": "Site Not Found",
}
}
- Dominant language
- No language data
- Stars
- 34
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bcgov/api-guidelines
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bcgov/api-guidelines#34 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
bcgov/api-guidelines#33 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
bcgov/api-guidelines#32 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
bcgov/api-guidelines#31 ·
-
It's Been a While Since This Repository has Been UpdatedMay be free again @jeff-card claimed this 1559 days ago, and no pull request is open. Open
bcgov/api-guidelines#28 · 3 comments · 2 assignees ·
All issues in bcgov/api-guidelines
Similar issues
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
manyfold3d/manyfold#7346 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 6 days
-
Byse new domainOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Gujal00/ResolveURL#1525 ·
Maintainers usually reply within 1 day
-
Serialisation fails with pydantic 2.14: wrap serialisers pass SerializationInfo as index_keyPossibly taken @hugohills-regnosys claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
finos/rune-python-runtime#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100