POST
|
There are a tool with name (warp) in arctoolbox, it let us to referance image to correct xy data, I try to use this tool in python to referance many rasters, I use the top code. But there is small problem. By the way, thank you for your tring to help me. And I will try maybe I will get the solution .
... View more
07-31-2018
11:52 AM
|
0
|
0
|
526
|
POST
|
You do one rasterlist, while I have two rasterlist. first one to raster with correct coordinate , and second raster list for rasters with incorrect doordinate. in other way : I have 500 rasters had georeferenced , and others (500 rasters) need to georeference . How I can do georeference second group to first group without using georeference toolbar? because they need long time to use toolbar?
... View more
07-31-2018
10:27 AM
|
0
|
2
|
526
|
POST
|
I have two workspaces, because first contain many rasters with correct coordinate , and second workspace contain rasters with incorrect coordinate . I need to warb rasters in socand worksapce to rasters in first workspace.
... View more
07-31-2018
08:48 AM
|
0
|
4
|
526
|
POST
|
!The problem is in the varibales, the take the same value inRaster taRaster Source_pnt Target_pnt
... View more
07-31-2018
08:15 AM
|
0
|
6
|
526
|
POST
|
import arcpy i = 0 while i <= 1: inRasterworkspace = r'C:\Users\AgmnDesk\Desktop\GooleImage\GI_R' #inRasterworkspace = arcpy.GetParameterAsText(0) arcpy.env.workspace = inRasterworkspace inRasters = arcpy.ListRasters() inRaster = inRasters SoTop=arcpy.GetRasterProperties_management(inRaster , "TOP") SoLeft=arcpy.GetRasterProperties_management(inRaster , "LEFT") SoRight=arcpy.GetRasterProperties_management(inRaster , "RIGHT") SoBottom=arcpy.GetRasterProperties_management(inRaster , "BOTTOM") Source_pnt = '\''+ str(SoLeft) + ' ' + str(SoTop) + '\' ;' + str(SoRight) + ' ' + str(SoTop) + '\' ;' + str(SoLeft) + ' ' + str(SoBottom)+'\'' # ======================== taRasterworkspace = r'C:\Users\AgmnDesk\Desktop\GooleImage\GI2018' #taRasterworkspace = arcpy.GetParameterAsText(1) arcpy.env.workspace = taRasterworkspace taRasters = arcpy.ListRasters('*', 'jpg') taRaster = taRasters TaTop=arcpy.GetRasterProperties_management(taRaster , "TOP") TaLeft=arcpy.GetRasterProperties_management(taRaster , "LEFT") TaRight=arcpy.GetRasterProperties_management(taRaster , "RIGHT") TaBottom=arcpy.GetRasterProperties_management(taRaster , "BOTTOM") Target_pnt = '\''+ str(TaLeft) + ' ' + str(TaTop) + '\' ;' + str(TaRight) + ' ' + str(TaTop) + '\' ;' + str(TaLeft) + ' ' + str(TaBottom)+'\'' # ======================== arcpy.env.workspace = r'C:\Users\AgmnDesk\Desktop\GooleImage\GI2018' arcpy.env.overwriteOutput = True arcpy.Warp_management(str(taRaster), Source_pnt, Target_pnt, str(taRaster[:-4])+'tif', "POLYORDER2", "BILINEAR") # ======================== i = i + 1
... View more
07-31-2018
08:13 AM
|
0
|
0
|
228
|
POST
|
The problems is in source pnt and target pnt , they took the saime image.
... View more
07-31-2018
08:13 AM
|
0
|
0
|
228
|
POST
|
I am tring to warb many rasters to others using python in ArcMap, But I field, I need help. I have two workspaces, because first contain many rasters with correct coordinate , and second workspace contain rasters with incorrect coordinate . I need to warb rasters in socand worksapce to rasters in first workspace. import arcpy i = 0 while i <= 1: inRasterworkspace = r'C:\Users\AgmnDesk\Desktop\GooleImage\GI_R' #inRasterworkspace = arcpy.GetParameterAsText(0) arcpy.env.workspace = inRasterworkspace inRasters = arcpy.ListRasters() inRaster = inRasters SoTop=arcpy.GetRasterProperties_management(inRaster , "TOP") SoLeft=arcpy.GetRasterProperties_management(inRaster , "LEFT") SoRight=arcpy.GetRasterProperties_management(inRaster , "RIGHT") SoBottom=arcpy.GetRasterProperties_management(inRaster , "BOTTOM") Source_pnt = '\''+ str(SoLeft) + ' ' + str(SoTop) + '\' ;' + str(SoRight) + ' ' + str(SoTop) + '\' ;' + str(SoLeft) + ' ' + str(SoBottom)+'\'' # ======================== taRasterworkspace = r'C:\Users\AgmnDesk\Desktop\GooleImage\GI2018' #taRasterworkspace = arcpy.GetParameterAsText(1) arcpy.env.workspace = taRasterworkspace taRasters = arcpy.ListRasters('*', 'jpg') taRaster = taRasters TaTop=arcpy.GetRasterProperties_management(taRaster , "TOP") TaLeft=arcpy.GetRasterProperties_management(taRaster , "LEFT") TaRight=arcpy.GetRasterProperties_management(taRaster , "RIGHT") TaBottom=arcpy.GetRasterProperties_management(taRaster , "BOTTOM") Target_pnt = '\''+ str(TaLeft) + ' ' + str(TaTop) + '\' ;' + str(TaRight) + ' ' + str(TaTop) + '\' ;' + str(TaLeft) + ' ' + str(TaBottom)+'\'' # ======================== arcpy.env.workspace = r'C:\Users\AgmnDesk\Desktop\GooleImage\GI2018' arcpy.env.overwriteOutput = True arcpy.Warp_management(str(taRaster), Source_pnt, Target_pnt, str(taRaster[:-4])+'tif', "POLYORDER2", "BILINEAR") # ======================== i = i + 1
... View more
07-31-2018
07:54 AM
|
0
|
9
|
728
|
POST
|
I am tring with this python code in arcmap but it doesn't work, who can help me.
... View more
07-31-2018
07:36 AM
|
0
|
2
|
366
|
Online Status |
Offline
|
Date Last Visited |
09-08-2022
01:17 AM
|