Obj2Tiles icon indicating copy to clipboard operation
Obj2Tiles copied to clipboard

Add ability to specify coordinate system units on a command line

Open andreiveselov opened this issue 2 years ago • 2 comments


First of all, thank you for taking the time to report an issue.

Before you continue, make sure you are in the right place. Please open an issue only to report faults and bugs. For questions and discussion please open a topic on http://community.opendronemap.org/c/opendronemap.

Please use the format below to report bugs and faults.


What is the problem?

We have OBJ meshes created using different coordinate systems. Some are UTM and use meters, some are State Plane coordinate system for US and they might use feet as units. If I ran Obj2Tiles on UTM created meshes and specify center longitude, latitude and altitude, everything is positioned correctly in Cesium. If I do the same with datasets that use feet, data is scaled incorrectly, since feet are used for X,Y,Z offsets and not meters.

I assume I can try to modify transformation matrix by multiplying it with a scale matrix for X,Y,Z, but would we good to have it as a part of a command

What should be the expected behavior?

Ideally, would be good to have ability to specify a unit as part of a command. Maybe have "--u meter" or "--u feet". If no unit is specified, then we can assume meters for backward compatibility.

How can we reproduce this? THIS IS IMPORTANT. What steps did you do to trigger the problem? If this is an issue with processing a model, YOU MUST include a copy of your model uploaded on Google Drive or Dropbox (otherwise we cannot reproduce this) along with the command line parameters you used to process it.

[I would be able to create a sample dataset if needed]

andreiveselov avatar Aug 03 '23 19:08 andreiveselov

@andreiveselov do you know the default input unit currently in Obj2Tiles ? is it inches or meters ?

PerspectivesLab avatar Oct 03 '23 08:10 PerspectivesLab

@andreiveselov do you know the default input unit currently in Obj2Tiles ? is it inches or meters ?

@PerspectivesLab , I believe it assumes that everything is in meters. I have a PR opened for review to allow units scaling: https://github.com/OpenDroneMap/Obj2Tiles/pull/52

andreiveselov avatar Oct 03 '23 16:10 andreiveselov