Giter Club home page Giter Club logo

measur3d's Introduction

Measur3D logo

Measur3D

A light and compact CityJSON management tool.

This tool is built as a high-level MERN application. It therefore allows developing with a single language in both server and client side. It does not rely on an operating system layer.

3D city models are structured following the CityJSON encoding, a JSON-based encoding for storing 3D city models, also called digital maquettes or digital twins. Thanks to MongooseJS, inserted models are validated in regard of CityJSON 1.0.1 specifications. These specifications define the city model schema used to structure the database (several modifications were however made to suit to document-oriented databases).

Prerequisites

A MongoDB server is mandatory. The choice between MongoDB Atlas, Community or Enterprise Server is left open.

Everything else is packaged in this repository and installed thanks to npm.

Installing

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Setup the project :

npm install

Compiles and minifies for production :

npm run build

Run a local host :

npm start

By default, the application is deployed on localhost:3000 .

Documentation

Documentations of the Measur3D API and the OGCAPIF can be found in the API-DOCS file (Open API 3.0).

Built With

  • MongoDB - A cross-platform document-oriented database
  • ExpressJS - A fast, unopinionated, minimalist web framework for Node.js
  • ReactJS - A JavaScript library for building user interfaces
  • Node.js - An open-source, cross-platform, JavaScript runtime environment
  • Three.js - A cross-browser JavaScript library to display 3D objects in web browser
  • Mongoose - An elegant mongodb object modeling for node.js

News in v0.3.0

The v0.3.0 of Measur3D came with several improvements :

  • Delete Object/Model from database and client
  • Visualisation: improved UI, highlight of selected object and support of holes in geometries
  • OGC API - Features compliant-ish (Thank to Hugo Ledoux for its insight and the CityJSONFeature object - cityjson_ogcapi)
  • GeometryInstance and GeometryTemplates support
  • Security layers: rateLimiter, cache, DDOS, ...
  • Swagger documentation (OpenAPI 3.0)

News in v0.2.0

Public release

Acknowledgments

The management of the 3D meshes is based on the Ninja viewer and its features. This tool is developed under the supervision of Hugo Ledoux by the GeoInformation research Group from TUDelft.

Authors

  • Gilles-Antoine Nys - Idea and development - Twitter

This project is part of the PhD Thesis of GANys under the supervision of Prof. Roland Billen - Geomatics Unit, University of Liège, Belgium. It is also part of the SIG3.0 project funded by the National Fund for Scientific Research, Belgium.

UGeom logo

License

This project is licensed under the Apache License - see the LICENSE.md file for details.

If you use Measur3D or the simplified database schema in a scientific context, please cite this article:

Nys G.-A. and Billen R. (2021). From consistency to flexibility: A simplified database schema for the management of CityJSON 3D city models. Transactions in GIS.

@article{nys_consistency_2021,
	title = {From consistency to flexibility: {A} simplified database schema for the management of {CityJSON} {3D} city models},
	doi = {10.1111/tgis.12807},
	urldate = {2021-08-16},
	journal = {Transactions in GIS},
	author = {Nys, Gilles-Antoine and Billen, Roland},
	month = jul,
	year = {2021},
}

measur3d's People

Contributors

ganys avatar dependabot[bot] avatar

Stargazers

Sourabh Soni avatar F Rehmann avatar atamort avatar Taimur Khan avatar Camilo Leon-Sanchez avatar Anass Yarroudh avatar  avatar  avatar Balázs Dukai avatar Peter El Hajj avatar  avatar Anton Popov avatar  avatar Abderrazzaq KHARROUBI  avatar Zhihang Yao avatar Antonio Sutera avatar

Watchers

Camilo Leon-Sanchez avatar  avatar

measur3d's Issues

Should be possible to delete objects

Request of HugoLedoux

It should be possible to delete objects in the viewer and do it in parallel in the DB.

For parent/child relationships:

