Subscribe to this thread
Home - General / All posts - Manifold 8 and 9 not picking up coordinate system from TIF
mikedufty

809 post(s)
#28-May-18 05:40

I am having issues importing geotiff files to Manifold.

I have tried in both 8 and 9, and neither seem to pick up the coordinate system.

The files are exports from EOBrowser of sentinel satellite imagery data.

QGIS imports them fine, and they come up in EPSG:3857 - WGS 84 / Pseudo Mercator - Projected

I think this is the M9 default, so it actually comes in as that, but without the correct offsets.

Is this likely due to errors in the geotiff format used? If I re-save them to geotiff from qgis they come in fine.

I assume the projection data is there somewhere since they appear fine in qgis.

There is a file with a tiff.aux.xml extension with them, but that does not appear to contain projection data, just information on the raster bands.

Below is the image info from qgis

Original

Sentinel-2 L1C from 2018-05-22-10mN

Name

Sentinel-2 L1C from 2018-05-22-10mN

Source

Provider

gdal

CRS

EPSG:3857 - WGS 84 / Pseudo Mercator - Projected

Extent

13260564.0000000000000000,-2372528.0000000000000000 : 13287144.0000000000000000,-2347058.0000000000000000

Unit

meters

Width

2658

Height

2547

Data type

Float32 - Thirty two bit floating point

GDAL Driver Description

GTiff

GDAL Driver Metadata

GeoTIFF

Dataset Description

W:/Venturex Resources/Sulphur Springs/Projects/2018 ERD/Drawings/Data/Sentinel-2 L1C from 2018-05-22-10mN.tiff

Compression

DEFLATE

Band 1

  • STATISTICS_MAXIMUM=0.91405606269836
  • STATISTICS_MEAN=0.48256772997774
  • STATISTICS_MINIMUM=0.13949398696423
  • STATISTICS_STDDEV=0.088365387132405

Band 2

  • STATISTICS_MAXIMUM=0.58283394575119
  • STATISTICS_MEAN=0.32382824467445
  • STATISTICS_MINIMUM=0.18642702698708
  • STATISTICS_STDDEV=0.036686749465136

Band 3

  • STATISTICS_MAXIMUM=0.49933564662933
  • STATISTICS_MEAN=0.2919476576159
  • STATISTICS_MINIMUM=0.19550356268883
  • STATISTICS_STDDEV=0.021789026851477

More information

  • AREA_OR_POINT=Area
  • TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  • TIFFTAG_XRESOLUTION=1
  • TIFFTAG_YRESOLUTION=1

Dimensions

X: 2658 Y: 2547 Bands: 3

Origin

1.32606e+7,-2.34706e+6

Pixel Size

10,-10

p, li { white-space: pre-wrap; }

adamw


8,216 post(s)
#28-May-18 09:14

Can you post a link to a file? The above shows that GDAL (what QGIS uses to access the file) was able to understand that the coordinate system is EPSG:3857, while the question is how specifically it did that.

I suspect the issue is that the projection info is stored not in the standard tags, but in a custom tag recognized by GDAL. As in, the file was produced by a version of GDAL (or a tool designed to work with GDAL) which only wrote the projection info into a custom tag and now various versions of GDAL can read it back, but nobody else can. We do recognize a couple of custom GDAL tags already, we might recognize more, it's no big deal to add.

mikedufty

809 post(s)
#28-May-18 10:12

I've tried linking a smaller file from the same source I downloaded.

I've also attached the aux html file

They come in as 3 bands, and Manifold 9 displays them as black, seems like the image data is in a 0 to 1 range and manifold displays it on 0 to 256 scale. Possibly due to poor choice by me in the download format (32 bit sounded better than 8 bit). Red and Blue bands are reversed from what Manifold assumes, so to get a reasonable display I had to go into style, change the range to 0 to 1, and swap the red and blue channels.

I managed to work all that out in M9 eventually, but not how to assign the projection manually.

I couldn't find a way to assign the base projection then edit offset and scale, like 8, seemed to have to either accept a predefined projection or specify the whole thing from scratch.

I've tried attaching a smaller file from the same source I downloaded.

I've also attached the aux html file

https://www.dropbox.com/s/1f6uzyegc7rp0x9/Sentinel-2%20L1C%20from%202018-05-22.tiff?dl=0

https://www.dropbox.com/s/y0rcq68asjunknv/Sentinel-2%20L1C%20from%202018-05-22.tiff.aux.xml?dl=0

adamw


8,216 post(s)
#28-May-18 10:54

I couldn't find a way to assign the base projection then edit offset and scale, like 8, seemed to have to either accept a predefined projection or specify the whole thing from scratch.

The offsets and scales are in the Metrics readout at the bottom. You can select the projection in one of the lists, then edit the metrics. You can also customize the projection from one of the lists to alter just some of the parameters instead of setting them all from scratch - this is currently a two-step operation: select the projection from the desired list, click OK to accept, start editing the projection again and switch to the Custom tab, it will contain all values for all parameters set to the ones for the projection the dialog has been started with.

We will look into the rest, thanks for the file.

mikedufty

809 post(s)
#29-May-18 04:25

I think I must be doing something fundamentally wrong. I'm going to "repair initial coordinate system" then edit coordinate system"

I'm not seeing the metrics there, and it doesn't come up with the previously selected coordinate system in any of the tabs.

I am still on build 9.0.166.0

tjhb

8,348 post(s)
online
#29-May-18 04:46

You've nailed it. To use the Metrics dialog you need version 9.0.167.x. (Strictly, any build from 9.0.166.5 but more was added later.)

mikedufty

809 post(s)
#30-May-18 08:14

Thanks, I actually realised that just after posting, had success with 167 and went back and edited my post, but the edit seems to have not taken.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.