Git Product home page Git Product logo

up3date'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)

up3date's People

Contributors

bertt avatar konmast3r avatar laurensjn avatar liberostelios avatar sambaas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

up3date's Issues

Batch Import Files

Is there a way to load multiple cityjson files at once using a script. Any method I can use?
Thank you!

"Clean scene" option breaks in Blender 3.x

I have Blender 3.1.2 and the "Up3date-main" add-on is not able to import CityJSON files from 3D BAG

I keep getting the following error:

Python: Traceback (most recent call last):
  File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Up3date-main\__init__.py", line 72, in execute
    return parser.execute()
  File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Up3date-main\core\objects.py", line 138, in execute
    remove_scene_objects()
  File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Up3date-main\core\utils.py", line 21, in remove_scene_objects
    bpy.ops.object.delete()
  File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.delete.poll() failed, context is incorrectD

location: <unknown location>:-1

Add colour menu for semantics

Hi!

Great plugin! I was wondering if you could add a color menu so I could modify the colours in different semantics within the CityJSON file?

Thank you!

Duplicate vertices checker makes export really slow

Using a model with 94.000 vertices, the exporter takes 74 seconds when the exporter checks for duplicate vertices. Without checking, it takes only 1.4 second. That's 70x faster. For bigger models the checker will probably be even worse.

What probably makes it slow is that it checks (1) each coordinate individually if it's already in a list; (2) it does not use any rounding. Another method should be considered that can make it faster, maybe similar to the CJIO remove_duplicate_vertices method (see here). That method also uses some rounding that would make it faster. On the model that is exported without checking for duplicate vertices I tried the CJIO method (with 12 decimals) and it was <1s.

Cant Export .stl to CityJSON

Hello,
I exported a 3D-Mesh from CloudCompare in .stl-format and imported it into blender. After changing geometry to origin I can see my model.

When I try to export it as cityJon I get the following error:
Python: Traceback (most recent call last):
File "C:\Users\felix\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\Up3date-main_init_.py", line 124, in execute
return exporter.execute()
File "C:\Users\felix\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\Up3date-main\core\objects.py", line 362, in execute
CityObject_id,object_verts,object_faces = self.create_mesh_structure(city_object,objid,init_json)
File "C:\Users\felix\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\Up3date-main\core\objects.py", line 276, in create_mesh_structure
print ("You either forgot to add lod as a custom property of the geometry, ", name, ", or 'lod' is not a number")
NameError: name 'name' is not defined

I already added lod as custom property but it is not working.

Can't export my blender model to .CityJSON

Hi Guys,

So i am working with Blender and trying to export it to .CityJSON.

At the moment i get this issue when i try to export my model.
I'm not the best at coding, tried looking at with by doing my own research and could not find a fix.
Could anybody help me or help me identify the issue?

image

Export only selection

I am wondering if Up3date can export only selected object since I notice that the plugin work slower when export a lot of objects

Cannot view CityJSON file

Hello,

I am trying to view my CityJSON data file in blender using Up3date plug in, I have made some validation schemas and validation on geometry but my data cannot be visualize, some error have been appear as shown below

1
2
image

Am I missing any steps? or anything i have to change on my CityJSON file?

Support

Hi,
thanks for this great plugin.
I´ve got one problem and one support question.

my problem:
We are working with FME and FME can not read the CityJSON, the plugin is exporting.
The problem seems to that the values of semantics are in an inner array and an empty texture object exists.

does not working:
`"semantics":{
"surfaces":[
{
"type":"GroundSurface"
},
{
"type":"WallSurface"
},
{
"type":"RoofSurface"
}
],
"values":[
[ 0,
2,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1 ]
]
},
"texture":{

           },`

still working:
"semantics":{ "surfaces":[ { "type":"GroundSurface" }, { "type":"WallSurface" }, { "type":"RoofSurface" } ], "values":[ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] },
so i´ve changed and everything is working fine
#init_json["CityObjects"][CityObject_id]['geometry'].append({'type':city_object['type'],'boundaries':[],'semantics':{'surfaces': [], 'values': [[]]},'texture':{},'lod':city_object['lod']}) init_json["CityObjects"][CityObject_id]['geometry'].append({'type':city_object['type'],'boundaries':[],'semantics':{'surfaces': [], 'values': []},'lod':city_object['lod']})

So is that a general issue or is that only a problem of FME?

Support question:
Are you still working on the possibility to im- and export objects with textures?

best regards
Tim

(Installation Workflow) Package doesn't import in Blender 3.3.7 LTS

By default, the following the current installation instructions simply leads to a paste of the contents of this repo inside the user-storage addons folder, which is not ideal for organising addons. If you have cloned the repo elsewhere, it won't even copy all the contents, just the __init__.py script.

If one decides to clone the repository (which should be the best way to use this fantastic project), the ideal way is to do so directly in the addons folder location. For Windows users, it's C:\Users\<USERNAME>\AppData\Roaming\Blender Foundation\Blender\<MAJOR_VERSION>.<MINOR_VERSION>\scripts\addons.

How to recover the original coordinates

It seems that the plugin (master branch) centers the objects around 0,0,0. I have a coordinate in the citymodel's original coordinate system which I want to locate in the model, how can I do that?

Using LOD subversion numbers problem in CityJSON output

Using LOD subversions gives a problem in the json output.
It looks like the part of the name is not stripped out properly (The two extra characters for the decimal character seem to be ignored when removing the '[LOD2.1]' part of the name.

{
    "type": "CityJSON",
    "version": "1.0",
    "metadata": {
        "geographicalExtent": [121578.775, 486020.60199999996, -4.7540000000000004, 121966.761, 486232.568, 309.487]
    },
    "CityObjects": {
        "] Cube": {
            "geometry": [{
                    "type": "MultiSurface",
                    "boundaries": [[[0, 1, 2, 3]], [[3, 2, 4, 5]], [[5, 4, 6, 7]], [[7, 6, 1, 0]], [[3, 5, 7, 0]], [[4, 2, 1, 6]]],
                    "lod": 2
                }
            ]
        },
        "Cube": {
            "geometry": [],
            "type": "Building"
        }
    },
    "vertices": [[236940.0, 60919.0, 163194.0], [236940.0, 60919.0, 314241.0], [236940.0, 211966.0, 314241.0], [236940.0, 211966.0, 163194.0], [387986.0, 211966.0, 314241.0], [387986.0, 211966.0, 163194.0], [387986.0, 60919.0, 314241.0], [387986.0, 60919.0, 163194.0]],
    "transform": {
        "scale": [0.001, 0.001, 0.001],
        "translate": [121578.775, 486020.60199999996, -4.7540000000000004]
    }
}

Each face in multisurface gets assigned new semantic surface (material)

When using the export function, a new semantic material is assigned for each surface in a multisurface. This slows down exports a lot for triangulated surfaces.

Semantic surfaces should only be create once, with afterwards an element values that is an indexed list to the geometry boundaries:

image

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.