Friday, 3 February 2017

Ranges, Java and HiDPI Screens

Ranges users have begun reporting that all the text on their installation of Ranges is impossibly small and are asking for a fix or workaround. In fact, these users have stumbled across a problem that the Java runtime (JRE) has with high DPI screens in the newer Windows versions.

Ranges 9 showing HiDPI small text bug

We discovered this issue a couple of years ago on one of our own new HiDPI screens and failed to find a solution short of ditching Java and re-coding the Ranges front end in a different language, a task we did not relish. We kept quiet, expecting a cascade of complaints but interestingly no one mentioned it until yesterday when two UK users reported it at almost exactly the same time!

The very good news is that there is, or soon will be, a fix in the Java runtime. Java 9 is officially out in July 2017 but we have made Ranges display properly on Windows 10 HiDPI under a pre-release version. There may be other issues with a pre-release runtime but final testing finishes next week and it should now be essentially complete. If you are suffering from tiny text on your new Windows laptop, you may like to give this a go yourselves following the instructions below.


To download and install the Java 9 pre release, visit

https://jdk9.java.net/download/

, accept the licence agreement and chose the JRE (Java Runtime Environment), not the JDK (Development Kit), with the version of Windows you are running (most likely 64 bit).
While installing it may ask you to uninstall old versions. It is probably best to leave the latest Java 8 on there, in case you need to roll back.

A corresponding version of Ranges (will work with JRE 8 too) can be found as usual at

http://www.anatrack.com/download_ranges.php

It should install over the top of your current version; this will keep all licensing and data files.
As ever, do let us know if there are any issues with this version of Ranges 9. We will report any that are caused by Java to the authorities at Oracle.

In fact, if you do try this fix, please let us know either in the comments section below or via email.

Monday, 19 September 2016

Latitude-longitude Coordinates In Anatrack Ranges

The issue of location coordinate systems comes up a lot in various guises so I thought I would post to the neglected Ranges blog with talk of these and how to convert, within the application, latitude-longitude coordinates to a usable system.

The key point is that, in Ranges, you must use a coordinate system that uses metres and not latitude-longitude degrees! To explain briefly: trigonometry, which Ranges uses heavily to do its calculations, will only run in a Euclidean coordinate system, one where n ticks in the x direction covers the same distance as n ticks in the y direction. Lat-long coordinate systems are not Euclidean not only due to the strange shape of the Earth but because e.g. three degrees of longitude covers a different distance depending on the latitude.

Lat-long coordinates are easily converted to a Euclidean system in metres, the standard system used is Universal Transverse Mercator (or UTM). It is possible that the device you used to collect the lat-long data also collected the UTM data but, actually, there are some advantages to using the new lat-long converter in Ranges as it will retain the UTM grid and allow easy conversion back to lat-long for direct display on Google Maps, for example, or export to KML.

The converter works when you import data. To import the lat-lng data you will first need it in a format Ranges understands which is tab or space delineated columns (one of the Excel output format options). I have created a sample data file with three columns (ID, Lat, Lng) containing some random locations around the Devon coast near to where I live.

Then I clicked import in Ranges, lined up the column headers with the Ranges Attribute (remember E=lng, N=lat!) and selected latitude-longitude to utm towards the bottom (lots more you can do here to collect more relevant data). Most data from GPS devices has a WGS84 ellipsoid but you might want to check yours. The import screen look like this:


Note that because Devon is west of the Greenwich Meridian, the longitudes are negative; coordinates in the southern hemisphere will have negative latitudes. I saved the data as a .loc file and can now view it in Ranges:


You will see the locations have large eastings and northings, now perfect for analysis. Next, I ran Convex Polygons 50/75/95:


If you now click modify you will see the edge file has been saved with the UTM zone data, retrieved during the loc data import:


This means that the edge graphics can be immediately viewed in Google Maps, clicking the Google g in the Ranges map display window:

Tuesday, 10 March 2015

Learning about analysing animal radio-tracking data

Very large numbers of papers have been written on this topic, but some useful simplification is available. The second paragraph of the introduction to Location Analysis in the Ranges tutorial contains two references which remain very comprehensive sources despite their age. The 2001 Manual for Wildlife Radio Tagging is now available also in e-format; this book is compared with another edited by Millspaugh & Marzluff (2001) that focuses on analysis approaches.

