Uploading JPG and JGW

Hi All!

I’m attempting to upload my first imagery and keep getting the error “Missing or invalid spatial reference system”

I’ve uploaded the JPG and JGW twice but get the same error, that the file is missing or invalid.
Alternatively, I did same with a TIF and TFW and it appears to be ingesting correctly.

Is there are trick to getting JPGs uploaded? I’m really hoping to utilize this compression when possible. Thank you very much!

1 Like

Hello @ne3rd, welcome to the forum!

JPG files typically don’t have the coordinate system and geolocation info embedded in them, so they would require additional metadata files to uploaded with them.

What is the original format that you got the image in, and how was the image captured?

One quick way to test this: If you can open the imagery in QGIS (or any other viewer) and it shows up in the correct location in the world, then Cesium ion should be able to read it.

Hi Matt,

I created the drone photography based imagery and exported it as JPG from agisoft. The JPG and JGW load fine in ArcMap. I had also exported a DEM in TIF/TWF which seems to load into Cesium with no problem. I’ve tried a few versions with no luck. ty!

Hi @ne3rd, can you please send us the ion asset ID? We can take a look.

Thank you Matt! The primary jpg is ID: 529626 I also uploaded a jgw file but cannot locate the ID for that one. Your assistance is much appreciated!!! mb

Hi @ne3rd,

Thanks for sharing the asset ID. I see the jpg and jgw are both there. I took a look at the data, and it seems like the projection information stored in the jgw file is incomplete. When I opened the jpg in QGIS, I was able to view the image, but it wasn’t georeferenced.

When you load the JPG and JGW in ArcMap, is the imagery on the correct location on the earth?

I followed steps 6-8 in this tutorial to set the CRS of the layer in QGIS, exported it as a GeoTIFF, and then was able to tile the GeoTIFF in ion. If you do that in QGIS (or the equivalent in ArcMap), the tiler should have the information it needs to process the imagery.


Thanks for the reply Matt and sorry for delayed response. I just confirmed everything aligns perfectly in ArcMap when using this layer to define projection and overlay other spatially referenced data correctly. I also just installed QGIS and completed the steps. The resulting TIF file is 10X larger (3.6GB) than the original JPG (300MB) which I was hoping to avoid. Are you aware of any compressed Geo formats the system can use? Perhaps Cesium needs the raw uncompressed format to apply tiling algorithm? I was just hoping to use smaller images so as not to consume all of the Free/Testing 5GB data storage space. Thank you so much for assisting with this inquiry!

Hi @ne3rd,

Thanks for testing out those steps in QGIS and sharing your findings. I looked into this some more and I have a couple more questions for you that may help us get to the bottom of this.

Are there any other files in the directory in which you keep the JPG and JGW files? Maybe an .aux.xml, .tab, or anything else? If you run gdalinfo on the JPG, what is the output? I’m wondering if it is detecting an additional file that specifies the coordinate reference system.

I ask because in this documentation on JPEG files in gdal (which is used by QGIS and by Cesium), it says:

There is currently no support for georeferencing information or metadata for JPEG files. But if an ESRI world file exists with the .jgw, .jpgw/.jpegw or .wld suffixes, it will be read and used to establish the geotransform for the image. If available a MapInfo .tab file will also be used for georeferencing.

So, it looks like a JGW file can provide the transform but not the coordinate reference system. The CRS (e.g., an EPSG code) would need to be provided separately for the imagery to be projected onto the globe. I’m wondering if there’s another file on your machine that might be supplying the EPSG for your tests in ArcMap and QGIS.

My other guess is that an CRS is indeed not specified by the files, but ArcMap and QGIS are falling back to a default CRS, which is why everything works on your end but not in Cesium. They are being aligned in the same arbitrary space, even though they don’t have the projection information necessary to be projected onto the globe. When you follow the QGIS steps in the tutorial I shared earlier, do you see this text once you do Step 6?

Either way, knowing this will help me understand what’s going on.

Second, do you know the CRS of the data (e.g., an EPSG code)? It may be possible to generate the necessary metadata file for Cesium to be able to project the JPG, but we would need to know the CRS.

I’m not positive that we’ll be able to make the JPG work in the end, but solving the projection issue would take us a step closer.