Trimble Business Center

 View Only
Expand all | Collapse all

PDF Orthophoto, how to import?

  • 1.  PDF Orthophoto, how to import?

    Posted 08-26-2020 23:09

    Hi!

     

    Look at this files,i have a customer that send this to me and its a pdf wich should be geo referenced. If he open it in Autocad it will be placed correctly but if i import it in TBC i will just be prompt a question i i want to place it. Does anyone have a workflow for this? 

    Attachment(s)



  • 2.  Re: PDF Orthophoto, how to import?

    Posted 08-27-2020 18:49

    We do not have a direct worflow for importing a georeferenced pdf - i will get someone at Trimble to look into it. I assume that the geo info for the pdf is in the file properties - if you hqve the coords of the image you could enter those and then use the georeference pdf command to place it - failing that you would need some common points to place and orientate it 

     

    I will see what I can find in the files

     

    Alan



  • 3.  Re: PDF Orthophoto, how to import?

    Posted 08-27-2020 20:44

    The zip file contains a TFW file- this is the file that goes with a TIFF file to give it its georeference info. The PDF therefore either contains a TIFF image or somehow Autocad is using the TFW to georef the PDF. I will dig deeper on this to see what Adobe is doing here or it may be some other software that is creating the combination of PDF and TFW.

     

    Alan



  • 4.  Re: PDF Orthophoto, how to import?

    Posted 08-27-2020 20:50

    So Adobe does have Geospatial PDF - it is a Geofiff housed in a PDF document. The TFW will have the coordinates of the image corners - if you enter those as points in TBC and then import the PDF you should be able to georef the image to 2 points.

     

    I will try Friday to do that



  • 5.  Re: PDF Orthophoto, how to import?

    Posted 08-28-2020 01:48

    I did some more testing with this. 

    Just importing the pdf does not work but if i open the pdf in Adobe and export it as a .tiff and then import the .tiff in TBC the picture will be imported and the top left corner will match my point with the coordinates from the .tfw file. TBC does use the .tfw file when importing the .tiff but the scale is not correct. The file is also rotated wrong but that could be fixed in Adobe but the scale is still wrong. The info in the tfw file says the pixel size is 0.148592999463529 (i think) but i dont know how to use that in TBC. 



  • 6.  Re: PDF Orthophoto, how to import?

    Posted 08-29-2020 00:10
      |   view attached

    My initial comment below was premature, if you'd been able to export the original image from the PDF, the one that matches the pixel size in the TFW you only would have to drag 'n drop it into TBC. Obviously your exported image doesn't match the pixel dimensions from the TFW anymore. Give the attached TIFF a try, I opened the PDF in Photoshop and saved it as TIFF, maybe it is different to yours. Since I don't know what coordinate system you are using I can't test it.

    The TFW unfortunately only contains one coordinate, if the image doesn't fit the pixel size of the TFW anymore the image will be scaled the wrong way. That's what you are seeing.

    There would be no way to fix that, unless you have a second coordinate of a distinct feature in the image. 

     

     

     

     

    That following doesn't really help, 

    Assuming that you were able to export the original image from the PDF you can use that information to compute the coordinate of the lower right corner of the image.

    The top left corner is included in the TFW.

    See ESRI page Understanding world files 

     

    x1 = calculated x-coordinate of the pixel on the map
    y1 = calculated y-coordinate of the pixel on the map
    x = column number of a pixel in the image
    y = row number of a pixel in the image
    A = x-scale; dimension of a pixel in map units in x direction
    B,D = rotation terms
    C,F = translation terms; x,y map coordinates of the center of the upper-left pixel
    E = negative of y-scale; dimension of a pixel in map units in y direction

     

    The y-scale (E) is negative because the origins of an image and a geographic coordinate system are different. The origin of an image is located in the upper-left corner, whereas the origin of the map coordinate system is located in the lower-left corner. Row values in the image increase from the origin downward, while y-coordinate values in the map increase from the origin upward.

    The transformation parameters are stored in the world file in this order:

    20.17541308822119 = A
    0.00000000000000 = D
    0.00000000000000 = B
    -20.17541308822119 = E
    424178.11472601280548 = C
    4313415.90726399607956 = F

    So, you have to use the pixel dimensions from your TIFF, lets assume your image is 2000 pixel wide and 3000 pixel high.

    Then the lower right corner would be

    Easting = 153578.7192 + 0.148592999463529 * 2000 and

    Northing = 6492523.8401 + -0.148579243079326 * 3000.

     

    Be aware that this is for the center of the pixel. Depending on how accurate you need it, you might want to offset your two corners by an additional half pixel, since you can only snap to the corner of the image frame.

    Attachment(s)

    tif
    MotalaVerkstad orto 2019.tif   12.48 MB 1 version


  • 7.  Re: PDF Orthophoto, how to import?

    Posted 08-29-2020 07:04

    Did you attache a file here? I cant fint it. 

    I will attache a .vcl file here wich i suppose contains the correct coordinat system.

    Here it is Transfer - Dropbox 



  • 8.  Re: PDF Orthophoto, how to import?

    Posted 08-29-2020 07:14

    One more thing. The guy who sent me the file did also send me a screenshot from his computer when i had imported the file, does this give any useable information? 



  • 9.  Re: PDF Orthophoto, how to import?

    Posted 08-29-2020 13:51

    I haven't got a TBC licence here right now. Will have to wait till I'm in the office tomorrow to import the VCL.

     

    But I wouldn't be so sure that the image is in the right spot in AutoCad. Not with additional linework or background imagery visible. The coordinate system in the bottom left corner of AutoCad doesn't seem to be rotated, but the image is. It could be a UCS though. The view center in AutoCAD is shown at 141627, 6485896 the background imagery in your TBC screenshot on the other hand is at about 153850, 6492350. That is >12 km different. That raises question marks.

     

    And according to your screenshot and what I found on Google Earth the image needs to be rotated 90 degrees to the right.

    Furthermore, the TFW doesn't contain any rotation values. And what I missed in your screenshot first, not even the top left corner seems to be in the correct position in TBC. I enlarged the screen shot and compared in Google Earth.

     

    So the TFW doesn't seem to be related to the image at all. Position and scale factor/pixel size don't fit together.

    If they can provide you with the two coordinates for the top left/bottom right corner from AutoCad you can easily reference it in TBC, but without you can only guess.

    Unless somebody here has a way to extract more info from the PDF.



  • 10.  Re: PDF Orthophoto, how to import?

    Posted 08-30-2020 10:13

    Thank you so muck for looking int this!  

    I started to suspect the same thing that you are seeing, that the picture doesent get in the correct place even if the guy that exported it trys to import it. After asking questions to a bunch of people regarding thins the answer was what you are suspecting, it does not been placed in the correct place. When asking a lot of questions i figured out that they was just placing the image in the same way that we can do in TBC..... 

    My life would be much easier if people just can tell me from the beginning that they dont know what they are doing.



  • 11.  Re: PDF Orthophoto, how to import?

    Posted 08-30-2020 09:06
      |   view attached

    Fred

    The combination you want is a TIF plus a TFW file that go together. We don't have any way to read the TIF original image out of the PDF after Adobe has done their work on what is a perfectly good original image format 

     

    A TIF file has a number of Pixels in X and Y - if you open one in Paint and use the Resize function you can see the number of Pixels in the image. The TFW file that goes with that TIF file tells you the Top Right Corner coordinates (lines 5 and 6 in the TFW) , the Pixel Size (in Meters) in X and Y (Lines 1 and 4 in the TFW) as well as any rotations that are applied to the image (lines 2 and 3 in the TFW). 

     

    So if you know the number of Pixels and the Pixel size you can compute the Lower Right Corner from that data - but there is no way that I have found to query the number of pixels in the image from within Acrobat Reader - if you open the PDF in the full Adobe Suite you may be able to determine the original image size in pixels from there. Once you have that then you can compute in Excel using the enclosed Excel Calculator the lower Right Coordinate.

     

    Without the image size in pixels the TFW is useless unless we write a PDF Geographic importer to read the PDF and TFW if that is possible to do (Autodesk may be able to do that).

     

    Alan

    Attachment(s)

    xlsx
    TFW Calculator.xlsx   9 KB 1 version


  • 12.  Re: PDF Orthophoto, how to import?

    Posted 08-30-2020 10:15

    Thanks for your reply Alan. Autodesk cant place this image either as i just answered Ronny, they have just been placing it manually and not just drag n drop as the told me from the beginning. 



  • 13.  Re: PDF Orthophoto, how to import?

    Posted 08-30-2020 14:07

    My son is in the GIS world and has a full Adobe Suite so I have asked him to take a look at the PDF to see what Adobe may tell us when inside the full suite - if it can give you the Pixel Dimensions of the image then we can compute the other corner and then do a Georeference of the image to two points

     

    Alan