The second reference in the Ranges tutorial is a 2001 paper, but for an updated (and similarly concise and citation-rich) review of home-range analysis, just click the Review Of Home Range Analyses. The Tutorial Link (left column) gives you a good idea of what is in Ranges 9, and the Demo Tutorial gives an idea of what the software is like to use if you first download the free Demo of Ranges 9 which operates for either Windows or Apple Mac computers.

Thursday, 19 June 2014

Location Analysis

The ability to display results in a fancy way are all fine features of Ranges 9 but it is nothing if it cannot perform analyses to produce these results in the first place. The new version of the software can now run analyses, and there is a new Location Analysis screen to start this off.

The new screen is functionally similar to the one in Ranges 8. You click to choose a particular location analysis from the list then choose the files that are required. Option boxes appear according to the analysis chosen and the user must select those relevant to his investigation. Particular ranges and locations can be selected for analysis (we have already seen the new selection screen) and there are a few options pertinent to output files created. Hints for the user appear at the bottom of the form as they used to and he is unable to run the analysis until all required files and settings are specified.

But the form has had the Ranges 9 make over. All controls have a consistent size and shape. They have relevant labels with the correct capitalisations and, as they appear, the controls are positioned neatly one above the other.

The analysis window is a popup but it is not "modal" i.e. buttons on the main interface still respond when the analysis window is open. This means you can choose a different analysis window or click to view the statistics without closing the current analysis.

The new location analysis dialog

Friday, 2 May 2014

Background Images

Often researches have a map or satellite image, a jpeg or bitmap, of the area that the tracked animal has travelled over. In this case, it is extremely useful to be able use this image as background for visual analysis and for figures in reports.

Ranges 8 allows background images but the alignment implementation is very basic. It insists only on two coordinates, the top right and bottom left corners of the image, which is not enough to allow for all the possible distortions:  rotation, shear, scale, and translation. This can be handled by applying an affine transform to the image and for this we need four coordinates.

Ranges 9 gathers these coordinates with a clever new interface. The user loads the image and it is displayed with four markers defining the points on the image. He moves the markers by dragging them into a position on the image that he know the real world coordinate of, then enters these coordinates into the panel against the marker.

The image alignment dialog

Users can drag to scroll and select areas to zoom as well as panning and zooming with the familiar controls, just as they can with the new graphics screen.

Zoomed in to the second alignment marker
Aligned images are saved along with the alignment points in a new file type .ima.These can then be loaded as the background to a location or edge file.

The image as background for an edge file

Thursday, 6 March 2014

Location File Subsampling

Knee deep in location sub sampling today. This is where you can save a sample of a location file, functionality accessed through the modify button then clicking OK and Sample (I think this is a little awkward and would love to hear suggestions for a more obvious place).
In order to get this working, I have written a new version of the Selection screen, one with neatly laid out controls and consistent styling. The functionality remains the same but I have found a bug: if more than one LAV selection is specified e.g. both Activ and Day in the blackbird loc file, only the last selection is applied. This is now fixed!

The new selection screen

Friday, 21 February 2014

Editing Data

Most data used in Ranges will have been created by another tool, a telemetry recorder for location data, perhaps a GIS for vector or raster backgrounds. But there will be occasions where it is necessary to edit data, maybe even create a simple vector file from scratch and for this reason Ranges comes with simple editing tools.

Ranges8 has always allowed users to add locations and draw shape files by clicking on the display and by adding coordinates to the data grids. Ranges9 will also contain this functionality but due to the improved navigation functionality ("drag to position" in particular, users will now press the CTRL button (in draw mode, the cursor changes to a pen) before clicking on the display to create the coordinates.

I has long been possible to tweak rasters by changing the number representing a category in the grid that represents the raster  "pixels". Ranges9 improves on this by allowing users to select the category in the category list and clicking on the raster pixel to be edited on the graphical display. This makes raster editing much more convenient.

Note that shapes and raster points can also be selected, meaning they are highlighted in the data grids and on the display itself, though this now requires that the user holds down the shift key while he clicks on the display.