Placing images at mapped (x,y,z) positions

Would anyone be able to assist with building some logic around mapping or correlating an x,y,z position associated with an image GeoTag (.xml file) and that of the image file name - so as to pull the images from a locally stored images folder in order to plot in Revit’s 3D view?

The script manipulates the .xml and cleanses the data in a certain way - which I think is going to make the mapping fairly straight forward but I can’t seem to figure out how to finish it off.




@jacob.small

Hi Jacob,

I don’t necessarily want to be tagging you alone as I am sure you have loads to do but wondered if there is a formal way to get more attention to posts?

Thanks

There isn’t; however there are some things you can do to help get more interest. In particular with this post, there isn’t a dataset.

Starting with a blank Revit template and the content available from “load from cloud”, how long would it take you to produce a set of images, the XML file above, and a Revit file with proper coordinate system for the XYZ data? Doing it all manually, I’d put the estimate at 4 hours. This is an investment which would have to happen before any code was written, making this a full workday. Providing some images, an XML, rvt, and the initial DYN would go a long way.

If you get those posted before my work day ends, I’ll have a look later today and see if there is a quick fix.

1 Like

In the TMS-node in GIS2BIM for Dynamo 2.x there is Python code for combining multiple bitmaps to one bitmap.

For the XML. I would suggest to use XPath too read the values. There is a node in GIS2BIM.

If you can post the images and the XML I will try to find some time to make the Pythoncode.

Thanks @jacob.small & @MaartenVroegindeweij for your advice, I have linked here the dynamo graph, but unfortunately the .xml file format is not supported for upload to the forum.

For some more context we are using Cyclone Register 360 to clean and publish pointcloud data from which a revit model is created.

The import of the pointcloud into revit is set origin to internal origin such that the project base point and survey base point are (coincident) set about the same point and in the postion of the UCS as selected in register 360 (Geographically the data is related to no real world origin of a specified projection system - we simply define the 0,0,0 local origin in register 360 according to user preferences but always on the ground floor near main access door to the building).

The pointcloud’s true north definition is set using register360’s basemap/sitemap orthomosaic rectified aerial imagery which offers us some sense of a fairly accurate true north orientation.

Unfortunately I am not permitted to share the revit template we use as this is one of our policies.

Effectively I am trying to place geotagged register360 images within the revit environment as I have not come across a way to export from register360 directly - other than the workaround to be to sift through the folders and files that are exported from TrueView Local and use dynamo to assign the coordinates of the geotags to the corresponding image and then hopefully bulk import the images? SharedData folder and GeoTags.xml have the associated images (SharedData folder) and GeoTags.xml holds the 3D coordinates and image name plus link to the file path.

Importsurveyimages.dyn (35.5 KB)







Is it possible to send the string of the XML-file with the images? I don’t need the template. Otherwise I cannot help you with this.

Change the filename to “file name.csv.txt” and it should upload.

@jacob.small @MaartenVroegindeweij

I hope all is well!

I have made some progress developing logic around this script but it doesn’t quite function the way I am expecting it to.

I repeatedly make sure the order of all the image files and x,y,z point ordinates correspond correctly as per the GeoTags.xml file but have noticed some missing coloured surfaces created by the GeometryColor.BySurfaceColors node. They’re also upside down relative to the XY plane.

The sampling of the image pixels is also very computer resource intensive and exhausts the video graphics card.

I am aware Archilab.net have quite a few nodes that work with image imports but the nodes aren’t available within the dynamo version that ships with Revit2020.

The snapshots cover all of the graph workspace area but the .png of the entire graph is too big to upload.

Not sure if this is as developed as the graph can get but would appreciate any advice.










A few suggestions:
-Use XPath to get data from the XML.
-Do not view the images in 3D in Dynamo. Better to combine them in bitmap in .NET.
-It is possible to reduce to size to 40 mb using .NET.

If you can just send a link with images and an xml I can help you with the code.

Hi @MaartenVroegindeweij

Thank for your response - I am going to have to mark all the images black to safeguard data protection policies but obviously the image file names will remain unaltered, as per the file GeoTags.xml, which should still serve as useful for your testing.

I will have this with you as soon as possible!

Completely understandable - perhaps place a number in the image to ensure things are going to the right location though? Could help save a few headaches while debugging.

1 Like

Hi There,

Apologies for the delayed response!

Here are the images and the GeoTags.xml has been saved as a plain text (.txt) file such that it can be uploaded here.
The image (.jpeg) names match the associated name in the GeoTags file and I have marked each image 1 - 17 as per the top down order in which the image is appended to the file - i.e. as recorded in the field by the surveyor (image marked 1 would be the first image taken on site and so on).


















GeoTags.txt (6.7 KB)

1 Like