Hello, I am having some trouble importing a block into Context Capture. I have stripped back the block to include only the information and I have and deleted all the lines which have 'optional' listed before them. The error message I am receiving is shown below, line 112 being the last line of the XML script.
The XML block I am using looks like this (I've zeroed the translations, rotations and distortions and only included 1 image in 1 photogroup for simplification)<SpatialReferenceSystems><SRS><Id>0</Id><Name>ENU</Name><Definition>WGS84</Definition></SRS></SpatialReferenceSystems><BaseImagePath>C:/Images</BaseImagePath><Block><Name>Block1</Name><Description>Camera1</Description><Type>Aerial</Type><SRSId>0</SRSId><Photogroups><Photogroup><Name>Group1</Name><ImageDimensions><Width>5472</Width><Height>3648</Height></ImageDimensions><CameraModelBand>Visible</CameraModelBand><PixelSize>0.00654</PixelSize><SensorSize>35.8</SensorSize><FocalLength>105</FocalLength><CameraOrientation>XRightYDown</CameraOrientation><PrincipalPoint><x>0</x><y>0</y></PrincipalPoint><Distortion><K1>0</K1><K2>0</K2><K3>0</K3><P1>0</P1><P2>0</P2></Distortion><Photo><Id>1</Id><ImagePath>IMAGE1.jpg</ImagePath><Pose><Rotation><M_00>0</M_00><M_01>0</M_01><M_02>0</M_02><M_10>0</M_10><M_11>0</M_11><M_12>0</M_12><M_20>0</M_20><M_21>0</M_21><M_22>0</M_22></Rotation><Center><x>0</x><y>0</y><z>0</z></Center></Pose></Photo>...</Photogroup><Photogroup></Photogroups></Block></BlocksExchange>
Has anyone else experienced this problem and knows how to fix it?
The included blocksexchange specification examples in Contextcapture are not valid XML files. Also there is no xsd schema to check the XML file. Seems your example is missing XML file header.
Ah sorry, cut off the top two lines:<?xml version="1.0" encoding="utf-8"?><BlocksExchange version="2.1">When I imported the Paris2012 example in Contextcapture this seemed to work but this includes additional data like control points. I have kept the core XML script exactly the same, only changing the numerical values, and omitting the lines I didn't need such as fisheye distortion, and EXIF data. I have 2 additional photogroups with one image each as a test for now, but I'd like to eventually extend this to 12 photogroups. Are you effectively saying there is no way to check where the problems with the script are? There doesn't seem to be any detailed info from Bentley on what parts of the script are required for it to work on import. Can you simply leave the unused values such as fisheye distortion blank?
It is easier to export minimalistic XML from Contextcapture and then reimport it back. Better try to leave them blank.
But why you need XML? There are other formats too and for editing I have used such approach - communities.bentley.com/.../contextcapture-convert-pose-metadata-to-csv
XML seems like the easiest way to export data from Matlab which is part of my workflow. I am trying to take the calibration data from Matlab and write this to XML for easy import into CC. From my understanding, this allows greater control over the import of the intrinsic parameters which I don't think you can do with CSV? I could be wrong so please correct me if so!