Forum

Poll

Problem exporting tiff file to google map tiles

Problem in exporting google map tiles
0 (0%)
Problem in exporting google map tiles
2 (100%)

Total Members Voted: 2

Author Topic: Problem in exporting TIFF File to Google Maps Files?  (Read 5549 times)

Mona92

  • Newbie
  • *
  • Posts: 8
    • View Profile
Problem in exporting TIFF File to Google Maps Files?
« on: January 30, 2019, 05:58:32 PM »
Hi guys,

May I know what wrong with my code to export google map files from tiff file.
this is my code

chunk.exportOrthomosaic(path=tiles.zip, format=Metashape.RasterFormat.RasterFormatXYZ,                         image_format=Metashape.ImageFormat.ImageFormatPNG, raster_transform=Metashape.RasterTransformNone,                       dx=0.000001, dy=0.000001, blockw=256, blockh=256,write_kml=False, write_world=True) and the attachement is what happen after export.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Problem in exporting TIFF File to Google Maps Files?
« Reply #1 on: January 30, 2019, 07:17:37 PM »
Hello Mona92,

Does the export from GUI work properly if  you select the same parameters?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Mona92

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem in exporting TIFF File to Google Maps Files?
« Reply #2 on: January 31, 2019, 03:52:59 AM »
my code work properly  in RGB image, but failed in mutispectral image to convert TIFF to google map tiles

first code for orthomosic image, and second for convert TIFF to google Map

chunk.exportOrthomosaic(path + "ortho7.tif", image_format=Metashape.ImageFormatTIFF, format = Metashape.RasterFormatTiles, raster_transform=Metashape.RasterTransformNone, write_kml=False, write_world=True)

chunk.exportOrthomosaic(path=os.path.join(path1,'tiles.zip'), format=Metashape.RasterFormat.RasterFormatXYZ,image_format=Metashape.ImageFormatPNG). 


« Last Edit: January 31, 2019, 09:26:40 AM by Mona92 »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Problem in exporting TIFF File to Google Maps Files?
« Reply #3 on: February 19, 2019, 03:03:31 PM »
Hello Mona92,

What is the format of the source images: number of channels and bit depth?

Have you tried to perform the export via GUI (without using Python scripting) does it produce the desired result?

Have you tried to open the exported TIFF in any other GIS applications, like Global Mapper or Q-GIS - is it displayed properly?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Mona92

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem in exporting TIFF File to Google Maps Files?
« Reply #4 on: February 28, 2019, 07:40:02 AM »
What is the format of the source images: number of channels and bit depth?

=jpg, 3 and 4 channel, 8 bits

Have you tried to perform the export via GUI (without using Python scripting) does it produce the desired result?
=yes, its showed good result

Have you tried to open the exported TIFF in any other GIS applications, like Global Mapper or Q-GIS - is it displayed properly?
= yup it showed good

but, previous problem already settle,  now I have another problem after tiles

this is my problem, when I  display the tiles at google earth, it  not map to their location and I can move the image as show in picture that I already attached to you

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: Problem in exporting TIFF File to Google Maps Files?
« Reply #5 on: February 28, 2019, 04:25:14 PM »
Hello Mona92,

When you export the orthomosaic to Google Map Tiles, there should be index.html file that should be opened to display orthomosaic over Google Maps, it's not intended to open individual PNGs from the exported structure.

I've tried to use your code for export in the latest Metashape Pro version (1.5.1) and it appears to work fine.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Mona92

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem in exporting TIFF File to Google Maps Files?
« Reply #6 on: February 28, 2019, 07:26:35 PM »
but why this happened when i'm using this index.html? For development purposes only?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Best regards,
Alexey Pasumansky,
Agisoft LLC

Mona92

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Problem in exporting TIFF File to Google Maps Files?
« Reply #8 on: March 01, 2019, 08:34:45 AM »
Okay thanks for help