Raster Image in QGIS

Hello! I am trying to move a raster image (km * km) to Speckle with the connector but it doesn’t load.
There is some limit for the size? I think i am following the process correctly.
The QGIS version is 3.30 and the conector is the 2.13. The image is 30mb.

What i see is that the resolution conditionate the mesh triangulation, so i am having a huge mesh unloadable :man_facepalming:
Any idea? Thanks!

Hi @jan-casas ! Could you pls share any error screenshots? Or do you receive a success message but the mesh doesn’t show up? Sometimes, if you managed to send the data but don’t see it in the viewer, it might be because your project used a geographic Coordinate Reference System, and instead of 1 degree (about 100000 meters) the size is interpreted as 1 meter (because Speckle doesn’t support the conversion between degrees and meters yet).

Triangulation is not applied to raster images, their rectangular “pixels” are sent as the mesh parts. It can indeed reach the size limit, but it shouldn’t, I managed to send over the raster size of the Netherlands :smiley:

1 Like

Hello Kateryna! I am using ETRS89/UTM ZONE 30N EPSG:25830 in the project (same behavior with WGS84) .
When i commit the data my computer freeze, no error, no alert. And my stream remains empty.
All of this is happening in the context of trying to replace mapbox tiles with our own custom layers in qgis for 3D city model basemaps. Geolocation in Speckle stream - Making Speckle - Speckle Community

I found a workaround with grasshopper reading the image and pushing the mesh but i had to reduce the image resolution a lot.

2 Likes

I see! The resolution seems to be really detailed! It might be that Grasshopper way works faster, because it is only sending a colored mesh, while QGIS is sending a raster with data for every pixel PLUS a colored mesh.

But going to back to the issue, please try the following steps:

  1. Set the checkbox for “Send data in the background” (available from 2.13 Speckle plugin version)
  2. In QGIS right-click on the panel, open the Log messages panel.
  3. Click Send. It might take a while but wait for a success/error message to show up. There might be additional messages in the Log message panel, in Speckle tab. Please take a screenshot of them after sending results in success or error.

Also steps to reduce your raster size:

  1. Check the resolution and CRS Units of the raster file itself (right-click on the layer name → Properties):

  2. Right-click on the layer name → Export → Save As…
    Make sure you are exporting the layer in the save CRS as the original layer (can be different from the project settings), and increase the resolution several times (e.g. I increased from 60 to 180)

  3. You get your new raster with smaller resolution:

Another option:
Clip raster into a smaller piece, try again and see if it’s indeed a size issue. What is the resolution and the x-y dimensions of your file btw?

2 Likes

Super useful steps to reduce raster size!
I will launch the process in the background and come back here with the result

layer properties:

General
Name	map
Path	C:\Users\casas\OneDrive\Escritorio\**********\Database\Raster\map.png
Size	32.03 MB
Last modified	domingo, 23 de abril de 2023 14:21:11
Provider	gdal


Information from provider
Extent	52****.3667000000132248,4******.3915837397798896 : 52****.7512000000569969,4******.1569162607192993
Width	11288
Height	9363
Data type	Byte - Eight bit unsigned integer
GDAL Driver Description	PNG
GDAL Driver Metadata	Portable Network Graphics
Dataset Description	C:/Users/casas/OneDrive/Escritorio/***********/Database/Raster/map.png
Compression	
Band 1	
STATISTICS_APPROXIMATE=YES
STATISTICS_MAXIMUM=255
STATISTICS_MEAN=134.4728825265
STATISTICS_MINIMUM=2
STATISTICS_STDDEV=73.059429190494
STATISTICS_VALID_PERCENT=100
Scale: 1
Offset: 0
Band 2	
STATISTICS_APPROXIMATE=YES
STATISTICS_MAXIMUM=250
STATISTICS_MEAN=181.86897771157
STATISTICS_MINIMUM=8
STATISTICS_STDDEV=51.60688223413
STATISTICS_VALID_PERCENT=100
Scale: 1
Offset: 0
Band 3	
STATISTICS_APPROXIMATE=YES
STATISTICS_MAXIMUM=242
STATISTICS_MEAN=100.67914726131
STATISTICS_MINIMUM=9
STATISTICS_STDDEV=43.486463202058
STATISTICS_VALID_PERCENT=100
Scale: 1
Offset: 0
Band 4	
STATISTICS_APPROXIMATE=YES
STATISTICS_MAXIMUM=255
STATISTICS_MEAN=255
STATISTICS_MINIMUM=255
STATISTICS_STDDEV=0
STATISTICS_VALID_PERCENT=100
Scale: 1
Offset: 0
More information	
Dimensions	X: 11288 Y: 9363 Bands: 4
Origin	52****.3667000000132248,4******.1569162607192993
Pixel Size	0.871490476612335585,-0.871490476612335585


Coordinate Reference System (CRS)
Name	EPSG:25830 - ETRS89 / UTM zone 30N
Units	meters
Method	Universal Transverse Mercator (UTM)
Celestial body	Earth
Accuracy	Based on European Terrestrial Reference System 1989 ensemble (EPSG:6258), which has a limited accuracy of at best 0.1 meters.
Reference	Static (relies on a datum which is plate-fixed)
2 Likes

I was able to send a non-georeferenced image with a resolution of 144 dpi but when I tried 300 dpi it returns an error when sending data. It’s absolutely amazing to be able to do that :raised_hands:.

2023-04-29T21:17:23     INFO    Attempting to update specklepy to 2.9.0
2023-04-29T21:17:29     INFO    Attempting to update panda3d to 1.10.11
2023-04-29T21:17:30     INFO    Attempting to update pyshp to 2.3.1
2023-04-29T21:21:43     CRITICAL    ❗ SpeckleException: Stream not found::tryGetStream
2023-04-29T21:28:34     INFO    👌 Data sent to "Purple Castle" 
              View it online
2023-04-29T22:20:52     CRITICAL    ❗ Error sending data: Could not save the object to the server - status code 400::onSend
2023-04-29T23:05:07     CRITICAL    ❗ Error sending data: Could not save the object to the server - status code 400::onSend
2 Likes

Awesome, thanks for the feedback! We’ll see what we can do to optimize the object size when sending to the server :pray:
Also, to be able to truly use it as a base map, you can use “Set as a project center” function, after specifying geographic coordinates of the project location (e.g. as described here). Then in the viewer you can overlay all your commits from QGIS, Rhino, Revit etc, and the location should match!
Viewer commit overlay_small2

4 Likes