If object has children: delete children also.
If object has parent: do nothing on parent.
If obejct is part of a CityObjectGroup and is last object in group: delete CityObjectGroup.
If object is part of a CityObjectGroup and group is not empty: do nothing.

Impossible to load mdoel into Measur3D

Hi!

I am looking to develop a pipeline to upload, modify and procedurally recompute cityJSON models.
Measur3D looks interesting to bootstrap my project. However I've not been able to load a model into it.

I started up Measur3D but wasn't able to load even a simple example model, the twobuildings.city.json.
I uploaded twobuildings.city.json into cityJSON ninja and it worked fine.

I get error logs from Measur3D but they aren't useful to understand the source of the problem.
Below are the logs from the node.js backend server when I start it up and only try to "import new file" the twobuildings.city.json:

Do you know what's up? and how I could fix it?

Thanks a lot!

The logs:

Measur3D$ npm run start

> [email protected] start /home/dddpt/Documents/historicalCityJSON/Measur3D
> concurrently "cd backend && node server.js" "cd client && npm start"

[1] 
[1] > [email protected] start /home/dddpt/Documents/historicalCityJSON/Measur3D/client
[1] > react-scripts start
[1] 
[0] (node:28394) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
[0] (Use `node --trace-warnings ...` to show where the warning was created)
[0] (node:28394) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
[0] (node:28394) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
[0] (node:28394) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
[0] LISTENING ON PORT 3001
[0] Connected to server 127.0.0.1:27017/citymodel with success.
[1] ℹ 「wds」: Project is running at http://0.0.0.0:3000/
[1] ℹ 「wds」: webpack output is served from 
[1] ℹ 「wds」: Content not from webpack is served from /home/dddpt/Documents/historicalCityJSON/Measur3D/client/public
[1] ℹ 「wds」: 404s will fallback to /
[1] Starting the development server...
[1] 
[1] Browserslist: caniuse-lite is outdated. Please run:
[1] npx browserslist@latest --update-db
[1] 
[1] Why you should do it regularly:
[1] https://github.com/browserslist/browserslist#browsers-data-updating
[1] Compiled successfully!
[1] 
[1] You can now view Measur3D_frontend in the browser.
[1] 
[1]   http://localhost:3000
[1] 
[1] Note that the development build is not optimized.
[1] To create a production build, use npm run build.
[1] 
[0] Can't extract geo keys: { _id: ObjectId('6384a2aeca80ed6eea7794c0'), location: { coordinates: [ [ [ 300578.235, 5041270.864999999 ], [ 300578.235, 5041289.393999999 ], [ 300598.401, 5041289.393999999 ], [ 300598.401, 5041270.864999999 ], [ 300578.235, 5041270.864999999 ] ] ], type: "Polygon" }, type: "Building", geometry: [ "6384a2aeca80ed6eea7794bd" ], spatialIndex: false, vertices: [ [ 19211, 19441, 0 ], [ 17245, 14582, 0 ], [ 16068, 15059, 0 ], [ 20166, 25185, 0 ], [ 18034, 19918, 0 ], [ 9831, 29283, 0 ], [ 8944, 16499, 0 ], [ 15156, 12804, 0 ], [ 5482, 17965, 0 ], [ 4403, 31333, 0 ], [ 0, 20015, 0 ], [ 4403, 31333, 14494 ], [ 4338, 31167, 13252 ], [ 4338, 31167, 14494 ], [ 0, 20015, 13252 ], [ 9831, 29283, 14494 ], [ 20166, 25185, 13252 ], [ 13671, 27760, 13252 ], [ 13671, 27760, 14494 ], [ 15156, 12804, 13252 ], [ 18034, 19918, 12747 ], [ 16068, 15059, 12747 ], [ 17245, 14582, 12462 ], [ 19211, 19441, 12444 ], [ 8944, 16499, 13252 ], [ 5482, 17965, 13252 ], [ 12313, 22218, 13252 ], [ 11229, 19602, 13252 ], [ 11229, 19602, 14469 ], [ 12313, 22218, 15152 ], [ 13264, 24729, 14469 ], [ 13264, 24729, 13252 ], [ 9769, 29122, 14494 ], [ 9769, 29122, 13252 ], [ 13593, 27596, 14494 ], [ 13593, 27596, 13252 ], [ 10099, 28352, 13885 ], [ 10099, 28352, 13252 ], [ 9539, 28524, 13885 ], [ 9539, 28524, 13252 ], [ 8646, 22157, 13885 ], [ 7855, 22489, 13885 ], [ 7855, 22489, 13252 ], [ 8646, 22157, 13252 ], [ 9173, 23630, 13252 ], [ 9173, 23630, 13885 ], [ 8382, 23962, 13885 ], [ 8382, 23962, 13252 ], [ 6358, 18288, 13885 ], [ 5712, 18565, 13885 ], [ 5712, 18565, 13252 ], [ 6358, 18288, 13252 ], [ 16385, 17555, 14469 ], [ 16385, 17555, 13252 ], [ 18420, 22682, 14469 ], [ 18420, 22682, 13252 ], [ 17440, 20213, 15152 ] ], __t: "Building", geographicalExtent: [ 300578.235, 5041270.864999999, 13.688, 300598.401, 5041289.393999999, 28.84 ], transform: { scale: [ 0.001, 0.001, 0.001 ], translate: [ 300578.235, 5041258.061, 13.688 ] }, name: "twobuildings_Building_1", children: [], parents: [], CityModel: "twobuildings", __v: 0 }  longitude/latitude is out of bounds, lng: 300578 lat: 5.04127e+06
[0] Can't extract geo keys: { _id: ObjectId('6384a2aeca80ed6eea7794c1'), location: { coordinates: [ [ [ 300604.451, 5041258.061 ], [ 300604.451, 5041272.408 ], [ 300618.138, 5041272.408 ], [ 300618.138, 5041258.061 ], [ 300604.451, 5041258.061 ] ] ], type: "Polygon" }, type: "Building", geometry: [ "6384a2aeca80ed6eea7794be" ], spatialIndex: false, vertices: [ [ 39903, 11453, 2794 ], [ 35253, 0, 2794 ], [ 34792, 12604, 2794 ], [ 30547, 1946, 2794 ], [ 26216, 3965, 2794 ], [ 30437, 14347, 2794 ], [ 36641, 12768, 2794 ], [ 35123, 13399, 2794 ], [ 31584, 1450, 2794 ], [ 31011, 9397, 12359 ], [ 30662, 9548, 11975 ], [ 29940, 9860, 12359 ], [ 29940, 9860, 11163 ], [ 35848, 3916, 12279 ], [ 35848, 3915, 12278 ], [ 35848, 3916, 10927 ], [ 35848, 3915, 10926 ], [ 31054, 12948, 12234 ], [ 31054, 12948, 10993 ], [ 31053, 12947, 12233 ], [ 31053, 12947, 10992 ], [ 35075, 3551, 11502 ], [ 34758, 4112, 11994 ], [ 35075, 3551, 11496 ], [ 38175, 10016, 12379 ], [ 38175, 10018, 11068 ], [ 38175, 10018, 12381 ], [ 38175, 10016, 11067 ], [ 29144, 9506, 10542 ], [ 29142, 9506, 11498 ], [ 29142, 9506, 10540 ], [ 29940, 9858, 12357 ], [ 29144, 9506, 11497 ], [ 29940, 9858, 12360 ], [ 35896, 3208, 11498 ], [ 35847, 3915, 12277 ], [ 35896, 3210, 11497 ], [ 35847, 3915, 12281 ], [ 35896, 3208, 10622 ], [ 35896, 3210, 10623 ], [ 35544, 4683, 11496 ], [ 35544, 4683, 11485 ], [ 34780, 4493, 12114 ], [ 31053, 12946, 12232 ], [ 30306, 12519, 11498 ], [ 30308, 12520, 11497 ], [ 31053, 12946, 12235 ], [ 30306, 12519, 10462 ], [ 30308, 12520, 10463 ], [ 28977, 7536, 12286 ], [ 28975, 7541, 12281 ], [ 28977, 7536, 11160 ], [ 28975, 7541, 11156 ], [ 37014, 6955, 12269 ], [ 37013, 6960, 10993 ], [ 37013, 6960, 12274 ], [ 37014, 6955, 10990 ], [ 38348, 9208, 11498 ], [ 38174, 10015, 12377 ], [ 38347, 9211, 11496 ], [ 38174, 10015, 12383 ], [ 38348, 9208, 10615 ], [ 38347, 9211, 10617 ], [ 28089, 5212, 12279 ], [ 28083, 5223, 12268 ], [ 28089, 5212, 11229 ], [ 28083, 5223, 11219 ], [ 36296, 6544, 11503 ], [ 35895, 7269, 12117 ], [ 36296, 6544, 11488 ], [ 35804, 7434, 12274 ], [ 35804, 7434, 12261 ], [ 36768, 7673, 11493 ], [ 36768, 7673, 11477 ], [ 35913, 7468, 12175 ], [ 35792, 7440, 12274 ], [ 35792, 7440, 12287 ], [ 37994, 10685, 11497 ], [ 37994, 10685, 11477 ], [ 36945, 10527, 12367 ], [ 36945, 10527, 12385 ], [ 37529, 9553, 11500 ], [ 36948, 10525, 12381 ], [ 36948, 10525, 12363 ], [ 37529, 9553, 11481 ], [ 37134, 6196, 11498 ], [ 37010, 6952, 12264 ], [ 37133, 6205, 11492 ], [ 37010, 6952, 12281 ], [ 37134, 6196, 10603 ], [ 37133, 6205, 10608 ], [ 28979, 7543, 12277 ], [ 28638, 8384, 11492 ], [ 28635, 8393, 11498 ], [ 28979, 7543, 12292 ], [ 28638, 8384, 10502 ], [ 28635, 8393, 10495 ], [ 32141, 12473, 12192 ], [ 31233, 12121, 11503 ], [ 31233, 12121, 11487 ], [ 32141, 12473, 12234 ], [ 32146, 12473, 12238 ], [ 32146, 12473, 12197 ], [ 31683, 13262, 11496 ], [ 31683, 13262, 11454 ], [ 28094, 5227, 12259 ], [ 27685, 6031, 11486 ], [ 27674, 6053, 11498 ], [ 28094, 5227, 12292 ], [ 27685, 6031, 10520 ], [ 27674, 6053, 10501 ], [ 35549, 3354, 10990 ], [ 36374, 4339, 11501 ], [ 36374, 4339, 10607 ], [ 35662, 4635, 11358 ], [ 38825, 10339, 11500 ], [ 38825, 10339, 10599 ], [ 37614, 7332, 11505 ], [ 37614, 7332, 10587 ], [ 30462, 10275, 11497 ], [ 29620, 10636, 10551 ], [ 29620, 10636, 11500 ], [ 29997, 9141, 11501 ], [ 28578, 5686, 11509 ], [ 29536, 8019, 11504 ], [ 28091, 4563, 11487 ], [ 27192, 4909, 11511 ], [ 27192, 4909, 10492 ], [ 29059, 6892, 11493 ], [ 28155, 7258, 11504 ], [ 28155, 7258, 10485 ], [ 30527, 12425, 10710 ], [ 30784, 13650, 11501 ], [ 30784, 13650, 10464 ], [ 30662, 9549, 11974 ], [ 29941, 9861, 12362 ], [ 29941, 9861, 11163 ], [ 31014, 9397, 12362 ], [ 31055, 12950, 12238 ], [ 31055, 12950, 10993 ], [ 37611, 7324, 11498 ], [ 37611, 7324, 10587 ], [ 37014, 6961, 12287 ], [ 37014, 6961, 10993 ], [ 30783, 13647, 11498 ], [ 30783, 13647, 10464 ], [ 29939, 9859, 12358 ], [ 29619, 10634, 11498 ], [ 29939, 9859, 11162 ], [ 29619, 10634, 10550 ], [ 28158, 7265, 11498 ], [ 28158, 7265, 10484 ], [ 28976, 7535, 12298 ], [ 28976, 7535, 11160 ], [ 30976, 2842, 14923 ], [ 30547, 1946, 14707 ], [ 30547, 1946, 15762 ], [ 30976, 2842, 15762 ], [ 27197, 4925, 11498 ], [ 27197, 4925, 10491 ], [ 28088, 5211, 12305 ], [ 28088, 5211, 11229 ], [ 36373, 4336, 11498 ], [ 36373, 4336, 10607 ], [ 38824, 10336, 11498 ], [ 38824, 10336, 10599 ], [ 30501, 12980, 10466 ], [ 36641, 12768, 15263 ], [ 36310, 11972, 15263 ], [ 36641, 12768, 13471 ], [ 36310, 11972, 13471 ], [ 32013, 2346, 15762 ], [ 32013, 2346, 13857 ], [ 34792, 12604, 15263 ], [ 35008, 12514, 14923 ], [ 34792, 12604, 14605 ], [ 31584, 1450, 13857 ], [ 31584, 1450, 15762 ], [ 35123, 13399, 15263 ], [ 35253, 0, 10024 ], [ 26216, 3965, 9933 ], [ 39903, 11453, 10035 ], [ 30437, 14347, 9865 ], [ 35608, 4017, 11181 ], [ 34574, 4440, 12284 ], [ 35607, 4015, 11180 ], [ 34577, 4436, 12279 ], [ 35906, 7395, 12153 ], [ 35906, 7394, 12153 ], [ 35848, 3918, 10927 ], [ 38175, 10018, 12385 ], [ 35848, 3918, 12284 ], [ 30001, 7131, 12298 ], [ 29067, 4855, 12305 ], [ 29990, 7136, 12286 ], [ 29044, 4864, 12279 ], [ 30673, 9315, 12077 ], [ 30641, 9987, 11782 ] ], __t: "Building", geographicalExtent: [ 300604.451, 5041258.061, 16.482, 300618.138, 5041272.408, 29.45 ], transform: { scale: [ 0.001, 0.001, 0.001 ], translate: [ 300578.235, 5041258.061, 13.688 ] }, name: "twobuildings_Building_2", children: [], parents: [], CityModel: "twobuildings", __v: 0 }  longitude/latitude is out of bounds, lng: 300604 lat: 5.04126e+06
[0] (node:28394) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'geometry' of null
[0]     at /home/dddpt/Documents/historicalCityJSON/Measur3D/backend/routes/measur3d.js:231:56
[0]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
[0] (node:28394) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[0] (node:28394) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Should be possible to pick models on loading

The app currently loads all models in bulk on startup, which works oddly for multiple models.

It should be possible to pick the wanted model -> Modal window for model picking?

Remanent meshes if several models are loaded

It looks like some meshes remain after the rendering of a scene consequently of the 0.2.1 CityPicker update.

Works oddly as the cache is empty and scene.children is null.

Solutions tried withotu success :
Array.filter
Array.splice
scene.remove
children = []
Removing all console.log in order to let GC cleaning things
Dispose related Material/Geometry to free memory and let GC cleaning things

Unique working way in prod : F5

Asynchronous upload of objects

Currently, objects are uploaded synchronously.

An asynchronous management could greatly improve uploading models from an API viewpoint. Database is still attacked equally.

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.