Git Product home page Git Product logo

cjvalpy's Introduction

CityJSON

GitHub tag (latest SemVer) GitHub license

This repository is where the specifications and the schemas of CityJSON are kept. All previous versions are kept in tags in the commits.

For all the details, see the official CityJSON website: https://cityjson.org.

What is CityJSON?

CityJSON is a JSON-based encoding for a subset of the OGC CityGML data model (version 3.0.0), which is an open standardised data model and exchange format (in GML) to store digital 3D models of cities and landscapes.

The aim of CityJSON is to offer an alternative to the GML encoding of CityGML, which can be verbose and complex (and thus rather frustrating to work with). CityJSON aims at being easy-to-use, both for reading datasets, and for creating them. It was designed with programmers in mind, so that tools and APIs supporting it can be quickly built, and several software have been created already.

Contributing to the project

We invite anyone to contribute to the development and improvement of CityJSON, all discussions, issues, and developments are open to everyone.

If you use CityJSON in an academic context, please cite this article

Ledoux H, Arroyo Ohori K, Kumar K, Dukai B, Labetski A, Vitalis S (2019). CityJSON: A compact and easy-to-use encoding of the CityGML data model. Open Geospatial Data, Software and Standards, 4:4 (DOI) (PDF)

cjvalpy's People

Contributors

ewouth avatar hugoledoux avatar

Watchers

 avatar  avatar

Forkers

ewouth hugoledoux

cjvalpy's Issues

Error: 'CJValidator' object has no attribute 'get_report' both in shell and python code

steps

pip install cjvalpy cjio
!curl -LC - https://www.cityjson.org/tutorials/files/twobuildings.city.json -o two_buildings.city.json

execute
!cjio two_buildings.city.json validate

result from shell

Parsing two_buildings.city.json
Validation (with official CityJSON schemas)
Error: 'CJValidator' object has no attribute 'get_report'

code

import cjvalpy
import json
import urllib.request

f = open("two_buildings.city.json")
fj = json.loads(f.read())
js = []
js.append(json.dumps(fj))
print("Downloading the Extension JSON schema file(s):")
if "extensions" in fj:
    for ext in fj["extensions"]:
        theurl = fj["extensions"][ext]["url"]
        try:
            with urllib.request.urlopen(fj["extensions"][ext]["url"]) as f:
                sf = f.read().decode('utf-8')
                js.append(sf)
        except:
            s = "'%s' cannot be downloaded\nAbort" % fj["extensions"][ext]["url"]
            raise Exception(s)
val = cjvalpy.CJValidator(js)
val.validate()
re = val.get_report()
print(val.get_report())

code result

AttributeError                            Traceback (most recent call last)
[<ipython-input-24-a3532499301e>](https://localhost:8080/#) in <cell line: 22>()
     20 val = cjvalpy.CJValidator(js)
     21 val.validate()
---> 22 re = val.get_report()
     23 print(val.get_report())

AttributeError: 'CJValidator' object has no attribute 'get_report'

best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.