I’m trying to set coordinates for project center when sending from QGIS but can’t get it to work with the relevant CRS (SWEREF99 TM / EPSG3006). Are there limitations to the use of CRS or is it something else that is causing the problem?
Thanks, @tsor, for bringing this to our attention. I have been able to replicate the issue. There isn’t anything specific about the CRS selected - it should be possible.
I will investigate further and report back.
Hi @tsor ! Great catch. This is a little info on how Speckle creates a coordinate center:
Considering that all objects in QGIS are located using absolute coordinates, and Speckle objects are using local coordinates (e.g. (0,0,0) Point in your CAD software), it is tricky to bring them to a uniform format. The solution we came up with, was to create a custom Coordinate Reference System in QGIS base on traverse mercator, with the origin point (user-specified Lat, Lon) synchronized with Speckle origin point. Therefore, it doesn’t pick up the CRS you set up previously.
To resolve your situation, there are 3 options:
Use Speckle function to set a project center (Project CRS will change accordingly) and receive your data. Then switch the project settings back to your CRS and send your data. This option
will preserve your required CRS,
place all received CAD/BIM objects in a correct location,
but will not base your model in the center or Speckle coordinates upon sending.
Just use Speckle function to set a project center (Project CRS will change accordingly) and receive/send your data. This option will
will not preserve your required CRS, but
will place all received CAD/BIM objects in a correct location, and
will base your model in the center or Speckle coordinates upon sending.
Depending on your preferred CRS, manually create a new CRS based on it, by adding false easting and northing (this will move the “origin” to your location) and receive/send your data.
Settings->Custom Projections-> +. Format: “Proj String”. Copy your CRS definition (e.g. for British National Grid it’s
+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +units=m +no_defs) and change this part:
will preserve your required CRS (in a slightly corrupted way),
it doesn’t work with all types of coordinate systems. The issue is that your chosen EPSG:3006 is based on UTM (
+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs) which does not support custom false easting and northing values.
Therefore, the best existing solution would be to use options 1 or 2. But do let us know more about your use case and whether there are reasons this option might not be acceptable. It would be great to learn about the applications and see how we can tailor the plugin better!
Hi @Kateryna appreciate the rapid response and some insight into the technical workings. I’m not sure I get the meaning of preserving the CRS, I read it as keeping the QGIS CRS set while sending/receiving to the right place in relation to the model origin. This is currently not an issue as the goal is just to send with a specific point set as the model origin so alternative 2 should be suitable.
But the issue is that I can’t use the Speckle function to set project center using EPSG:3006 coordinates (custom CRS could not be created). It works for small coordinates and looking at the resulting custom CRS it is clear that the function tries to create a custom CSR based on tmerc and with the entered lat and long as false values - understandably it doesn’t work.
Ah I see what the issue is here! Lat and Lon values are expected to be specified in degrees, as in WGS 84. You can change your Project CRS to WGS 84 (EPSG:4326), right-click on the canvas->Copy coordinates. Then paste these values as Lat & Lon (without letters). You can even copy the coordinates from Google Maps:)
Also, what is currently set as your project CRS doesn’t really matter (it could be EPSG:3006 or anything else).
Hope this helps!
Alright, I’ll go across WGS84. It would be nice to have the function do the transformation directly or the ability to get it from a point in a layer. But it is really nice being able to move quickly from QGIS to CAD - keep up the good work!