Saturday 10 November 2012

Exporting video from ArcGIS to Lightworks


In the past I have used Microsoft Movie Maker for video editing. Like many Microsoft products it was relatively easy to use, but quite limited functionality. It also had an unfortunate tendency to crash and refused to load when I tried to install it on my current laptop. Rather than deal with the installation problem I decided to try the free Lightworks video editing suite instead. Much of my contents comes from ArcGIS animations, so how do you go get high-definition video out of ArcGIS and into Lightworks?

Lightworks currently only supports some free and open video codecs. Codecs are implementations of video storage and compression algorithms. Video 'formats' such as AVI (.avi) and MOV (.mov) are wrappers around these codecs. To play or edit video files an appropriate codec must be installed and the software support the format. Other issues, such a frame rates may also be important as I discovered.

How I export HD video from ArcGIS to Lightworks:
  • In ArcGIS:
    1. Make you animation 20% longer than you want it to be as the conversion process will speed up the video by 20%.
    2. From the Animation Toolbar, Export animation.
    3. In the Export animation dialog, open the Options... dialog. Check Use custom extents under Video Resolution, then set the Horizontal resolution to 1440 and Vertical Resolution to 1080. These are the dimensions required by the to render the video using the MPEG-2 I-frame HD codec in 1440×1080i/p format. Codec resolution information is on page 2 in Using the Matrox VFW Software Codecs. Also set Frame based video export to the full range of frames.
    4. Export, then in the Video Compression dialog select the Matrox MPEG-2 I-frame HD codec.
    5. Click OK to export.

ArcGIS Video Export Options dialog

There is however a problem. Despite being in a format and codec supported by Lightworks, Lightworks only supports video with a frame rate of at least 25fps. ESRI help indicates that the frame rate can be set from 1 -100, but I have been unable to change from the default 20 fps. Instead, I use VirtualDub 1.9.11 to change the frame rate.

    1. Open VirthualDub.
    2. From the File menu, Open video file.
    3. From the Video menu, Frame Rate. Set Source rate adjustment to Change frame rate to (fps) to your desired rate; 25 in this case. Also set Frame rate conversion to the desired rate. I suspect the first is not really need.
    4. From the Video menu, select Compression and select the within the dialog select the Matrox MPEG-2 I-frame HD codec.
    5. From the File menu, Save as AVI.

VirtualDub Frame Rate Control
VirtualDub Compression
  • Open Lightworks
    1. Create a project with your frame rate. 25 fps in this case.
    2. Click on the Project Name to open the Project settings menu. Select the Video tab and set the Format to 1080i 25fps.
    3. You can now import you video.
    4. It will however be 20% quicker than the time set in ArcGIS.



Wednesday 9 May 2012

London Congestion Charge Zone as GIS data

So, I ask Transport for London whether the London Congestion Charge Zone is available as a GIS file, and if not, why not? 

I get a letter back, telling me no, but asking if I have any suggestions. Wake up TFL!



Tuesday 3 April 2012

How to get the extent of a PostGIS table

Here are two way to query the spatial extent of a PostgreSQL/PostGIS table.

For a table bc_roads in the bc schema with a geometry column the_geom...

To get the extent as a Well-known text (WKT) box:

SELECT Extent(the_geom) AS extent FROM bc.bc_roads;

To get the extent as xmax, xmin, ymax, ymin as fields:

SELECT ST_XMax(r) AS xmax, ST_XMin(r) AS xmin, ST_YMax(r) AS ymax, ST_YMin(r) AS ymin FROM  (SELECT ST_Collect(the_geom) AS r FROM bc.bc_roads) AS foo;




Monday 26 March 2012

Leica Cyclone Back Compatability 7.2 to 6.0

In the school of Geography, Geology and the Environment, Kingston University London, we are running Leica Geosystems Cyclone 6.0 on our network, but 7.2 on the Panasonic Toughbook we use with our Leica ScanStation 2 3D scanner. Unfortunately, the 7.2 database is not compatible with older versions, so to get the data out of 7.2 and into 6.0 it must be exported as a point cloud .ptx file and re-imported. It has taken me a little while to work out how to do this as instructions appear to be somewhat limited.

The Export command in Cyclone Navigator seemed a good place to start, so I searched the database directory tree till it became active, which was when I selected a ModelSpace View.




An Export to File dialog is presented, followed by the Export Options dialog, but this just resulted in an exception. Foiled!

It appears, data can only be exported from within an open ModelSpace View using File Export, checking Visible or Selected in the Export Options depending on which data you wish to export.


Importing into version 6.0 is very straightforward. Create a new Cyclone database, then right-click and Import. Select one of your .ptx files and Merge or keep Separate multiple clouds as required.


The point clouds are now in Cyclone 6.0.


There are MultiImages associated with the scans, however, so far I have been unable to convert these. I can  export them from 7.0 as individual images, but get an error in 6.0 when I try and create a new MultiImage folder in the Images folder. 


This is most unsatisfactory, but will have to wait for another day.