This occurs when the mask file is missing. For example, if no mask file has been created or the file has been deleted or moved. In these cases, the geospatial software has only the source imagery to rely on. The perimeter markings are a result of not being able to fully handle transparency properly.
When nVisualiser creates tiled imagery, either as a group of tiles (e.g. 1 mile x 1 mile tiles) or a single large tile, an associated mask file is created by GDAL, the same library that is used to create the tiles. The mask file is a binary raster, containing only values of 1 and 0. Every pixel within the specified AOI is given a value of 1, while every pixel outside the AOI is given a value of 0. We can clearly see the divide between 0 and 1, as it lines up with the AOI. In the image below, white Is 1, black is 0.
Most geospatial software, such as QGIS and ArcGIS Desktop/Pro, automatically read both the raster file (TIF, JPEG2000, etc.) and the mask file simultaneously, and use this information to provide clear, crisp boundaries on the imagery. The software reads the file location of the source imagery, and if a mask file is detected in the same location with the same name, the software reads the mask file and uses it to draw the boundaries.
Below is a side-by-side comparison of the same file in two directories, one with a mask file present, and one without.
The above applies to lossless compression of raster data such as JPG in GeoTIFF, JPEG_YCbCr, and ECW, which are the most common output formats for 2D exports. This problem does not necessarily occur for raster files without compression (lossless), such as LZW, and LZ77 files. Note that lossless file sizes are significantly larger than lossy files.
Perimeter markings are not present in the imagery Nearmap delivers because of the presence of a mask file that corrects the limitations of a lossy compression. Mask files are not automatically created by third party geoprocessing tools, which is why the problem appears in secondary outputs.
There are two solutions to address perimeter markings.
- Check that any secondary outputs from geoprocessing tools run against Nearmap imagery also include a mask file to match the file structure that nVisualiser creates. The nearblack function in GDAL is a good way to do this, though an equivalent tool is not available for ArcGIS Pro.
- Specify a lossless compression type for any outputs of geoprocessing tools. In the images below, we used masked imagery for the inputs, put them through the same geoprocessing tool (Mosaic to New Raster), and held every parameter the same, except for the Compression type. Compare the dark markings in the resulting raster datasets.