Subscribe to this thread
Home - General / All posts - How to assign coordinate system for multiple images

162 post(s)
#20-Sep-22 15:02

How can I assign the coordinate system of multiple images in one step using M9?

Organizations that want to adapt to CHANGE are using products that can adapt.


10,439 post(s)
#20-Sep-22 15:34

I am not sure there's a way to do this in one step.

That said, you can add the coordinate system to favorites, then set it to each image from the favorites menu. (If you want to override local offsets / scales -- I don't know if you do, because you are talking about images, if they are imported with world files but without PRJ files, for example, you want to set everything but local offsets / scales -- be sure to change the default setting to override them.)

Alternatively, you can use SQL, of course. Either set the coordinate system of one image, then write SQL to copy it to all other images, or put the definition of the coordinate system into SQL and set it to all images. Tell me if you need example code.


162 post(s)
#20-Sep-22 15:57

Thanks, Adam.

Found another way in a different post from Dimitri:

"Assigning a projection is conceptually simpler because that is simply updating the mfd_meta table to copy the coordsystem JSON text into the Value field for the FieldCoordSystem.Geom property of each drawing's table. If you have a thousand drawings to which you want to assign a projection, select all the records where the Property field contains FieldCoordSystem.Geom, and then you can update them all at once."

That just worked fine.

Organizations that want to adapt to CHANGE are using products that can adapt.

261 post(s)
#20-Sep-22 17:11

In the scenario you import a dxf with several layers, several drawings are created and all of them have the same (Pseudo Mercator) projection. But the property FieldCoordSystem.Geom is not yet visible in the mfd_meta table for the drawings. You have to change the projection for a drawing in order for the property to become visible for the specific drawing. So, how can you use the above method to massively set projections?


10,439 post(s)
#21-Sep-22 13:33

Indeed. But you can get a list of all drawings (or images, like in the first post) from MFD_ROOT. Then you can, for example, add 'FieldCoordSystem.Geom' (or 'FieldCoordSystem.Tile' for images, provided all images use a field named 'Tile') with CoordSystemDefault() (or an empty string) to those that don't have it in MFD_META.

261 post(s)
#21-Sep-22 15:59

I cannot make this work:

I import a dxf with several layers, so several drawings are created. All of them have Pseudo Mercator as coordinate system.

I open mfd_root, I select the rows that have Type "drawing", and do Edit-copy

I open mfd_meta and do Edit-Paste.

The paste dialog pops up

There is no way to set Property and Value to FieldCoordSystem.Geom and the Coordinate system you want here.

So, what do we do next?


162 post(s)
#21-Sep-22 17:14

I worked with a bunch of TIF images with tfw files.

First I opened the mfd_table and selected

[Property] LIKE 'FieldCoordSystem.Tile'

Then I used the transform tab to change the value from the local coordinate system to UTM32>


{ "LocalOffsetX": 520000, "LocalOffsetY": 5360000, "LocalScaleX": 0.2, "LocalScaleY": 0.2, "System": "Pseudo Mercator", "SystemIncomplete": "system" }

with the EPSG code you need by using transform formular

'EPSG:25832,mfd:{ "LocalOffsetX": '

& StringSubstringLen([Name], 16, 6)

& ', "LocalOffsetY": '

& StringSubstringLen([Name], 23, 7)

& ', "LocalScaleX": 0.2, "LocalScaleY": 0.2 }'


Organizations that want to adapt to CHANGE are using products that can adapt.


656 post(s)
#21-Sep-22 17:25

Have a look at the following piece of SQL code:



 [mfd_meta] (Name, Property, Value)



 'FieldCoordSystem.Geom' AS [Property]

 '{ "Accuracy": 0.5, "Axes": "XY", "Base": "Amersfoort (EPSG:4289)", "CenterLat": 52.15616055555555, "CenterLon": 5.38763888888889, "CenterX": 593.032, "CenterY": 26, "CenterZ": 478.741, "Eccentricity": 0.08169683122252751, "FalseEasting": 155000, "FalseNorthing": 463000, "MajorAxis": 6377397.155, "Name": "Amersfoort \/ RD New (EPSG:28992)", "Rect": [ 3.2, 50.75, 7.22, 53.7 ], "RotationCenterX": 3903453.148, "RotationCenterY": 368135.313, "RotationCenterZ": 5012970.306, "RotationX": 0.0001137206631775658, "RotationY": -0.00009991810989286426, "RotationZ": 0.0005190252778751589, "ScaleAdjustment": 4.0772, "ScaleX": 0.9999079, "ScaleY": 0.9999079, "System": "Oblique Stereographic", "Transform": "Molodensky-Badekas", "Unit": "Meter", "UnitScale": 1, "UnitShort": "m" }' AS [Value]



WHERE [Type] = 'table'

It creates a property for all tables in mfd_root. It assumes that the geometry field is called "Geom". In case you have already have a property the query will fail. Use update for these cases.

Hope this helps.

P.S. For Tiles the values are slightly different. Assign one manually and have a look at the mfd_meta table to find more details.

261 post(s)
#22-Sep-22 04:08

Thanks! This is a real time saver if you import a lot CAD drawings.

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