https://github.com/cityjson/restful_demo
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.5%) to scientific vocabulary
Keywords from Contributors
Repository
Basic Info
- Host: GitHub
- Owner: cityjson
- Language: Python
- Default Branch: master
- Size: 11 MB
Statistics
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 3
- Releases: 0
Metadata Files
README.md
CityJSON + RESTful access + streaming
This is a small demo implementation of the streaming capabilities of CityJSON v1.1.
It's a simple RESTful access to a few CityJSON files, implemented with a Flask server. cjio must be installed too to be run (v0.8+).
Demo
In /demo/ the code of the server is there.
There are a few CityJSON datasets in one folder, and then the behaviour of pygeoapi has been more or less copied.
It's not finished (OpenAPI and conformance are TODO), but it works and shows the idea are implementable.
-->demo is hosted online for a few users (if 1000s of you go there at the same time it might not work 😬)
Streaming
The same hack as used by everyone: Line-delimited JSON: one JSON object per line, that is separated by a CR. There's a standard for it too: https://tools.ietf.org/html/rfc7464
Called GeoJSON Text Sequences also.
In the demo, if you add /stream after a collection, you get a stream of CityJSONFeature (type is json-seq), with the first line containing the metadata and other data useful for the whole data (cjio myfile.city.json export --format jsonl is used):
http://cityjson.pythonanywhere.com/collections/tudelft/stream/
Demo online
To run locally
Watch out, cjio must use v0.8+ otherwise nothing will work
bash
$ env FLASK_APP=app.py flask run
In debug mode:
bash
$ env FLASK_APP=app.py FLASK_ENV=development flask run
API examples
/collections/-> HTML/JSON of all datasets/collections/{mycollection}/-> overview of dataset (metadata [bbox, CRS], version CityJSON, extensions)/collections/{mycollection}/items/-> a CityJSON object/collections/{mycollection}/items/{featureID}/-> one CityJSONFeature (which can contain sub-parts, likeBuildingPart)
If many Features must be returned, like all objects inside a bbox, then a CityJSON is returned (equivalent to a FeatureCollection.
Some examples of URL queries
http://localhost:5000/collections/tudelft/items/?limit=5&offset=10
http://localhost:5000/collections/tudelft/stream/
http://localhost:5000/collections/tudelft/items/?f=json
http://localhost:5000/collections/tudelft/items/?bbox=1.2,44.9,55.0,1909.1
Owner
- Name: CityJSON
- Login: cityjson
- Kind: organization
- Website: https://cityjson.org
- Repositories: 14
- Profile: https://github.com/cityjson
For all CityJSON matters. Managed by @tudelft3d
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Hugo Ledoux | h****x@t****l | 53 |
| jliempt | 3****t | 35 |
| dependabot[bot] | 4****] | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 1
- Total pull requests: 6
- Average time to close issues: N/A
- Average time to close pull requests: about 2 months
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 6.0
- Average comments per pull request: 0.33
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 5
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- GANys (1)
Pull Request Authors
- dependabot[bot] (5)
- cynthiacai56 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Flask ==1.0.2
- Jinja2 >=2.10.1
- MarkupSafe ==1.0
- Werkzeug ==0.15.3
- cjio ==0.5.5
- click ==6.7
- itsdangerous ==0.24