After you extract the Appearences you need to get the bounds of each of the rasters (BoundsExtractor) then use _xmin/max, _ymin/max in RasterGeoreferencer set as Extents (you can figure out each corner as a combination of x and y, min and max).
Or, if the bounds come out around 0, get the bounds of the geometries before AppearanceExtractor.
Hi, thanks for the answer it almost works.
The raster's to come out around 0, but if I use the bounds of the geometry the corner rasters does not get the correct scale from the geometry.
Do you know if you can extract geolocation information from the appearance?
Hi, thanks for the answer it almost works.
The raster's to come out around 0, but if I use the bounds of the geometry the corner rasters does not get the correct scale from the geometry.
Do you know if you can extract geolocation information from the appearance?
@Samuel Engström I expected this behavior. I figured this thing out some time ago but I don't remember the details.
Can you provide some sample data so I can experiment on it and give a proper answer?
@Samuel Engström I expected this behavior. I figured this thing out some time ago but I don't remember the details.
Can you provide some sample data so I can experiment on it and give a proper answer?
Sure, ill attach it here "TestData.zip".
I really appreciate this. I will keep looking on my end as well.
@Samuel Engström I expected this behavior. I figured this thing out some time ago but I don't remember the details.
Can you provide some sample data so I can experiment on it and give a proper answer?
For what I can do today, you should use fme_appearance_texture_gen_info (use AttributeSplitter to get individual parameters) to calculate georeferenceing parameters for RasterGeoreferencer.
I can't find the old workspace to extract the math from it.
You can start from these two links https://docs.safe.com/fme/2021.2/html/FME_Desktop_Documentation/FME_Transformers/Transformers/appearanceextractor.htm
World file - Wikipedia
@Samuel Engström I expected this behavior. I figured this thing out some time ago but I don't remember the details.
Can you provide some sample data so I can experiment on it and give a proper answer?
For the first mesh I get the following info:
154834.82348632812,
6570529.508609505,
64.38243413526811,
0.999657830526673,
0.9652987528713471,
0,
0.02657576127956851,
-0.012725120367005571,
0.024531445519046402,
0.28744891573729375,
0.1485365074402989,
0.03189531055754419,
-0.31220172324035006,
0.0015376531510371265,
-0.02436261459550266
The first three seems to be XYZ coordinates, but not the mid or corner point. I don't understand what the other are, I cant find a connection between my values and the World file in the wikipedia link.
@Samuel Engström I expected this behavior. I figured this thing out some time ago but I don't remember the details.
Can you provide some sample data so I can experiment on it and give a proper answer?
Thi should be the meaning of the parameters:
@Samuel Engström Some time ago I created a workaround for this situations.
I started from the asumptions that the mesh was a whole at first and it was tiled for eficiency purpose. We need to recreate the bounds of the original tiles so we can use the bounds to georeference the appearance rasters. Data inspector gave me this ideea when it first loads the meshes in 3D.
We use SurfaceFootprintReplacer to get the footprint of each mesh, Dissolver to dissolve the areas into one, BoundingBoxReplacer to get the original (untiled mesh) extents.
We use Tiler set to Tile Size 250x250 (I did statistics on the footprints to get a max area and figured out it should be 250x250 and selected Lower Left as Starting Corner because that fits the original meshes - so, I basicly winged it).
Use BoundsExtractor to get the original tiles bounds (folowed by Bufferer with a small value to trick SpatialRelator - not absolutely necesary but it gets rid of a lot of headeaches). This will be sent to the Requestor port of SpatialRelator.
In paralel use GeometryExtractor to put the geometries of the original meshes in an attribute folowed by SurfaceFootprintReplacer so we can use them in SpatialRelator. This will be sent to the Supplier port of SpatialRelator.
With the ports on SpatialRelator bussy we set it to Requestor Contains Supplier and send the Output port to GeometryReplacer with GeometrySource set to the _geometry attribute from GeometryExtractor.
Now we can use AppearanceExtractor and the RasterGeoreferencer set to x/y min/max obtained from the correct tiles.
To join them just use RasterMosaicker if you need to.
I have attached a sample workspace made from your sample data using my home licence (I left the office a couple of hours ago and your case looked very intersting and very familiar) that made it all posible. So, in the end, thanks to Safe for making it all posible 😊
@Samuel Engström Some time ago I created a workaround for this situations.
I started from the asumptions that the mesh was a whole at first and it was tiled for eficiency purpose. We need to recreate the bounds of the original tiles so we can use the bounds to georeference the appearance rasters. Data inspector gave me this ideea when it first loads the meshes in 3D.
We use SurfaceFootprintReplacer to get the footprint of each mesh, Dissolver to dissolve the areas into one, BoundingBoxReplacer to get the original (untiled mesh) extents.
We use Tiler set to Tile Size 250x250 (I did statistics on the footprints to get a max area and figured out it should be 250x250 and selected Lower Left as Starting Corner because that fits the original meshes - so, I basicly winged it).
Use BoundsExtractor to get the original tiles bounds (folowed by Bufferer with a small value to trick SpatialRelator - not absolutely necesary but it gets rid of a lot of headeaches). This will be sent to the Requestor port of SpatialRelator.
In paralel use GeometryExtractor to put the geometries of the original meshes in an attribute folowed by SurfaceFootprintReplacer so we can use them in SpatialRelator. This will be sent to the Supplier port of SpatialRelator.
With the ports on SpatialRelator bussy we set it to Requestor Contains Supplier and send the Output port to GeometryReplacer with GeometrySource set to the _geometry attribute from GeometryExtractor.
Now we can use AppearanceExtractor and the RasterGeoreferencer set to x/y min/max obtained from the correct tiles.
To join them just use RasterMosaicker if you need to.
I have attached a sample workspace made from your sample data using my home licence (I left the office a couple of hours ago and your case looked very intersting and very familiar) that made it all posible. So, in the end, thanks to Safe for making it all posible 😊
Wow, this is wonderful! Your explanation makes it really easy to understand all the steps.
Thank you!!