Automized Rectifying with spezified pixel size

119
1
10-28-2021 02:08 AM
Labels (2)
VeronikaDöpper
New Contributor

I have georeferenced plenty of images which I would like to automatically rectify via a Python script. However, I face some troubles in applying a fixed pixel size to all of them.

What we did so far:

1) Setting the Links and exporting them to txt file

2) Update Georeference

3) Update Spatial Reference

4) set arcpy.env.cellSize to 0.000001 ( the data UAV imagery an in EPSG 4326)

4)apply  arcpy.Warp_management(tif_path, source_pnt, target_pnt, out_raster_path, transformation_type, resampling_type) OR arcpy.WarpFromFile_management(tif_path, out_raster_path,Link_txt_file, "POLYORDER2", "BILINEAR")

The warping itself works just fine, but the defined cellSize is not implemented. Are there any hints on what I'm doing wrong or missing out?

Manually rectifying the same image and defining the pixel size works, by the way.However, this is just very unhandy when targeting several hundreds of images...

Thanks!

 

0 Kudos
1 Reply
Mike_I
by Esri Contributor
Esri Contributor

Hello VeronikaDopper,

Could you provide a code snippet for reference?

For the manual process that works:

Idea 1:

  • In Geoprocessing history --> right-click --> Save as Python Script
  • Do this for each step and put together as one script.

Idea 2:

  • Have you considered using ModelBuilder to set this process up?
  • Run successfully
  • Export to Python File

Maybe these ideas will generate Python scripts that will identify the problem.

Cheers,

Mike

Data Management Specialist, Esri Support Services
0 Kudos